/* calstis1.h Phil Hodge, 1997 Sept 12: Change sdqflags from unsigned short to short. Phil Hodge, 1997 Dec 11: Include ref and apertab in StisInfo1, and include PhotInfo. Phil Hodge, 1998 June 8: Include obstype, aper_fov, and cdelt in StisInfo1. Delete subarray. Phil Hodge, 1998 July 23: Include sts->bias_or_dark in StisInfo1. Phil Hodge, 1998 July 30: Add one to the length of each string buffer. Replace assoc_typ with wavecal. Phil Hodge, 1998 Sept 24: Remove bias_rej. Phil Hodge, 1998 Oct 6: Include temperature in StisInfo1. Phil Hodge, 1999 Nov 2: Include err_init_bias in StisInfo1. This will either be zero or ccdbias, depending on whether blevcorr has been done or not. */ typedef struct { /* input and output image names */ char input[STIS_LINE+1]; /* input image to be calibrated */ char output[STIS_LINE+1]; /* output calibrated image */ char outblev[STIS_LINE+1]; /* output text file for bias levels */ char rootname[STIS_CBUF+1]; /* root name for set of obs */ /* command-line flags */ int printtime; /* print time after each step? */ int verbose; /* print additional info? */ /* keywords and file names for reference files */ RefFileInfo *refnames; /* info about input image */ char det[STIS_CBUF+1]; /* name of detector */ char aperture[STIS_CBUF+1]; /* aperture name */ char opt_elem[STIS_CBUF+1]; /* name of grating or mirror */ char obsmode[STIS_CBUF+1]; /* e.g. ACCUM or TIMETAG */ char obstype[STIS_CBUF+1]; /* SPECTROSCOPIC or IMAGING */ char aper_fov[STIS_CBUF+1]; /* aperture size */ int detector; /* integer code for detector */ int wavecal; /* true if input file is a wavecal */ int ncombine; /* number previously summed together */ int nimages; /* number of "groups" in file */ int bias_or_dark; /* true if image is a BIAS or DARK */ double exptime; /* exposure time */ short sdqflags; /* serious data quality values */ /* coordinate info */ int bin[2]; /* size of pixel in detector coordinates */ int dispaxis; /* dispersion axis, 1 ==> X, 2 ==> Y */ int dispsign; /* sign of CD1_1 (dispersion), +1 or -1 */ double cdelt[2]; /* pixel size, for imaging type */ /* MAMA-specific info (regarding linearity) */ double global_limit; /* count rate for 10% global nonlinearity */ double tau; /* time constant for global nonlinearity */ double local_limit; /* count rate for 10% local nonlinearity */ float expand; /* radius for flagging local nonlinearity */ /* MAMA-specific info (regarding Doppler shift) */ double globrate; /* global count rate */ double expstart; /* exposure start time (MJD) */ double doppzero; /* Doppler shift zero phase time (MJD) */ double doppmag; /* Doppler shift magnitude (high-res pixels) */ double orbitper; /* Assumed HST orbital period (seconds) */ /* Temperature is used for scaling NUV-MAMA dark. */ double temperature; /* from OM2CAT keyword */ /* CCD-specific info */ char ccdamp[STIS_CBUF+1]; /* CCD amplifier read out (A,B,C,D) */ int ccdgain; /* commanded gain of CCD */ int ccdoffset; /* commanded offset */ int binaxis[2]; /* BINAXIS1, BINAXIS2 from header */ float atodgain; /* actual gain of CCD */ float ccdbias; /* CCD bias offset number */ float err_init_bias; /* bias to subtract for error initialization */ float readnoise; /* readout noise */ float saturate; /* CCD saturation level */ /* calibration flags (switches) */ int doppcorr; /* Doppler convolution needed (flats, etc)? */ int lorscorr; /* convert MAMA data to low-res */ int dqicorr; /* data quality initialization */ int atodcorr; /* analog to digital correction */ int blevcorr; /* subtract bias from overscan */ int biascorr; /* subtract bias image */ int glincorr; /* global nonlinearity correction */ int lflgcorr; /* flag local nonlinearity */ int darkcorr; /* subtract dark image */ int flatcorr; /* apply flat field */ int pfltcorr; /* apply pixel-to-pixel flat */ int dfltcorr; /* apply delta flat */ int lfltcorr; /* apply low-order flat */ int shadcorr; /* correct short exposures for shutter time */ int photcorr; /* add photometry header keyword values */ /* filtcorr is not a switch; it's associated with photcorr */ int filtcorr; /* include filter throughput */ int noisecorr; /* initialize error array? */ int statcorr; /* compute statistics? */ /* calibration images and tables */ RefImage bias; /* bias image */ RefImage dark; /* dark image */ RefImage pflt; /* pixel-to-pixel flat field */ RefImage dflt; /* delta flat */ RefImage lflt; /* low-order flat */ RefImage shad; /* shutter shading correction image */ RefTab bpix; /* bad pixel table */ RefTab ccdpar; /* CCD parameters table */ RefTab mlin; /* MAMA nonlinearity info table */ RefTab atod; /* analog to digital correction table */ RefTab phot; /* photometric throughput table */ RefTab apertab; /* aperture (filter) throughput table */ } StisInfo1; /* This contains the throughput curve (from _pht table) and the aperture (filter) throughput curve (from _apt table), which we use for computing PHOTFLAM, etc. */ typedef struct { /* The first three are from the phottab (_pht). */ int p_nelem; /* size of arrays */ float *p_wl; /* array of wavelengths from _pht */ float *p_thru; /* array of throughputs (QE) */ /* These three are from the apertab (_apt), for filter throughput. */ int f_nelem; /* size of arrays */ double *f_wl; /* array of wavelengths from _apt */ double *f_thru; /* array of filter throughputs */ } PhotInfo;