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:
- x
astropy.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 / platescaleis an angle.- y
astropy.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 / platescaleis an angle.- alt0
astropy.coordinates.Angle Boresight altitude angle(s) above the horizon.
- az0
astropy.coordinates.Angle Boresight azimuthal angle(s) east of north.
- platescale
astropy.units.Quantity Conversion from angular separation relative to the boresight to the output focal plane coordinates.
- x
- Returns:
tuplePair alt,az of focal-plane coordinates expressed as
astropy.units.Angleobjects, with alt measured above the horizon and az increasing eastwards of north. The output arrays have the same shapes, given bynp.broadcast(x, y, alt0, az0).