vircam_linearity_analyse
[Recipes]
- Name:
- vircam_linearity_analyse
- Purpose:
- Use a series of dome flat exposures to work out the linearity coeffients and a bad pixel mask for each data channel.
- Description:
- A series of dome flat exposures is given along with a series of dark frames. For each dome exposure there must be at least one dark frame with the matching exposure parameters. The first step is to dark correct each of the dome flat exposures, but only as many as we need to form the bad pixel mask. Bad pixels are defined by forming a master flat and then flat field correcting each of the input images. Any pixels that deviate from the median by a threshold amount are marked as discordant. If they are discordant on more than a quarter of the input images, then they are officially designated as 'bad'. Next the exposure and reset time information for each dome flat is used to map out the linearity distortion for each data channel. The exact algorithm is described in section 2 of the DRLD. A new channel table is the output.
- Language:
- C
- Parameters:
- nord (int): The order of the polynomial to be used to map the linearity. It's worth noting that with this algorithm, there is no zeroth order coeffient. So the number of coefficients is equal to the polynomial order.
- lthr (float): The lower threshold for defining a bad pixel. Each input dome flat will be divided by a mean dome flat and normalised to 1. Values in this ratio map that fall below this threshold number of sigma will be considered bad
- hthr (float): The upper threshold for defining a bad pixel. Each input dome flat will be divided by a mean dome flat and normalised to 1. Values in this ratio map that fall above this threshold number of sigma will be considered bad
- maxbpmfr (int) The maximum number of flat frames needed to do the BPM calculation
- adjust (bool) If set to TRUE, then the statistics of the linearity sequence will be adjusted to account for drift in the input light source. This will require a monitor sequence to be done.
- diagnostic (bool) If set to TRUE, then some FITS tables will be written out with diagnostic curves for each image and channel in the linearity sequence. If a monitor sequence is being used, then a separate FITS file with data for the monitor sequence will also be generated.
- ext (int): The image extension of the input files to be done on this run. If all of the extensions are to be processed, then this should be set to zero.
- Input File Types:
- The following list gives the file types that must appear in the SOF file. The absence of any of them is an error. The word in bold is the DO category value.
- DARK_LINEARITY (required): Input raw dark frames. There must be one series of these for each dome flat.
- FLAT_LAMP_LINEARITY (required): Raw dome flat exposures.
- CHANNEL_TABLE_INIT (required): An initial channel table to be used to delimit the location of each data channel on each chip.
- DARK_LINEARITY_CHECK (optional): Input raw dark frames with the same exposure parameters as the monitor flats.
- FLAT_LAMP_CHECK (optional): Raw dome flat exposures done with the monitor exposure parameters.
- Output Products:
- The following list gives the output data products that are generated by this recipe. The word in bold gives the DPR CATG keyword value for each product:
- The output channel table. The exact contents of the table are described in the VIRCAM Data Reduction Library Design Document (MASTER_CHANNEL_TABLE).
- An output bad pixel mask (MASTER_BPM)
- If requested a table of diagnostic curves for the linearity sequence (LINEARITY_SEQ_DIAG)
- If requested a table of diagnostic curves for the monitor sequence (LINEARITY_CHECK_DIAG)
- Output QC Parameters:
- LINEARITY The median linearity in percentage at 10000 ADUs
- LINERROR The median linearity error in percentage at 10000 ADUs
- SCREEN_TOTAL The total % variation in the screen light source over the complete monitor sequence
- SCREEN_STEP The maximum % variation in the screen light source between two exposures in the monitor sequence.
- BAD_PIXEL_STAT The fraction of pixels that are considered to be bad
- BAD_PIXEL_NUM The number of pixels that are considered to be bad
- Notes:
- None
- Fatal Error Conditions:
- NULL input frameset
- Input frameset headers incorrect meaning that RAW and CALIB frame can't be distinguished
- No dark or dome frames in the input frameset
- No channel table in input frameset
- Data taken with NDIT != 1
- Unable to save data products
- Non-Fatal Error Conditions:
- Not enough dome flats in the series for a requested polynomial order. The order is adjusted downwards.
- Conditions Leading To Dummy Products:
- Dark/dome frame image extensions wouldn't load.
- Channel table fits table extension wouldn't load, won't verify or is flagged as a dummy
- The detector for the current image extension is flagged dead
- Linearity routine failed.
- Author:
- Jim Lewis, CASU
- Code Reference:
- vircam_linearity_analyse.c
Generated on Wed Apr 10 04:01:58 2013 for VIRCAM Pipeline by
1.5.1