find_direct_grism_pairs¶
- grizli.prep.find_direct_grism_pairs(direct={}, grism={}, check_pixel=[507, 507], toler=0.1, key='A', same_visit=True, log=True)[source]¶
Compute pairs of direct and grism exposures
For each grism exposure, check if there is a direct exposure that matches the WCS to within
toler
pixels. If so, copy that WCS directly.- Parameters
- directdict
Direct image visit dictionary (
product
,files
)- grismdict
Grism image visit dictionary (
product
,files
)- check_pixel(float, float)
Reference pixel to use for comparing WCS
- tolerfloat
Tolerance in pixels for assigning matched exposure pairs
- keystr
WCS key of the direct image WCS
- same_visitbool
Require that matches are from same program / visit as defined by the first 6 characters in the image filenames
- logbol
Write function call to
grizli.utils.LOGFILE
- Returns
- grism_matchesdict
Dictionary of the matched exposures, where the keys are filenames of direct images and the values are lists of the computed associated grism exposures