Fiber-flat

Mode:

Fiber-flat

Usage:

Offline, Online

Key:

MegaraFiberFlatImage

Product:

MasterFiberFlat

Recipe:

FiberFlatRecipe

Recipe input:

FiberFlatRecipeInput

Recipe result:

FiberFlatRecipeResult

In fiber-fed spectrographs such as MEGARA each optical fiber behaves like a different optical system, and therefore, its optical transmission is different and individual, with different wavelength dependence. In the Preliminary Design phase this mode was named “Lamp fiber flat”.

Requirements

This observing mode should include the actions to calibrate the low-frequency variations in transmission in between fibers and as a function of wavelength in MEGARA. A fiber-flat should be used to perform this correction and is the result of illuminating the instrument focal plane with a flat source that can be either a continuum (halogen) lamp that is part of the GTC Instrument Calibration Module (ICM) or the twilight sky. The fiber-flat observing mode discussed here assumes that the focal plane is illuminated with a halogen lamp located at the ICM. The ICM beam has to have the same focal ratio arriving to the first MEGARA optical element (the MEGARA telecentricity-correction lens in this case) simulating as much as possible the real GTC mirrors beam at F-C.

These fiber-flat images are also used to trace the fiber spectra on the detector for each specific spectral setup. Finally, they are also useful to verify the status of the optical link between the F-C focal plane and the platform where the spectrographs are located.

This mode requires having the ICM turned on, one of the halogen lamps at the ICM also turned on, to configure the focal-plane cover (at least one of the sides should be open), to have the instrument shutter open, to move the pseudo-slit to that of the instrument mode of choice, 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 and to expose a certain time and to readout the detector a series of exposures, being this series the fiber-flat image set.

Procedure

The “User” processes an observing block obtained in the observing mode Fiber-flat. This mode includes the required actions to obtain a master fiber-flat field. The master fiber-flat field generated is used in other stages of the data processing.

Products

Fiber-flat image sets are to be obtained both as part of the activities related to the verification of the instrument status and for processing data for scientific exploitation.

Recipe, inputs and results

class megaradrp.recipes.calibration.flat.FiberFlatRecipe(*args, **kwargs)

Process FIBER_FLAT images and create MASTER_FIBER_FLAT product.

This recipe process a set of continuum flat images obtained in Fiber Flat mode and returns the master fiber flat product The recipe also returns the result of processing the input images up to slitflat correction. and the result RSS of the processing up to wavelength calibration.

See also

megaradrp.products.MasterFiberFlat

description of MasterFiberFlat product

megaradrp.processing.aperture

aperture extraction

megaradrp.processing.wavecalibration

resampling for wavelength calibration

Notes

Images provided in obresult are trimmed and corrected from overscan, bad pixel mask (if master_bpm is not None), bias and dark current (if master_dark is not None) and corrected from pixel-to-pixel flat if master_slitflat is not None. Images thus corrected are the stacked using the median.

The result of the combination is saved as an intermediate result, named ‘reduced_image.fits’. This combined image is also returned in the field reduced_image of the recipe result.

The apertures in the 2D image are extracted, using the information in master_apertures and resampled accoding to the wavelength calibration in master_wlcalib. The resulting RSS is saved as an intermediate result named ‘reduced_rss.fits’. This RSS is also returned in the field reduced_rss of the recipe result.

To normalize the master_fiberflat, each fiber is divided by a smoothed version (using a Savitzky-Golay filter) of the average of the valid fibers. Finally, all the pixels with information are fiiled with ones. This RSS image is returned in the field master_fiberflat of the recipe result.

class FiberFlatRecipeInput(*args, **kwds)

FiberFlatRecipeInput documentation.

Attributes:
extraction_offsetListOfType, requirement, optional, default=[0.0]

Offset traces for extraction

master_aperturesMultiType, requirement

Apertures information for extraction

master_biasMasterBias, requirement

Master BIAS image

master_bpmMasterBPM, requirement, optional

Master Bad Pixel Mask

master_darkMasterDark, requirement, optional

Master DARK image

master_slitflatMasterSlitFlat, requirement, optional

Master slit flat calibration

master_wlcalibWavelengthCalibration, requirement

Wavelength calibration table

methodstr, requirement, optional, default=median

Combination method

method_kwargsdict, requirement, optional

Arguments for combination method

obresultObservationResultType, requirement

Observation Result

smoothing_windowint, requirement, optional, default=31

Window for smoothing (must be odd)

class FiberFlatRecipeResult(*args, **kwds)

FiberFlatRecipeResult documentation.

Attributes:
master_fiberflatMasterFiberFlat, product
reduced_imageProcessedFrame, product
reduced_rssProcessedRSS, product
RecipeInput

alias of FiberFlatRecipeInput

RecipeResult

alias of FiberFlatRecipeResult

run(rinput)

Execute the recipe.

Parameters:
rinputRecipeInput
Returns:
RecipeResult
set_base_headers(hdr)

Set metadata in FITS headers.