focalplane_to_altaz

specsim.transform.focalplane_to_altaz(x, y, alt0, az0, platescale=1)[source] [edit on github]

Convert focal plane (x,y) coordinates to local (alt,az) coordinates.

This is the inverse of altaz_to_focalplane():

>>> scale = 200 * u.mm / u.deg
>>> alt0, az0 = 45 * u.deg, 0 * u.deg
>>> x, y = 4 * u.mm, -2 * u.mm
>>> alt, az = focalplane_to_altaz(x, y, alt0, az0, scale)
>>> x, y = altaz_to_focalplane(alt, az, alt0, az0, scale)
>>> print('X = %.2f mm, Y = %.2f mm' % (x.to(u.mm).value, y.to(u.mm).value))
X = 4.00 mm, Y = -2.00 mm

Consult that function’s documentation for details.

Parameters:
xastropy.units.Quantity

Target x position(s) in the focal plane with +x increasing eastwards along the azimuth direction. The input units must be such that x / platescale is an angle.

yastropy.units.Quantity

Target y position(s) in focal plane with +y increasing towards the zenith along the altitude direction. The input units must be such that y / platescale is an angle.

alt0astropy.coordinates.Angle

Boresight altitude angle(s) above the horizon.

az0astropy.coordinates.Angle

Boresight azimuthal angle(s) east of north.

platescaleastropy.units.Quantity

Conversion from angular separation relative to the boresight to the output focal plane coordinates.

Returns:
tuple

Pair alt,az of focal-plane coordinates expressed as astropy.units.Angle objects, with alt measured above the horizon and az increasing eastwards of north. The output arrays have the same shapes, given by np.broadcast(x, y, alt0, az0).