trace_from_wcs
- jwst.extract_1d.source_location.trace_from_wcs(exp_type, shape, bounding_box, wcs_ref, source_x, source_y, dispaxis)[source]
Calculate a source trace from WCS.
The source trace is calculated by projecting a fixed source positions onto detector pixels, to get a source location at each dispersion element. For MIRI LRS fixed slit and NIRSpec modes, this will be a curved trace, using the sky or slit frame as appropriate. For all other modes, a flat trace is returned, containing the cross-dispersion position at all dispersion elements.
- Parameters:
- exp_typestr
Exposure type for the input data.
- shapetuple of int
2D shape for the full input data array, (ny, nx).
- bounding_boxtuple
A pair of tuples, each consisting of two numbers. Represents the range of useful pixel values in both dimensions, ((xmin, xmax), (ymin, ymax)).
- wcs_ref
WCS
WCS for the input data model, containing sky and detector transforms, forward and backward.
- source_xfloat
X pixel coordinate for the target.
- source_yfloat
Y pixel coordinate for the target.
- dispaxisint
Dispersion axis.
- Returns:
- tracendarray of float
Pixel positions in the cross-dispersion direction of the trace for each dispersion pixel.