objfun_pysiaf_pointing

grizli.jwst_utils.objfun_pysiaf_pointing(theta, ap, xy, pa, ret)[source]

Objective function for fitting a pysiaf attitude based on a MAST database footprint

Parameters
theta(float, float, float)

ra, dec and pa_v3 at the aperture reference position

appysiaf.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 - xy for optimization