soxspipe.recipes.soxs_mflat¶
generate a single normalised master flat-field frame
- Author
David Young & Marco Landoni
- Date Created
September 16, 2020
Module Contents¶
Classes¶
generate a single normalised master flat-field frame |
Functions¶
API¶
- class soxspipe.recipes.soxs_mflat.soxs_mflat(log, settings=False, inputFrames=[], verbose=False, overwrite=False, command=False, debug=False, turnOffMP=False)[source][source]¶
Bases:
soxspipe.recipes.base_recipe.base_recipegenerate a single normalised master flat-field frame
Key Arguments
log– loggersettings– the settings dictionaryinputFrames– input fits frames. Can be a directory, a set-of-files (SOF) file or a list of fits frame paths.verbose– verbose. True or False. Default Falseoverwrite– overwrite the product file if it already exists. Default Falsecommand– the command called to run the recipedebug– generate debug plots. Default FalseturnOffMP– turn off multiprocessing. True or False. Default False. If True, multiprocessing will be turned off and the recipe will run in serial. This is useful for debugging.
Usage
from soxspipe.recipes import soxs_mflat recipe = soxs_mflat( log=log, settings=settings, inputFrames=fileList ) mflatFrame = recipe.produce_product()
Initialization
- calibrate_frame_set()[source][source]¶
given all of the input data calibrate the frames by subtracting bias and/or dark
Return:
calibratedFlats– the calibrated frames
- find_uvb_overlap_order_and_scale(dcalibratedFlats, qcalibratedFlats)[source][source]¶
find uvb order where both lamps produce a similar flux. This is the order at which the 2 lamp flats will be scaled and stitched together
Key Arguments:
qcalibratedFlats– the QTH lamp calibration flats.dcalibratedFlats– D2 lamp calibration flats
Return:
order– the order number where the lamp fluxes are similar
Usage:
overlapOrder = self.find_uvb_overlap_order_and_scale(dcalibratedFlats=dcalibratedFlats, qcalibratedFlats=qcalibratedFlats)
- mask_low_sens_pixels(frame, orderTablePath, returnMedianOrderFlux=False, writeQC=True)[source][source]¶
add low-sensitivity pixels to bad-pixel mask
Key Arguments:
frame– the frame to work onorderTablePath– path to the order tablereturnMedianOrderFlux– return a table of the median order fluxes. Default False.writeQC– add the QCs to the QC table?
Return:
frame– with BPM updated with low-sensitivity pixelsmedianOrderFluxDF– data-frame of the median order fluxes (ifreturnMedianOrderFluxis True)
- normalise_flats(inputFlats, orderTablePath, firstPassMasterFlat=False, lamp='')[source][source]¶
determine the median exposure for each flat frame and normalise the flux to that level
Key Arguments:
inputFlats– the input flat field framesorderTablePath– path to the order tablefirstPassMasterFlat– the first pass of the master flat. Default Falselamp– a lamp tag for QL plots
Return:
normalisedFrames– the normalised flat-field frames (CCDData array)
- produce_product()[source][source]¶
generate the master flat frames updated order location table (with egde detection)
Return:
productPath– the path to the master flat frame
- stitch_uv_mflats(medianOrderFluxDF, orderTablePath)[source][source]¶
return a master UV-VIS flat frame after slicing and stitch the UV-VIS D-Lamp and QTH-Lamp flat frames
Key Arguments:
medianOrderFluxDF– data frame containing median order fluxes for D and QTH framesorderTablePath– the original order table paths from order-centre tracing
Return:
stitchedFlat– the stitch D and QTH-Lamp master flat frame
Usage:
mflat = self.stitch_uv_mflats(medianOrderFluxDF)