HammerAitoffProjection

class sofia_redux.scan.coordinate_systems.projection.hammer_aitoff_projection.HammerAitoffProjection[source]

Bases: CylindricalProjection

Initialize a Hammer-Aitoff projection.

The Hammer-Aitoff projection is an equal-area cylindrical projection where the graticule takes the form of an ellipse, and is suitable for mapping on a small scale. It is a modified azimuthal projection where the central meridian is a straight line, half the length of the projected equator.

Methods Summary

gamma(theta, phi)

Return the gamma factor.

get_fits_id()

Return the FITS ID for the projection.

get_full_name()

Return the full name of the projection.

get_offsets(theta, phi[, offsets])

Get the offsets given theta and phi.

get_phi_theta(offset[, phi_theta])

Return the phi (longitude) and theta (latitude) coordinates.

z2(offset)

Return the Z2 factor for an offset.

Methods Documentation

classmethod gamma(theta, phi)[source]

Return the gamma factor.

Gamma is used during the forward projection and is given by:

gamma = sqrt(2 / (1 + cos(theta) + cos(phi/2)))

Parameters:
thetafloat or units.Quantity or numpy.ndarray
phifloat or units.Quantity or numpy.ndarray
Returns:
float or numpy.ndarray
classmethod get_fits_id()[source]

Return the FITS ID for the projection.

Returns:
str
classmethod get_full_name()[source]

Return the full name of the projection.

Returns:
str
classmethod get_offsets(theta, phi, offsets=None)[source]

Get the offsets given theta and phi.

Takes the theta (latitude) and phi (longitude) coordinates about the celestial pole and converts them to offsets from a reference position. For the Hammer projection, this is given by:

dx = 2 * cos(theta) * sin(phi/2) * gamma dy = sin(theta) * gamma

where

gamma = sqrt(2) / sqrt(1 + cos(theta) * cos(phi/2))

Parameters:
thetaunits.Quantity

The theta angle.

phiunits.Quantity

The phi angle.

offsetsCoordinate2D, optional

An optional coordinate system in which to place the results.

Returns:
offsetsCoordinate2D
classmethod get_phi_theta(offset, phi_theta=None)[source]

Return the phi (longitude) and theta (latitude) coordinates.

The phi and theta coordinates refer to the inverse projection (deprojection) of projected offsets about the native pole. phi is the deprojected longitude, and theta is the deprojected latitude of the offsets. For the Hammer projection these are given as:

phi = 2 * arctan(z * x, 2(2z^2 - 1)) theta = arcsin(z * y)

where

z = sqrt(1 - (0.25x)^2 - (0.5y)^2)

Parameters:
offsetCoordinate2D
phi_thetaSphericalCoordinates, optional

An optional output coordinate system in which to place the results.

Returns:
phi_thetaSphericalCoordinates
classmethod z2(offset)[source]

Return the Z2 factor for an offset.

The z2 parameter (z squared) is used when calculating the deprojection (inverse projection) and is given by:

z2 = 1 - (x^2)/16 - (y^2)/4

Parameters:
offsetCoordinate2D
Returns:
z2units.Quantity

The z2 factor in radian^2 units.