M3_gcp.h

00001 #ifndef _H_M3_gcp
00002 #define _H_M3_gcp
00003 
00004 #include <math.h>
00005 #include "M3.h"
00006 #include "gcp.h"
00007 
00008 #define M3_PLANCK_POINTING_EVENT_RATE 2.777777777777778e-04
00009 #define M3_FLOOR_CEIL_EPSILON 1e-11
00010 
00011 
00012 typedef struct
00013 {
00014   char *detectorID;
00015   double offset[3];
00016   double psiPol;
00017 } M3_planckDetector;
00018 
00019 typedef struct
00020 {
00021   double boresightSpinAxisAngle;
00022   int32_t numDetector;
00023   M3_planckDetector *detectorInfo;
00024 } M3_planckAux;
00025 
00026 typedef struct 
00027 {
00028   int32_t pixelType;
00029   int32_t nside;
00030   char pixelScheme;
00031   char detectorID[128];
00032   char rotateDirection[128];
00033   char rotateEquinox[128];
00034 } M3_planckAuxComplement;
00035 
00036 
00037 typedef struct 
00038 {
00039   int32_t detectorID;
00040   double offset[2];
00041 } M3_ebexDetector;
00042 
00043 typedef struct 
00044 {
00045   M3_TimeEl polarSpinStart;
00046   double polarSpinRate;
00047   int32_t numDetector;
00048   M3_ebexDetector *detectorInfo;
00049 } M3_ebexAux;
00050 
00051 typedef struct
00052 {
00053   int32_t pixelType;
00054   int32_t nside;
00055   char pixelScheme;
00056   int32_t detectorID;
00057   char rotateDirection[128];
00058   char rotateEquinox[128];
00059 } M3_ebexAuxComplement;
00060 
00061 
00062 void M3_planckAuxComplement_Parse( M3_planckAuxComplement *acStruct, char *auxComplement ); 
00063 
00064 void M3_GCPointingType_GetNumNZ( char *GCPointingType, 
00065                                  char *auxComplement, 
00066                                  int32_t *numNZ );
00067 
00068 int M3_TimeEl_Compare( M3_TimeEl a, M3_TimeEl b);
00069 
00070 M3_TimeEl M3_TimeEl_AddSamples( M3_TimeEl a, int64_t n, double r );
00071 
00072 M3_TimeEl M3_TimeEl_AddSeconds( M3_TimeEl time, double seconds );
00073 
00074 void M3_TimeEl_subtractNano( M3_TimeEl *timeEl );
00075 
00076 double M3_TimeEl_Difference( M3_TimeEl a, M3_TimeEl b );
00077 
00078 void M3_GCPointingGroupLL_ExpandPointing( M3_GCPointingGroupLL *gcpointingGroupNode, 
00079                                           char *auxComplement, 
00080                                           M3_TimeEl dataSetFirstTime, 
00081                                           double dataSetSampleRate, 
00082                                           M3_Interval requestInterval, 
00083                                           M3_PointingEl *sparsePointing );
00084 
00085 
00086 
00087 int M3_GCPointingGroupLL_IsStored( M3_GCPointingGroupLL *gcpointingGroupNode, M3_TimeIntervalLL *timeIntervalList );
00088 
00089 int M3_GCPointingGroupLL_IsInFiles( M3_GCPointingGroupLL *gcpointingGroupNode, M3_TimeIntervalLL *timeIntervalList );
00090 
00091 void M3_GCPointingStoreLL_expand_xyz2euler( M3_GCPointingStoreLL *storeList, 
00092                          double spinangle, int spinmode, 
00093                          int incoord, int inepoch, 
00094                          gcp_time eventstart, double eventrate, 
00095                          double *detoffset, double detpolangle, 
00096                          gcp_time detstart, double detrate, int64_t ndet, int outcoord, 
00097                          int outepoch, double *detdata);
00098 
00099 void M3_GCPointingStoreLL_expand_xyz2hpxring( M3_GCPointingStoreLL *storeList,
00100                            double spinangle, int spinmode, 
00101                            int incoord, int inepoch, 
00102                            gcp_time eventstart, double eventrate,
00103                            double *detoffset, double detpolangle, 
00104                            gcp_time detstart, double detrate, int64_t ndet, int outcoord, 
00105                            int outepoch, double *detdata, long *detpixels, long detnside);
00106 
00107 void M3_GCPointingStoreLL_expand_xyz2hpxnest( M3_GCPointingStoreLL *storeList,
00108                            double spinangle, int spinmode, 
00109                            int incoord, int inepoch, 
00110                            gcp_time eventstart, double eventrate,
00111                            double *detoffset, double detpolangle, 
00112                            gcp_time detstart, double detrate, int64_t ndet, int outcoord, 
00113                            int outepoch, double *detdata, long *detpixels, long detnside);
00114 
00115 
00116 void M3_GCPointingStoreLL_expand_simmission2hpx( M3_GCPointingStoreLL *storeList, M3_planckAux *planckAux, M3_planckAuxComplement auxComplement, 
00117                                                  M3_TimeEl eventStart, double eventRate, M3_TimeEl detStart, double detRate, 
00118                                                  int32_t detIndex, int64_t numDetSample, double *detdata, long *detpixels );
00119 
00120 
00121 void M3_GCPointingStoreLL_expand_ebex2hpx( M3_GCPointingStoreLL *storeList,
00122                                            M3_ebexAux *auxData, M3_ebexAuxComplement auxComplement, 
00123                                            M3_TimeEl detStart, double detRate, int64_t numDetSample, 
00124                                            double *detdata, long *detpixels );
00125 
00126 #endif

Generated on Mon Nov 24 10:05:12 2008 for M3 by  doxygen 1.5.3-20071008