3.1.10. stackFramesMXCal
Stack MAROON-X calibration frames with etalon flux scaling.
MX-specific version of stackFrames for calibration frames - changes scaling to average full frame mean to purposely scale by etalon flux and its drift between calibration exposures. This function should not be used to combine MX science frames.
3.1.10.1. Parameters
- adinputslist of
AstroData Any set of 2D.
- suffixstr
Suffix to be added to output files.
- apply_dqbool
Apply DQ mask to data before combining?
- nlow, nhighint
Number of low and high pixels to reject, for the ‘minmax’ method. The way it works is inherited from IRAF: the fraction is specified as the number of high and low pixels, the nhigh and nlow parameters, when data from all the input images are used. If pixels have been rejected by offseting, masking, or thresholding then a matching fraction of the remaining pixels, truncated to an integer, are used. Thus:
nl = n * nlow/nimages + 0.001 nh = n * nhigh/nimages + 0.001
where n is the number of pixels surviving offseting, masking, and thresholding, nimages is the number of input images, nlow and nhigh are task parameters and nl and nh are the final number of low and high pixels rejected by the algorithm. The factor of 0.001 is to adjust for rounding of the ratio.
- operationstr
Combine method.
- reject_methodstr
Pixel rejection method (none, minmax, sigclip, varclip).
- zerobool
Apply zero-level offset to match background levels?
- scalebool
Scale images to the same intensity?
- memoryfloat or None
Available memory (in GB) for stacking calculations.
- statsecstr
Section for statistics.
- separate_extbool
Handle extensions separately?
3.1.10.2. Returns
- list of
AstroData Sky stacked image. This list contains only one element. The list format is maintained so this primitive is consistent with all the others.
3.1.10.3. Raises
- IOError
If the number of extensions in any of the AstroData objects is different.
- IOError
If the shape of any extension in any AstroData object is different.
- AssertError
If any of the .gain() descriptors is None.
- AssertError
If any of the .read_noise() descriptors is None.
3.1.10.4. Parameter defaults and options
suffix '_stack' Filename suffix
apply_dq True Use DQ to mask bad pixels?
statsec None Section for statistics (1-indexed, inclusive-max, x-first)
operation 'mean' Averaging operation
Allowed values:
mean arithmetic mean
wtmean variance-weighted mean
median median
lmedian low-median
reject_method 'sigclip' Pixel rejection method
Allowed values:
none no rejection
minmax reject highest and lowest pixels
sigclip reject pixels based on scatter
varclip reject pixels based on variance array
hsigma 3.0 High rejection threshold (sigma)
Valid Range = [0,inf)
lsigma 3.0 Low rejection threshold (sigma)
Valid Range = [0,inf)
mclip True Use median for sigma-clipping?
max_iters None Maximum number of clipping iterations
Valid Range = [1,inf)
nlow 0 Number of low pixels to reject
Valid Range = [0,inf)
nhigh 0 Number of high pixels to reject
Valid Range = [0,inf)
memory 1.0 Memory available for stacking (GB)
Valid Range = [0.01,inf)
save_rejection_map False Save rejection map?
separate_ext True Handle extensions separately?
scale True Scale images to the same intensity?
zero False Apply additive offsets to images to match intensity?
3.1.10.5. Algorithm
Todo
add description
3.1.10.6. Issues and Limitations
Todo
add description