IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2005, 4:44:20 PM (21 years ago)
Author:
eugene
Message:

loneos.h to dvo.h; FITS tables for smpfiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libohana/include/loneos.h

    r3402 r3466  
    1818enum {M_UNDEF = -1, M_NONE, M_MEF, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE, M_MODES, N_MODE};
    1919
    20 # if (0)
    21   # define MODE_NONE   0  /* not defined */
    22   # define MODE_MEF    1  /* chip of mef image */
    23   # define MODE_SPLIT  2  /* chip of split image */
    24   # define MODE_SINGLE 3  /* single chip, not mosaic */
    25   # define MODE_CUBE   4  /* cube entry */
    26   # define MODE_SLICE  5  /* slice of a cube */
    27   # define MODE_MODES  6  /* not used? */
    28 
    29   # define TYPE_NONE   0
    30   # define TYPE_OBJECT 1
    31   # define TYPE_DARK   2
    32   # define TYPE_BIAS   3
    33   # define TYPE_FLAT   4
    34 /** these are no longer used by imregister-3.0
    35     status:imrough uses the imregister-3.0 values
    36     status:imsearch should migrate to the imregister.h version
    37     or be removed!
    38 **/
    39 # endif
    40 
    41 
     20/* convert these to enums? */
     21/* RegImage.flag values */
    4222# define IMREG_DIST  0x01 /* image distributed, only imregister-3.0 */
    4323
     
    10181      than one star in the catalog, but not in the same catalog file.
    10282*/
    103 
    104 /* structure for data on a catalog region */
    105 typedef struct {
    106   char filename[256];
    107   double DEC[2], RA[2];
    108 } GSCRegion;
    10983
    11084/* structure for Image Registration Database */
     
    137111} RegImage;  /* 360 bytes / image */
    138112
    139 /* structure for Image Registration Database */
    140 typedef struct {
    141   float sky;
    142   float bias;
    143   float fwhm;
    144   float exptime;
    145   float airmass;
    146   e_time obstime;
    147   short int ccdnum;
    148   char junk1, junk2;
    149   char filter[32];
    150 } RufImage;  /* 60 bytes */
    151 
    152 /* Old Detrend Database structure */
    153 typedef struct {
    154   e_time tstart;
    155   e_time tstop;
    156   e_time treg;
    157   float sigma, clipsigma;
    158   int type;
    159   int filter;
    160   int ccd;
    161   char filename[254];
    162   char flag1, flag2;
    163 } DetRegOld;    /* 288 bytes */
    164 
    165113/* Detrend Database structure */
    166114typedef struct {
     
    193141  short int c2;               /* photcode for color term */
    194142  short int photcode;         /* appropriate photcode */
    195   char label[66];
    196 } OldPhotPars;    /* 100 bytes */
    197 
    198 /* Instant Zeropoint structure */
    199 typedef struct {
    200   float ZP;                   /* measured zero point */
    201   float ZPo;                  /* expected zero point */
    202   float dZP;                  /* error on zero point */
    203   float K;                    /* airmass term used */
    204   float X;                    /* color term used */
    205   e_time tstart;   /* start time of observation */
    206   e_time tstop;    /* end time of observation */
    207   short int c1;               /* photcode for color term */
    208   short int c2;               /* photcode for color term */
    209   short int photcode;         /* appropriate photcode */
    210143  char label[64];
    211144  short int refcode;          /* reference photometry system */
     
    213146  int Nmeas;                  /* number of data points */
    214147} PhotPars;    /* 108 bytes */
    215 
    216 /* average data as stored in the LONEOS database */
    217 typedef struct {
    218   float R;                    /* RA  in decimal degrees */
    219   float D;                    /* DEC in decimal degrees */
    220   short int M;                /* thousandths of mag (-32.000 to 32.000 valid range) */
    221   unsigned short int Nm, Nn;  /* number of measurements, missing */
    222   short int Xp;               /* scatter in 1/100 arcsec (-327.67 to +327.67 valid range) */
    223   short int Xm;               /* chisq for primary mag [1000*value] */
    224   unsigned short int code;    /* an ID code (ie, star, ghost, satelite, etc) */
    225   signed int offset;          /* offset to first measurement */
    226   signed int missing;         /* offset to first missing obs */
    227   short int dM;               /* formal error on pri mag   [1000*log(value)] */
    228   short int Xg;               /* 'best' chisq value */
    229 } Average; /* 32 bytes / Average */
    230148
    231149/* average data as stored in the LONEOS database -- must be translated on load */
     
    240158  signed int offset;          /* offset to first measurement */
    241159  signed int missing;         /* offset to first missing obs */
    242 } OldAverage; /* 28 bytes / Average */
     160} Average; /* 28 bytes / Average */
    243161
    244162/* data for individual measurement for each star */
    245 /* OLD LONEOS VERSION.  NOT BYTE COMPATIBLE WITH NEW VERSION
    246    (can be loaded with translation, losing the exptime,
    247    and limited the number of Naverage to 0xffffff - in load_catalog) */
    248163typedef struct {
    249164  short int dR, dD;           /* 1/100 of arcsec (-327.67 to +327.67 valid range) */
     
    255170  unsigned int   t;           /* time in seconds (0 - 143 years valid range) */
    256171  unsigned int average;       /* reference to corresponding average entry, upper byte of Measure.average stores flags */
    257 } OldMeasure; /* 20 bytes / Measure */
    258 
    259 /* data for individual measurement for each star */
    260 typedef struct {
    261   short int dR, dD;           /* 1/100 of arcsec (-327.67 to +327.67 valid range) */
    262   short int M;                /* thousandths of mag (-32.767 to 32.767 valid range) */
    263   short int Mcal;             /* image cal mag, thousandths of mag (-32.767 to 32.767 valid range) */
    264   short int Mgal;             /* 'galaxy' mag, thousandths of mag (-32.767 to 32.767 valid range) */
    265   short int airmass;          /* (airmass - 1), thousandths of mag (-32.767 to 32.767 valid range) */
    266   short int FWx;              /* object fwhm major axis - 1/100 of arcsec */
    267   unsigned char dM;           /* thousandths of mag (0.000 to 0.255 valid range) */
    268   unsigned char fwy, theta;   /* object fwhm minor/major axes ratio, angle wrt ccd X dir (0xff/360 deg precision) */
    269   char dophot;                /* dophot type (1-9) */
    270   unsigned short int source;  /* code to identify photometry source */
    271   unsigned int   t;           /* time in seconds (0 - 143 years valid range) */
    272   unsigned int averef;        /* reference to corresponding average entry, upper byte of Measure.average stores flags */
    273   short int dt;               /* exposure time in units of 2500*log(exptime) (millimags!) */
    274   unsigned short int flags;   /* 16 bit-flags for various uses */
    275 } Measure; /* 32 bytes / Measure */
    276 
    277 # if (0)
    278 /* data for individual measurement for each star */
    279 typedef struct {
    280   short int dR, dD;           /* 1/100 of arcsec (-327.67 to +327.67 valid range) */
    281   short int M;                /* thousandths of mag (-32.767 to 32.767 valid range) */
    282   short int Mcal;             /* image cal mag, thousandths of mag (-32.767 to 32.767 valid range) */
    283   unsigned char dM;           /* thousandths of mag (0.000 to 0.255 valid range) */
    284   char dophot;                /* dophot type (1-9) */
    285   unsigned short int source;  /* code to identify photometry source */
    286   unsigned int   t;           /* time in seconds (0 - 143 years valid range) */
    287   unsigned int averef;        /* reference to corresponding average entry, upper byte of Measure.average stores flags */
    288   short int dt;               /* exposure time in units of 2500*log(exptime) (millimags!) */
    289   unsigned short int flags;   /* 16 bit-flags for various uses */
    290 } Measure; /* 24 bytes / Measure */
    291 # endif
     172} Measure; /* 20 bytes / Measure */
    292173
    293174/* data on missing stars */
     
    302183  short int dM;               /* scatter on alt mag */
    303184} SecFilt; /* 6 byte / SecFilt */
    304 
    305 /* data on missing stars */
    306 typedef struct {
    307   short int M;                /* other mags - thousandths of mag (-32.767 to 32.767 valid range) */
    308   short int Xm;               /* chisq on alt mag */
    309 } OldSecFilt; /* 4 byte / SecFilt */
    310 
    311 /* a catalog contains this data */
    312 typedef struct {
    313   /* data in the file: */
    314   Average *average;
    315   Measure *measure;
    316   Missing *missing;
    317   SecFilt *secfilt;
    318   Header  header;
    319   int Naverage, Nmeasure, Nmissing, Nsecfilt;
    320   /* description of the catalog file: */
    321   char *filename;
    322   int lockmode;
    323   FILE *f;
    324   /* pointers for data manipulation */
    325   int *found;
    326   int *image;
    327   int *mosaic;
    328   float *X;
    329   float *Y;
    330 } Catalog;
    331185
    332186/* the standard astrometric coordinates structure */
     
    341195  char     Npolyterms;
    342196} Coords;  /* 120 bytes / Coords */
    343 
    344 typedef struct {
    345   unsigned short int code;   /* code number (stored in Measure.source) */
    346   char name[32];             /* name for filter combination */
    347   char type;                 /* primary, secondary, dependent, reference */
    348   short int C, dC, dX;       /* primary phot calibration terms (millimags) */
    349   float K;                   /* secondary phot calibration terms (millimags) */
    350   int  c1, c2;               /* color is average.M[c1] - average.M[c2] */
    351   int  equiv;                /* this dependent filter is equivalent to equiv primary/secondary */
    352   int  Nc;                   /* number of color terms */
    353   float X[4];                /* color terms X[0]*mc + X[1]*mc^2 + X[2]*mc^3, etc */
    354 } PhotCode;
    355 
    356 typedef struct {
    357   int Ncode;
    358   int Nsecfilt;
    359   int hashcode[0x10000];
    360   int hashNsec[0x10000];
    361   PhotCode *code;
    362 } PhotCodeData;
    363197
    364198/* image structure for binary data storage of image data */
     
    395229/* Image needs to be aligned with 8-byte boundaries on Suns */
    396230
     231/* a catalog contains this data */
     232typedef struct {
     233  /* data in the file: */
     234  Average *average;
     235  Measure *measure;
     236  Missing *missing;
     237  SecFilt *secfilt;
     238  Header  header;
     239  int Naverage, Nmeasure, Nmissing, Nsecfilt;
     240  /* description of the catalog file: */
     241  char *filename;
     242  int lockmode;
     243  FILE *f;
     244  /* pointers for data manipulation */
     245  int *found;
     246  int *image;
     247  int *mosaic;
     248  float *X;
     249  float *Y;
     250} Catalog;
     251
     252/* structure for data on a catalog region */
     253typedef struct {
     254  char filename[256];
     255  double DEC[2], RA[2];
     256} GSCRegion;
     257
     258typedef struct {
     259  unsigned short int code;   /* code number (stored in Measure.source) */
     260  char name[32];             /* name for filter combination */
     261  char type;                 /* primary, secondary, dependent, reference */
     262  short int C, dC, dX;       /* primary phot calibration terms (millimags) */
     263  float K;                   /* secondary phot calibration terms (millimags) */
     264  int  c1, c2;               /* color is average.M[c1] - average.M[c2] */
     265  int  equiv;                /* this dependent filter is equivalent to equiv primary/secondary */
     266  int  Nc;                   /* number of color terms */
     267  float X[4];                /* color terms X[0]*mc + X[1]*mc^2 + X[2]*mc^3, etc */
     268} PhotCode;
     269
     270typedef struct {
     271  int Ncode;
     272  int Nsecfilt;
     273  int hashcode[0x10000];
     274  int hashNsec[0x10000];
     275  PhotCode *code;
     276} PhotCodeData;
     277
    397278/**** prototypes ****/
    398279
Note: See TracChangeset for help on using the changeset viewer.