/* stis.h generic header for calstis */ # define STIS_CBUF 25 /* small buffer for e.g. rootname */ # define STIS_FNAME 129 # define STIS_LINE 257 # define STIS_FITS_REC 81 /* Three extensions per SingleGroup. */ # define EXT_PER_GROUP 3 /* Integer codes for string-valued header keywords. */ /* Flag values for calibration switches. */ # define DUMMY (-1) # define OMIT 0 # define PERFORM 1 # define COMPLETE 2 # define SKIPPED 3 # define IGNORED 4 /* e.g. SHADCORR when the exposure time is zero */ /* Codes to specify whether a reference file exists or not. */ # define EXISTS_YES 1 # define EXISTS_NO 0 # define EXISTS_UNKNOWN (-1) /* For a reference file name, this string means that a name was intentionally not given. */ # define NOT_APPLICABLE "n/a" /* nearest integer function */ # define NINT(x) ((x >= 0.) ? (int) (x + 0.5) : (int) (x - 0.5)) /* Codes for goodPedigree in RefImage and RefTab to specify whether pedigree is good, dummy, or not specified. */ # define GOOD_PEDIGREE 1 # define DUMMY_PEDIGREE 0 # define PEDIGREE_UNKNOWN (-1) /* Possible values for detector. */ # define UNKNOWN_DETECTOR (-1) # define NUV_MAMA_DETECTOR 1 # define FUV_MAMA_DETECTOR 2 # define CCD_DETECTOR 3 /* These four are possible values of disp_type. */ # define GRATING_DISP 1 /* first-order grating */ # define PRISM_DISP 2 # define ECHELLE_DISP 3 # define RECTIFIED 4 /* already 2-D rectified */ /* prism dispersion diverges near this wavelength */ # define MAX_PRISM_WAVELENGTH (6000.) /* These two are for flagging wavecal shifts as undefined. UNDEFINED_SHIFT is the value that CalStis4 puts in the header if the shift was not determined. Any shift as large as UNREASONABLE_SHIFT must be bad. Note that this is smaller in absolute value than UNDEFINED_SHIFT, so it can be used to check for good shifts using: if (fabs (shift) < UNREASONABLE_SHIFT) ... */ # define UNDEFINED_SHIFT (-9999.) # define UNREASONABLE_SHIFT (1000.) /* A reference image. */ typedef struct { char name[STIS_LINE]; /* name of image */ char pedigree[STIS_FITS_REC]; /* value of pedigree keyword */ char descrip[STIS_FITS_REC]; /* value of descrip keyword */ int exists; /* does reference image exist? */ int goodPedigree; /* DUMMY_PEDIGREE if dummy */ } RefImage; /* A reference table. */ typedef struct { char name[STIS_LINE]; /* name of table */ char pedigree[STIS_FITS_REC]; /* value of pedigree (header or row) */ char descrip[STIS_FITS_REC]; /* value of descrip from header */ char descrip2[STIS_FITS_REC]; /* value of descrip from row */ int exists; /* does reference table exist? */ int goodPedigree; /* DUMMY_PEDIGREE if dummy */ } RefTab; /* This section is for saving the names of reference files. */ # define STIS_KEYWORD 10 typedef struct ref *RefFileInfoPtr; typedef struct ref { char keyword[STIS_KEYWORD]; char filename[STIS_FITS_REC]; RefFileInfoPtr next; } RefFileInfo;