Bad-pixels mask
- Mode:
Bad-pixels mask
- Usage:
Offline, Online
- Key:
MegaraBadPixelMask
- Product:
MasterBPM
- Recipe:
- Recipe input:
- Recipe result:
Although science-grade CCD detectors show very few bad pixels / bad columns there will be a number of pixels (among the ~17 Million pixels in the MEGARA CCD) whose response could not be corrected by means of using calibration images such as dark frames or flat-field images. These pixels, commonly called either dead or hot pixels, should be identified and masked so their expected signal could be derived using dithered images or, alternatively, locally interpolated. While a bad-pixels mask will be generated as part of the AIV activities, an increase in the number of such bad pixels with time is expected. Therefore, we here define an observing mode that the observatory staff could use to generate an updated version of the bad-pixels masks should the number of bad pixels increase significantly.
In the case of fiber-fed spectrographs the fiber flats (either lamp or twilight flats) are not optimal for generating bad-pixels masks as these leave many regions in the CCD not exposed to light. The whole CCD should be illuminated at different intensity levels in order to clearly identify both dead and hot pixels.
Requirements
In the case of MEGARA we will offset the pseudo-slit from its optical focus position to ensure that the gaps between fibers are also illuminated when a continuum (halogen) lamp at the ICM is used. The NSC zemax model of the spectrograph indicates that by offsetting 3mm the pseudo-slit we would already obtain a homogenous illumination of the CCD. A series of images with different count levels would be obtained.
This mode requires having the ICM halogen lamp on, the instrument shutter open, to move the pseudo-slit to the open position, to configure the VPH wheel mechanism in order to select the grating to be used, to move the focusing mechanism to the position pre-defined for the specific VPH of choice but offset by 3mm and to expose a certain time and to readout the detector a series of exposures, being this series the slit-flat image set. Note that only one Bad-pixels mask will be used for all spectral setups. The specific choice for the VPH will depend on the actual color of the ICM halogen lamp and on the actual response of the VPHs. In principle, we should choose the VPH at the peak of the lamp spectral energy distribution but we should also consider the fact that the VPH should have the flattest spectral response possible. We call this specific VPH the “BPM VPH”. LR-R and LR-I are currently the best candidates for finally being the BPM VPH.
Procedure
The “User” processes an observing block obtained in the observing mode Bad-pixels mask. This mode includes the required actions to obtain a bad-pixel mask. The master bad pixel mask generated is used in other stages of the data processing.
Products
This Bad-pixels mask observing mode will be used only sporadically as it is considered part of the “System Calibration Modes”.
A bidimensional mask of bad pixels, a QA flag, a text log file of the processing and a structured text file with information about the processing.
Recipe, inputs and results
- class megaradrp.recipes.calibration.bpm.BadPixelsMaskRecipe(*args, **kwargs)
Process defocussed FIBER_FLAT images and create MASTER_BPM product.
This recipe process a set of defocused continuum flat images obtained in Bad-pixels mask mode and returns the master bad-pixels mask product.
See also
numina.array.cosmetics.ccdmask
algorithm to select bad-pixels
megaradrp.types.MasterBPM
description of MasterBPM product
Notes
Images provided in obresult are trimmed and corrected from overscan, bias and dark current (if master_dark is not None). The first half of the images are the stacked using the median and saved as intermediate result ‘reduced_image_1.fits’. The second half is also combined and saved as intermediate result ‘reduced_image_2.fits’
These two images are passed to the ccdmask function, that selects bad-pixels by finding outliers in the ratio of the two images.
The mask is returned in the field master_bpm of the recipe result.
- class BadPixelsMaskRecipeInput(*args, **kwds)
BadPixelsMaskRecipeInput documentation.
- Attributes:
- master_biasMasterBias, requirement
Master BIAS image
- master_darkMasterDark, requirement, optional
Master DARK image
- obresultObservationResultType, requirement
Observation Result
- class BadPixelsMaskRecipeResult(*args, **kwds)
BadPixelsMaskRecipeResult documentation.
- Attributes:
- master_bpmMasterBPM, product
- RecipeInput
alias of
BadPixelsMaskRecipeInput
- RecipeResult
alias of
BadPixelsMaskRecipeResult
- set_base_headers(hdr)
Set metadata in FITS headers.
- validate_input(recipe_input)
Validate input of the recipe.
The number of frames in recipe_input.obresult must be even.
- Raises:
- numina.exceptions.ValidationError
If the number of frames in obresult is odd
- class BadPixelsMaskRecipe.BadPixelsMaskRecipeInput(*args, **kwds)
BadPixelsMaskRecipeInput documentation.
- Attributes:
- master_biasMasterBias, requirement
Master BIAS image
- master_darkMasterDark, requirement, optional
Master DARK image
- obresultObservationResultType, requirement
Observation Result
- class BadPixelsMaskRecipe.BadPixelsMaskRecipeResult(*args, **kwds)
BadPixelsMaskRecipeResult documentation.
- Attributes:
- master_bpmMasterBPM, product