ocssw  1.0
/disk01/web/ocssw/build/src/l2gen/mscal_struc.h (r8085/r2592)
Go to the documentation of this file.
00001 #include "hdf.h"
00002 #include "l12_parms.h"
00003 #include "passthebuck.h"
00004 #include "readL2scan.h"
00005 
00006 
00007 #define  SHORTNAME   128
00008 
00009 typedef char   stname[SHORTNAME];
00010 typedef char   prname[PRODSTRLEN];
00011 
00012 
00013 typedef struct mscal_struct {
00014 
00015     int32_t   sensorID;
00016     int32_t   nfiles;
00017     int32_t   npixs;
00018     int32_t   nbands;
00019     int32_t   *Lambda;
00020     int32_t   nprods;
00021     prname *l2prods;
00022     char   *input_parms;
00023     unsigned char   *data;
00024     stname *filenames;
00025     int16  *fileID;
00026     int16  *year;
00027     int16  *day;
00028     int32  *msec;
00029     int16  *iscan;
00030     uint8  *mside;
00031     uint8  *detnum;
00032     int16  *pixnum;
00033     float  *lon;
00034     float  *lat;
00035     float32 *ddata;
00036 
00037 } mscalstr;
00038 
00039 
00040 
00041 typedef struct calinput_struct {
00042 
00043     char   ifile [MAXNFILES][FILENAME_MAX];
00044     char   ofile [FILENAME_MAX];
00045     char   input_parms[20000];
00046     char   flaguse  [1024];
00047     int32_t   spixl;            /* starting pixel no. of the input (1-rel)  */
00048     int32_t   epixl;            /* ending pixel no. of the input (1-rel)    */
00049     int32_t   dpixl;            /* pixel subsampling increment              */
00050     int32_t   sline;            /* starting line no. of the input (1-rel)   */
00051     int32_t   eline;            /* ending line no. of the input (1-rel)     */
00052     int32_t   dline;            /* line subsampling increment               */
00053     int32_t   xcalbox;          /* Pixel size of the central box in the L1 scene (e.g. 5 pixels around MOBY) to be extracted into xcalfile, default=0-whole L1 */
00054     int32_t   xcalboxcenter[2]; /* Centeral [ipix, iscan] of the box in the L1 scene, default =[0,0] - center of the L1 scene */
00055     int32_t   xcalpervalid;     /* Minimum percent of valid cross-calibration pixels within the box or the L1 scene */
00056 
00057 } inputstr;
00058 
00059 
00060 
00061 
00062 
00063 int crosscal_append(char *crosscalfile, mscalstr calstr);
00064 int crosscal_read(char *crosscalfile, int32_t subsmpl, mscalstr *calstr);
00065 int crosscal_npixs(char *xcalfile, int32_t subsmpl, int32_t *sensorID, int32_t *npixs, int32_t *ngranuls);
00066 int32_t alloc_calstr(int32_t nfiles, int32_t npixs, mscalstr *calstr);
00067 void free_calstr(mscalstr calstr, int all);