00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _H_M3_format
00027 #define _H_M3_format
00028
00029 typedef struct
00030 {
00031 int64_t firstSample;
00032 int64_t lastSample;
00033 } M3_TODheader;
00034
00035 typedef struct
00036 {
00037 int64_t firstSample;
00038 int64_t lastSample;
00039 } M3_TOCheader;
00040
00041 typedef struct
00042 {
00043 int64_t firstSample;
00044 int64_t lastSample;
00045 int32_t numPixelInClass;
00046 int32_t numNZ;
00047 } M3_PointingHeader;
00048
00049 typedef struct
00050 {
00051 int64_t firstSample;
00052 int64_t lastSample;
00053 int64_t corLength;
00054 } M3_NoiseHeader;
00055
00056 typedef struct
00057 {
00058 int64_t firstSample;
00059 int64_t lastSample;
00060 int64_t length;
00061 int64_t bandWidth;
00062 } M3_FilterHeader;
00063
00064 typedef struct
00065 {
00066 int32_t numPixelInClass;
00067 int32_t numPixelInMap;
00068 } M3_MapHeader;
00069
00070 typedef struct
00071 {
00072 int32_t numPixelInClass;
00073 } M3_MaskHeader;
00074
00075 typedef struct
00076 {
00077 int32_t numPixelInClass;
00078 } M3_CoordHeader;
00079
00080 typedef struct
00081 {
00082 int32_t lmin;
00083 int32_t lmax;
00084 }M3_SpectrumHeader;
00085
00086 typedef struct
00087 {
00088 int32_t numBin;
00089 }M3_BinHeader;
00090
00091 typedef struct
00092 {
00093 int32_t numBin;
00094 }M3_BPSheader;
00095
00096 typedef struct
00097 {
00098 int32_t numBin;
00099 }M3_FisherHeader;
00100
00101 typedef struct
00102 {
00103 int64_t numColumn;
00104 int64_t numNZ;
00105 }M3_SparseHeader;
00106
00107 typedef struct
00108 {
00109 int64_t firstTime_sec;
00110 double firstTime_nsec;
00111 int64_t numSample;
00112 double sampleRate;
00113 int32_t numDataPerSample;
00114 }M3_GCPointingHeader;
00115
00116 typedef struct
00117 {
00118 size_t size;
00119 }M3_AuxHeader;
00120
00121 typedef union
00122 {
00123 M3_TODheader tod;
00124 M3_TOCheader toc;
00125 M3_PointingHeader pointing;
00126 M3_NoiseHeader noise;
00127 M3_FilterHeader filter;
00128 M3_MapHeader map;
00129 M3_MaskHeader mask;
00130 M3_CoordHeader coord;
00131 M3_SpectrumHeader spectrum;
00132 M3_BinHeader bin;
00133 M3_BPSheader bps;
00134 M3_FisherHeader fisher;
00135 M3_SparseHeader sparse;
00136 M3_GCPointingHeader gcpointing;
00137 M3_AuxHeader aux;
00138 }M3_AnyHeader;
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160 void M3_File_ReadHeader( M3_File *theFile, void *header );
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 void M3_File_ReadData( M3_File *theFile, void *readArg, void *data );
00182
00183 char *M3_FormatString_GetFirstParam( char *formatString, char *parameter, char *value);
00184 char *M3_FormatString_GetNextParam( char *formatPtr, char *parameter, char *value );
00185
00186
00187 #endif