00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 static const char docstring[] =
00011 "roi_stats_mag: accumulate statistics on regions\n"
00012 "\n"
00013 " [s,names,combo]=roi_stats_mag(x,y,mag,geom,nroi,mode)\n"
00014 " * A set of per-region statistics is gathered based on regions\n"
00015 " encoded in the image inputs x (containing region tags, 1..Nr, or\n"
00016 " 0 for no tag) and y (containing region indicators, 0/1). The\n"
00017 " statistics are functions of region configuration, and of\n"
00018 " line-of-sight magnetic field `mag'.\n"
00019 " * x should be 0/NaN, or a nonnegative integer. Pixels in the\n"
00020 " range 1..Nr, where Nr is the number of regions, are treated as\n"
00021 " indicators for being within the numbered region.\n"
00022 " Inputs x of 0 or NaN are treated as not belonging to any\n"
00023 " labeled region.\n"
00024 " * The number of regions, Nr, is deduced from x. Often you want\n"
00025 " the statistics to cover a known range of classes regardless of x.\n"
00026 " If so, specify the nroi input (an integer). If you give nroi < 0,\n"
00027 " or empty, it is taken as equal to Nr. If nroi < Nr, pixels with\n"
00028 " x > nroi are ignored.\n"
00029 " * y that is finite and nonzero (e.g., 1) indicates activity present.\n"
00030 " Not all tagged pixels will be active; typically the tagged pixels\n"
00031 " are large blobs, and the active pixels are finer details within\n"
00032 " each blob.\n"
00033 " * For each region, a row of statistics is computed:\n"
00034 " 1: rgnnum = # pixels tagged (all may not be active)\n"
00035 " 2: rgnsize = projected (flat) area in microhemispheres (0..1e6)\n"
00036 " 3: rgnarea = un-projected (solid-angle) area in microhemispheres (0..1e6)\n"
00037 " 4: arnum = # active pixels (x == 1)\n"
00038 " 5: arsize = projected (flat) active area in microhemispheres (0..1e6)\n"
00039 " 6: ararea = unprojected (solid-angle) active area in microhemis (0..1e6)\n"
00040 " 7: arlat,lon = average location, weighted by un-projected area\n"
00041 " 9: arminlat,lon lower corner of (lat,lon) bounding box\n"
00042 " 11: armaxlat,lon upper corner of (lat,lon) bounding box\n"
00043 " 13: rgnbtot = sum of absolute LoS flux within the identified region\n"
00044 " 14: rgnbnet = net LoS flux within the identified region\n"
00045 " 15: rgnbpos = absolute value of total positive LoS flux\n"
00046 " 16: rgnbneg = absolute value of total negative LoS flux\n"
00047 " 17: arfwtlat,lon = flux-weighted center of active pixels\n"
00048 " 19: arfwtpos_lat,lon = flux-weighted center of positive flux\n"
00049 " 21: arfwtneg_lat,lon = flux-weighted center of negative flux\n"
00050 " 23: daysgone = #days until bounding box vanishes from front of disk\n"
00051 " 24: daysback = #days until bounding box first reappears on front\n"
00052 " These definitions are in a machine-readable include file,\n"
00053 " roi_stats_mag_def.h\n"
00054 " * The solar disk is at location given by center, observed at tip\n"
00055 " angle beta, in degrees.\n"
00056 " * Optionally returns the standard text name of each of the\n"
00057 " computed statistics.\n"
00058 " * Optionally returns the means of combination of each of the\n"
00059 " computed statistics.\n"
00060 " * This is implemented as a MEX file.\n"
00061 "\n"
00062 " Inputs:\n"
00063 " real x(m,n); -- 1..Nr, or 0/NaN\n"
00064 " int y(m,n); -- 0/NaN, or otherwise\n"
00065 " real mag(m,n);\n"
00066 " real geom(5); -- [x0 y0 r_sun b p]\n"
00067 " int nroi; -- [] same as -1\n"
00068 " string mode;\n"
00069 "\n"
00070 " Outputs:\n"
00071 " real s(nr,ns) -- nr = (nroi < 0) ? Nr : nroi\n"
00072 " opt string names(ns)\n"
00073 " opt string combo(ns)\n"
00074 "\n"
00075 " See Also:\n"
00076 "\n"
00077 " turmon june 2010, sep 2010\n"
00078 "\n"
00079 "";
00080
00081
00082