tweak_flt¶
- grizli.prep.tweak_flt(files=[], max_dist=0.4, threshold=3, min_flux_radius=0.5, max_flux_radius=5, min_nexp=2, max_pixels=1.0, max_nmask=0, verbose=True, tristars_kwargs={'auto_keep': 3, 'auto_limit': 3, 'auto_transform': None, 'ba_max': 0.9, 'ignore_rot': True, 'ignore_scale': True, 'maxKeep': 10, 'size_limit': [5, 1800]}, ref_exp=0, use_sewpy=False, master_radec=None, make_figures=False)[source]¶
Refine shifts of FLT files
- Parameters
- fileslist
List of flt filenames
- max_distfloat
Maximum shift distance to allow
- thresholdfloat
Source detection threshold for
sep.extract
- min_flux_radius, max_flux_radiusfloat
Range of
FLUX_RADIUS
values to allow- min_nexpint
Minimum number of exposures contributing to a source
- max_pixelsfloat
Maximum pixel offset relative to median to allow for sources in each exposure catalog
- max_nmaskfloat
Maximum value of
MASK_APER_0
to allow, i.e., to remove sources with central saturated pixels- verbosebool
Status messages
- tristars_kwargsdict
Keyword arguments for
tristars.match.match_catalog_tri
- ref_expint
Index of the exposure to use as the reference for the tweak shifts. If < 0, then use the exposure with the longest integration time.
- use_sewpybool
Use
sewpy
for source detection (deprecated)- master_radecstr
Filename of a list of reference
(ra,dec)
positions to match. If not provided, then align to the first exposure of the list- make_figuresint, bool
If True, then make a diagnostic figure with the shift residuals. If 2, then make individual
tristars
match figures as well.
- Returns
- ref_wcs
WCS
Reference WCS (WCS of the first file in
files
)- shift_dictdict
Shift dictionary with keys from
files
and values like[xshift, yshift, rot, scale, N, rms]
. Note that only shifts are fit, sorot = 0.
andscale = 1.
.N
is the number of sources used for the fit.- catslist
List of tuples of the catalog and WCS derived from each exposure
- figNone, Figure
Returns the figure object if
make_figures
tests True
- ref_wcs