MercatorProjection

class sofia_redux.scan.coordinate_systems.projection.mercator_projection.MercatorProjection[source]

Bases: CylindricalProjection

Initialize a Mercator projection.

The Mercator projection is a conformal projection in which lines of constant bearing are displayed as straight lines while somewhat preserving local directions and shapes.

Methods Summary

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.

Methods Documentation

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 Mercator projection, this is given by:

x = phi y = ln(tan( pi/4 + theta/2 ))

Parameters:
thetaunits.Quantity or float

The theta (latitude) angle. If a dimensionless or float value is supplied, it is assumed to be in radians.

phiunits.Quantity or float

The phi (longitude) angle. If a dimensionless or float value is supplied, it is assumed to be in radians.

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 Mercator projection these are given as:

phi = x theta = 2 * arctan(exp(y)) - pi/2

Parameters:
offsetCoordinate2D

The projected offset to convert. If the units are undefined or dimensionless, they are assumed to be in radians.

phi_thetaSphericalCoordinates, optional

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

Returns:
coordinatesSphericalCoordinates