3.1.12. stackFlats

Stack MAROON-X flat field frames.

A simplified DRAGONS primitive that reproduces the legacy make_master_flat.py.

3.1.12.1. Parameters

adinputslist of AstroData

Input frames to be combined

operationstr

Combine method (default: ‘mean’)

reject_methodstr

Rejection method (default: ‘sigclip’)

scalebool

Whether to scale images (default: True)

3.1.12.2. Returns

list of AstroData

Combined output frame

3.1.12.3. 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            5                    Maximum number of clipping iterations
     Valid Range = [1,inf)
nlow                 1                    Number of low pixels to reject
     Valid Range = [0,inf)
nhigh                1                    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                False                Scale images to the same intensity?
zero                 False                Apply additive offsets to images to match intensity?
stream               'main'               Stream name of flats to combine
scale_mode           'first_frame'        Scaling method for frames

3.1.12.4. Algorithm

Todo

add description

3.1.12.5. Issues and Limitations

Todo

add description