00001 00002 /* 00003 * THIS IS A GENERATED FILE; DO NOT EDIT. 00004 * 00005 * Declarations for calling `roi_stats_mag' a.k.a. `rsm' as a C library. 00006 * 00007 * Made by intermediate binary `roi_stats_mag.out' on: 00008 * Fri Jul 8 01:30:04 2011 00009 * 00010 * Code for include-generation driver `../Gen-include.c' last modified on: 00011 * Mon Jun 7 15:11:28 2010 00012 * 00013 */ 00014 00015 // Original documentation block 00016 /* 00017 * roi_stats_mag: accumulate statistics on regions 00018 * 00019 * [s,names,combo]=roi_stats_mag(x,y,mag,geom,nroi,mode) 00020 * * A set of per-region statistics is gathered based on regions 00021 * encoded in the image inputs x (containing region tags, 1..Nr, or 00022 * 0 for no tag) and y (containing region indicators, 0/1). The 00023 * statistics are functions of region configuration, and of 00024 * line-of-sight magnetic field `mag'. 00025 * * x should be 0/NaN, or a nonnegative integer. Pixels in the 00026 * range 1..Nr, where Nr is the number of regions, are treated as 00027 * indicators for being within the numbered region. 00028 * Inputs x of 0 or NaN are treated as not belonging to any 00029 * labeled region. 00030 * * The number of regions, Nr, is deduced from x. Often you want 00031 * the statistics to cover a known range of classes regardless of x. 00032 * If so, specify the nroi input (an integer). If you give nroi < 0, 00033 * it is taken as equal to Nr. If nroi < Nr, pixels with x > nroi 00034 * are ignored. 00035 * * y that is finite and nonzero (e.g., 1) indicates activity present. 00036 * Not all tagged pixels will be active; typically the tagged pixels 00037 * are large blobs, and the active pixels are finer details within 00038 * each blob. 00039 * * For each region, a row of statistics is computed: 00040 * 1: rgnnum = # pixels tagged (all may not be active) 00041 * 2: rgnsize = projected (flat) area in microhemispheres (0..1e6) 00042 * 3: rgnarea = un-projected (solid-angle) area in microhemispheres (0..1e6) 00043 * 4: arnum = # active pixels (x == 1) 00044 * 5: arsize = projected (flat) active area in microhemispheres (0..1e6) 00045 * 6: ararea = unprojected (solid-angle) active area in microhemis (0..1e6) 00046 * 7: arlat,lon = average location, weighted by un-projected area 00047 * 9: arminlat,lon lower corner of (lat,lon) bounding box 00048 * 11: armaxlat,lon upper corner of (lat,lon) bounding box 00049 * 13: rgnbtot = sum of absolute LoS flux within the identified region 00050 * 14: rgnbnet = net LoS flux within the identified region 00051 * 15: rgnbpos = absolute value of total positive LoS flux 00052 * 16: rgnbneg = absolute value of total negative LoS flux 00053 * 17: arfwtlat,lon = flux-weighted center of active pixels 00054 * 19: arfwtpos_lat,lon = flux-weighted center of positive flux 00055 * 21: arfwtneg_lat,lon = flux-weighted center of negative flux 00056 * 23: daysgone = #days until bounding box vanishes from front of disk 00057 * 24: daysback = #days until bounding box first reappears on front 00058 * These definitions are in a machine-readable include file, 00059 * roi_stats_mag_def.h 00060 * * The solar disk is at location given by center, observed at tip 00061 * angle beta, in degrees. 00062 * * Optionally returns the standard text name of each of the 00063 * computed statistics. 00064 * * Optionally returns the means of combination of each of the 00065 * computed statistics. 00066 * * This is implemented as a MEX file. 00067 * 00068 * Inputs: 00069 * real x(m,n); -- 1..Nr, or 0/NaN 00070 * int y(m,n); -- 0/NaN, or otherwise 00071 * real mag(m,n); 00072 * real geom(5); -- [x0 y0 r_sun b p] 00073 * int nroi; 00074 * string mode; 00075 * 00076 * Outputs: 00077 * real s(nr,ns) -- nr = (nroi < 0) ? Nr : nroi 00078 * opt string names(ns) 00079 * opt string combo(ns) 00080 * 00081 * See Also: 00082 * 00083 * turmon june 2010, sep 2010 00084 * 00085 * 00086 */ 00087 00088 #ifndef _mexfn_roi_stats_mag_h_ 00089 #define _mexfn_roi_stats_mag_h_ 00090 00091 // function entry point 00092 mexfn_lib_t main_roi_stats_mag; 00093 00094 // argument counts 00095 #define MXT_rsm_NARGIN_MIN 6 00096 #define MXT_rsm_NARGIN_MAX 6 00097 #define MXT_rsm_NARGOUT_MIN 0 00098 #define MXT_rsm_NARGOUT_MAX 3 00099 00100 // input argument numbers 00101 #define MXT_rsm_ARG_x 0 00102 #define MXT_rsm_ARG_y 1 00103 #define MXT_rsm_ARG_mag 2 00104 #define MXT_rsm_ARG_geom 3 00105 #define MXT_rsm_ARG_nroi 4 00106 #define MXT_rsm_ARG_mode 5 00107 00108 // output argument numbers 00109 #define MXT_rsm_ARG_s 0 00110 #define MXT_rsm_ARG_names 1 00111 #define MXT_rsm_ARG_combo 2 00112 00113 00114 #endif // _mexfn_roi_stats_mag_h_ 00115 00116 // (file ends)