objfun_pysiaf_pointing¶
- grizli.jwst_utils.objfun_pysiaf_pointing(theta, ap, xy, pa, ret)[source]¶
Objective function for fitting a
pysiafattitude based on a MAST database footprint- Parameters
- theta(float, float, float)
ra,decandpa_v3at the aperture reference position- ap
pysiaf.Aperture Aperture
- xyarray-like, (2,4)
Footprint from the MAST query, e.g.,
xy = SRegion(footprint).xy[0].T.- pafloat
Position angle of the prime exposure.
- retint
Return behavior
- Returns
- if ret == 1:
- attarray-like
Attitude matrix derived from the inputs
- else:
- residfloat
Sum of squared differences
ap.corners - xyfor optimization