/* acsinfo.h Warren Hack, 1998 June 10: Initial ACS version. */ # define NAMPS 4 /* Maximum number of amps for a single readout */ /* Structure describing SINGLE CHIP exposure and its reference files */ typedef struct { /* input and output image names */ char input[ACS_LINE+1]; /* input image to be calibrated */ char output[ACS_LINE+1]; /* output calibrated image */ char rootname[ACS_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[ACS_CBUF+1]; /* name of detector */ char aperture[ACS_CBUF+1]; /* aperture name */ char filter1[ACS_CBUF+1]; /* name of filter used */ char filter2[ACS_CBUF+1]; /* name of filter used */ /* char obsmode[ACS_CBUF+1]; * e.g. ACCUM or TIMETAG */ int detector; /* integer code for detector */ int chip; int ncombine; /* number previously summed together */ int nimsets; /* number of "groups" in file */ double exptime; /* exposure time */ int members; /* # of members associated with this exposure */ char mtype[SZ_STRKWVAL+1]; /* Role of exposure in association */ short sdqflags; /* serious data quality values */ /* coordinate info */ int subarray; /* is current image a subarray? */ int bin[2]; /* size of pixel in detector coordinates */ double offsetx, offsety; /* LTV1,LTV2 for readout */ /* 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 */ double globrate; /* global count rate */ double expstart; /* exposure start time (MJD) */ /* CCD-specific info */ char ccdamp[NAMPS+1]; /* CCD amplifier read out (A,B,C,D) */ int ccdgain; /* commanded gain of CCD */ int ccdoffset[NAMPS]; /* commanded offset for each amp of CCD */ int binaxis[2]; /* BINAXIS1, BINAXIS2 from header */ float ccdbias; /* CCD bias offset number */ float atodgain[NAMPS]; /* actual gain for each amp used to read CCD */ float readnoise[NAMPS]; /* readout noise for each amp used to read chip*/ int ampx; /* first column affected by amps on 2/4amp readout*/ int ampy; /* first row affected by amps on 2/4amp readout*/ float saturate; /* CCD saturation level */ int trimx[2]; /* Width of overscan to trim off ends of each line */ int trimy[2]; /* Amount of overscan to trim off ends of each col */ int vx[2]; int vy[2]; /* Coordinates of virtual overscan region to use */ int biassecta[2]; /* Columns to use for leading overscan region */ int biassectb[2]; /* Columns to use for trailing overscan region */ float flashdur; /* duration of post-flash (in seconds) */ char flashstatus[ACS_CBUF+1]; /* status of post-flash exposure */ /* calibration flags (switches) for ACSCCD*/ int dqicorr; /* data quality initialization */ int atodcorr; /* analog to digital correction */ int blevcorr; /* subtract bias from overscan */ int biascorr; /* subtract bias image */ int flashcorr; /* subtract post-flash image */ int noisecorr; /* initialize error array? (yes) */ /* calibration flags (switches) for ACS2D*/ 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 statcorr; /* compute statistics? (yes) */ /* calibration images and tables for ACSCCD*/ RefImage bias; /* bias image */ RefImage flash; /* post-flash image */ RefTab bpix; /* bad pixel table */ RefTab ccdpar; /* CCD parameters table */ RefTab oscn; /* Overscan parameters table */ RefTab atod; /* analog to digital correction table */ /* calibration images and tables for ACS2D*/ 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 mlin; /* MAMA nonlinearity info table */ RefTab phot; /* photometric throughput table */ RefTab apertab; /* aperture (filter) throughput table */ } ACSInfo; /* 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_thru; /* array of throughputs (QE) */ float *p_wl; /* array of wavelengths from _pht */ /* These three are from the apertab (_apt), for filter throughput. */ int f_nelem; /* size of arrays */ double *f_thru; /* array of filter throughputs */ double *f_wl; /* array of wavelengths from _apt */ } PhotInfo; /* Expanded form of SingleGroupLine to represent an image section */ typedef struct { char *filename; /* Name of input file */ Hdr *globalhdr; /* header information */ int group_num; /* EXTVER number */ int line_num; /* line number of FIRST line loaded */ int nlines; /* Number of lines in section */ int npix; /* Number of pixels per line */ Bool phdr_loaded; /* Global Header already loaded? */ SciHdrLine *sci; /* Array of science data lines */ ErrHdrLine *err; /* Array of error data lines */ DQHdrLine *dq; /* Array of DQ data lines */ } ACSsect;