WfcWrapper
- class acstools.findsat_mrt.WfcWrapper(image_file, extension=None, binsize=None, ignore_flags=[4096, 8192, 16384], preprocess=True, execute=False, **kwargs)
Bases:
TrailFinderWrapper for
TrailFinderdesigned specifically for ACS/WFC data.This class enables quick reading and preprocessing of standard full-frame ACS/WFC images.
Note
This class is not designed for use with subarray images.
- Parameters:
- image_filestr
ACS/WFC data file to read. Should be a FITS file.
- extensionint, optional
Extension of input file to read. This keyword is required if the input image is an FLC/FLT file. The default is
None.- binsizeint or
None, optional - ignore_flagslist of int
See
ignore_flags. Default is[4096, 8192, 16384].- preprocessbool, optional
Flag to run all the preprocessing steps (bad pixel flagging, background subtraction, rebinning). The default is
True.- executebool, optional
Flag to run the entire
TrailFinderpipeline. The default isFalse.- **kwargsdict, optional
Additional keyword arguments for
TrailFinder.
- Raises:
- ValueError
Image is subarray, or unrecognized image extension or type.
Attributes Summary
Amount the input data should be binned by.
DQ flags that are ignored when flagging bad pixels.
Methods Summary
Mask bad pixels.
rebin()Rebin the image array by modifying
self.imagein-place.Runs all the image preprocessing steps in the following order:
Subtract a median background from the image, ignoring NaNs, where
self.imageis modified in-place.update_dq([dqval, verbose])Update DQ array with the satellite trail mask (
self.mask) usingacstools.utils_findsat_mrt.update_dq().Attributes Documentation
- binsize
Amount the input data should be binned by.
- ignore_flags
DQ flags that are ignored when flagging bad pixels. Only relevant for FLT/FLC files.
Methods Documentation
- mask_bad_pixels()
Mask bad pixels. This uses
ignore_flags(for FLC/FLT), so update it first, if needed.Bad pixels are replaced with NaN by modifying
self.imagein-place. This uses the bitmask arrays for FLC/FLT images, and weight arrays for DRC/DRZ images.
- rebin()
Rebin the image array by modifying
self.imagein-place. The binning in the x and y direction are identical. This usesbinsize, so update it first, if needed.
- run_preprocess()
Runs all the image preprocessing steps in the following order:
See the documentation for methods above for more details.
- subtract_background()
Subtract a median background from the image, ignoring NaNs, where
self.imageis modified in-place. Bad pixels should first be handled viamask_bad_pixels()before running this.
- update_dq(dqval=16384, verbose=True)
Update DQ array with the satellite trail mask (
self.mask) usingacstools.utils_findsat_mrt.update_dq(). The file inself.image_fileis updated for this operation, particularly the DQ extension associated withself.extension.Note
This routine only works on FLC/FLT images.
- Parameters:
- dqvalint, optional
DQ value to use for the trail. Default value of 16384 is tailored for ACS/WFC.
- verbosebool, optional
Print extra information to the terminal.