BonnesProjection

class sofia_redux.scan.coordinate_systems.projection.bonnes_projection.BonnesProjection[source]

Bases: SphericalProjection

Initialize a Bonne spherical projection.

The Bonne projection is a pseudo-canonical equal-area projection designed to maintain accurate shapes of areas along the central meridian (y0) and standard parallel (theta1). Distortion is noticeable from this region, so it is best used to map “T”-shaped regions.

Notes

By default, the theta1 parameter (standard parallel) is set to zero. As such, forward and reverse projections will be inconsistent as cot(0) is undefined. Therefore, the user should always make sure to explicitly set theta 1. If a Bonne projection is required at theta1=0 (equator), the global sinusoidal projection should be used instead.

Attributes Summary

theta1

Return the theta1 angle.

y0

Return the y0 angle.

Methods Summary

edit_header(header[, alt])

Edit a FITS header with the projection information.

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_theta coordinates for the Bonne projection.

parse_header(header[, alt])

Parse and apply a FITS header to the projection.

set_theta_1(value)

Set the theta_1 value.

Attributes Documentation

theta1

Return the theta1 angle.

The theta1 angle is the standard parallel of the projection (line with no distortion on the projection).

Returns:
units.Quantity
y0

Return the y0 angle.

The y0 defines the central meridian of the Bonne projection.

Returns:
units.Quantity

Methods Documentation

edit_header(header, alt='')[source]

Edit a FITS header with the projection information.

Parameters:
headerfits.Header

The FITS header to edit.

altstr, optional

The alternate FITS system.

Returns:
None
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
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 Bonne projection these are given by:

r = y0 - theta a = phi * cos(theta) / r dx = r * sin(a) dy = y0 - (r * cos(a))

where y0 is the central meridian.

Parameters:
thetaunits.Quantity

The theta angle (latitude about the celestial pole).

phiunits.Quantity

The phi angle (longitude about the celestial pole).

offsetsCoordinate2D, optional

An optional coordinate system in which to place the results.

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

Return the phi_theta coordinates for the Bonne projection.

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

dy = y0 - y r = sign(theta1) * sqrt(x^2 + dy^2) a = arctan(x, dy)

theta = y0 - r phi = a * r / cos(theta)

where y0 is the central meridian and theta1 is the standard parallel.

Parameters:
offsetCoordinate2D
phi_thetaSphericalCoordinates, optional

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

Returns:
coordinatesSphericalCoordinates
parse_header(header, alt='')[source]

Parse and apply a FITS header to the projection.

Parameters:
headerfits.Header

The FITS header to parse.

altstr, optional

The alternate FITS system.

Returns:
None
set_theta_1(value)[source]

Set the theta_1 value.

The theta 1 parameter in the Bonne projection is the standard parallel (line where there is no distortion in the map projection). For this projection, setting theta1 sets the projection native reference latitude to the same value, and the central meridian (y0) to:

y0 = theta1 + cot(theta1)

Parameters:
valueunits.Quantity
Returns:
None