00001 /* derot_mean.h */ 00002 00003 /* ************************************************************** 00004 * 00005 * Derot_mean header file contains listings of 00006 * keywords and defined parameters 00007 * structures 00008 * error codes 00009 * 00010 * 00011 * ************************************************************** 00012 */ 00013 #ifndef DEROT_MEAN_INCL 00014 #define DEROT_MEAN_INCL 00015 /* ****** Some Structures Used in derot_mean ****** */ 00016 /* Working Array and Geometry Value Structure */ 00017 typedef struct 00018 { 00019 DRMS_Array_t *DatArray; 00020 DRMS_Array_t *WgtArray; 00021 float *dat; // 00022 float *wgt; 00023 float *lon; 00024 float *lat; 00025 short *osun; 00026 TIME timctr; 00027 double LN; // need to add the rest of the geometry stuff 00028 double LT; // need to add the rest of the geometry stuff 00029 float Dmax; 00030 float Dmin; 00031 float Wmax; 00032 float Wmin; 00033 DRMS_Record_t *rec; 00034 double irecdt; 00035 int irecno; 00036 double crln; /* Carrington Lon for Observer - from ephem */ 00037 int crot; /* Carrington Rotation */ 00038 } OutImgs; 00039 00040 /* Parameter List Structure */ 00041 typedef struct 00042 { 00043 char oser[DRMS_MAXSERIESNAMELEN]; /* Output series name */ 00044 char iser[DRMS_MAXSERIESNAMELEN]; /* Input series name */ 00045 TIME Tstart; /* Time of first output image */ 00046 TIME Tend; /* Defines the time of last image <= Tend */ 00047 int Tstep; /* Cadence of output images - in seconds */ 00048 int cols; /* Output image number of columns */ 00049 int rows; /* Output image number of rows */ 00050 int size; /* Output image rows * cols columns */ 00051 double A0; /* Solid body roation rate in (micro-rad/sec) */ 00052 double A2; /* Rotation coef for Sin^2(B) term (micro-rad/sec) */ 00053 double A4; /* Rotation coef for Sin^4(B) term (micro-rad/sec) */ 00054 double Meri_V; /* Meridional Flow term in ??? units */ 00055 char WtFunc[10]; /* String specifying the type of weighting function */ 00056 double WtParm; /* Parameter to set weighting function */ 00057 int WtLen; /* Length of weighting function in seconds */ 00058 double *Wt; /* Pointer to Weighting Function array */ 00059 int projcode; /* Code for projection used for Rick's cartography */ 00060 char projname[100]; /* Type of projection for output mapping */ 00061 double rsun; /* semi-diameter of Sun in pixels (required for AERIAL)*/ 00062 double dist; /* Distance to Sun in A.U. (required for AERIAL) */ 00063 double ang_rad; /* semi-diameter of Sun in radians (used for AERIAL)*/ 00064 double pangle; /* Sets regular p-angle (in radians)=0 */ 00065 double CROTA2; /* Sets to minus "P-angle" for output, usually=0 */ 00066 double CRLN; /* Sets the L0 angle for output, usually=NaN */ 00067 double CRLT; /* Sets the B0 angle for output, usually=0 */ 00068 char CTYPE1[100]; /* Type for Coordinate axis 1 */ 00069 char CTYPE2[100]; /* Type for Coordinate axis 2 */ 00070 double CRPIX1; /* Fiducial Pixel for axis 1 */ 00071 double CRPIX2; /* Fiducial Pixel for axis 2 */ 00072 double CRVAL1; /* Cordinate for Fiducial pixel 1 */ 00073 double CRVAL2; /* Cordinate for Fiducial pixel 2 */ 00074 double CDELT1; /* Pixel size, axis 1 - defined at Fiducial Pixel */ 00075 double CDELT2; /* Pixel size, axis 2 - defined at Fiducial Pixel */ 00076 short verbose; /* Flag set if verbose */ 00077 int Nmaps; /* Number of output maps (size of OutImg structure) */ 00078 // This is a poor man's error handling system, so errors can be pass up 00079 int status; /* to pass back error status codes from functions */ 00080 char Msg[2000]; /* to pass back error messages from functions */ 00081 int signal; /* to pass back signals from functions */ 00082 char SigMsg[2000]; /* to pass back signal messages from functions */ 00083 } ParmList; 00084 00085 /* ****** Status Values & Error Codes ****** */ 00086 #define kMyMod_Success (0) // Operation was a success - no err code 00087 #define kMyMod_InitErr (101) // Could not initialize array or variable 00088 #define kMyMod_ValErr (102) // A variable has invalid value 00089 #define kMyMod_MallocErr (103) // Could not allocate memory 00090 #define kMyMod_Missing (104) // A keyword is missing 00091 #define kMyMod_WrongType (105) // A variable is not the right type 00092 #define kMyMod_EndRec (110) // Signals that the last record 00093 #define kMyMod_DONE (999) // Signals that the module is done 00094 00095 00096 #endif