3.2.3. optimalExtraction
Optimal extraction of the 2d echelle spectrum.
This function performs an optimal extraction of a 2d echelle spectrum. The internal flat spectrum extension is used to generate normalized ‘profiles’ that are used as weighting functions for the spectrum that is going to be extracted. The algorithm further checks for outliers and rejects them. This is to prevent contributions from cosmic hits.
3.2.3.1. Parameters
- adinputslist of
AstroData Frames with STRIPES, F_STRIPES, and STRIPES_MASKS extensions as dicts of sparse arrays.
- suffixstr
Suffix to be added to output files.
- darkstr or
AstroData, optional Processed dark frame. If None, queries the calibration database.
- optimal_extraction_fiberslist of int, optional
Fiber numbers (1-5) for optimal extraction. Fibers considered for optimal extraction.
- back_varfloat, optional
Manual background variance for frame.
- full_outputbool
If True, an additional set of intermediate products will be returned / saved.
- penaltyfloat
Scaling penalty factor for mismatch correction between flat field profile and science spectrum during optimal extraction.
- s_clipfloat
Sigma-clipping parameter during optimal extraction.
- read_noisefloat
Read noise (e-). MX default is 1.14.
- gainfloat
Detector gain (e-/ADU). MX default is 2.72.
3.2.3.2. Returns
- list of
AstroData Input frames with optimal and box extracted orders for each fiber together with uncertainties and the bad pixel mask result from the optimal extraction. Extensions added, one per fiber
Nin1-5:REDUCED_ORDERS_FIBER_NOPTIMAL_REDUCED_FIBER_NOPTIMAL_REDUCED_VAR_NBOX_REDUCED_FIBER_NBOX_REDUCED_VAR_NBOX_REDUCED_FLAT_NBPM_FIBER_N
3.2.3.3. Parameter defaults and options
suffix '' Filename suffix
dark None Processed dark
optimal_extraction_fibers None Fiber numbers (1-5) for optimal extraction
full_output False More outputs made
penalty 2.0 scaling penalty factor
s_clip 5.0 sigma-clipping factor
back_var 0.0 background variance
read_noise 1.14 read noise
gain 2.72 gain
3.2.3.4. Algorithm
Todo
add description
3.2.3.5. Issues and Limitations
Todo
add description