GlobalSinusoidalProjection¶
- class sofia_redux.scan.coordinate_systems.projection.global_sinusoidal_projection.GlobalSinusoidalProjection[source]¶
Bases:
SphericalProjection
Initialize a global sinusoidal projection.
The global spherical projection is a very simple projection that converts between coordinates and offsets when the projection is also in spherical coordinates and celestial and native poles are equivalent. I.e, the only parameter of importance is the reference position of the projection.
Methods Summary
deproject
(projected[, coordinates])Deproject global sinusoidal projection offsets to coordinates.
Return the FITS ID for the projection.
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.
project
(coordinates[, projected])Project the coordinates.
Methods Documentation
- deproject(projected, coordinates=None)[source]¶
Deproject global sinusoidal projection offsets to coordinates.
The reverse projection (deprojection) is used to convert offsets in relation to a reference position into spherical coordinates as follows:
y = y_reference + dy x = x_reference + (dx / cos(y))
- Parameters:
- projectedCoordinate2D
The projected coordinates to deproject.
- coordinatesSphericalCoordinates, optional
The output deprojected coordinates. Will be created if not supplied.
- Returns:
- coordinatesCoordinate2D
The deprojected coordinates.
- get_offsets(theta, phi, offsets=None)[source]¶
Get the offsets given theta and phi.
- 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
- get_phi_theta(offset, phi_theta=None)[source]¶
Return the phi_theta coordinates.
- Parameters:
- offsetCoordinate2D
- phi_thetaSphericalCoordinates, optional
An optional output coordinate system in which to place the results.
- Returns:
- coordinatesSphericalCoordinates
- project(coordinates, projected=None)[source]¶
Project the coordinates.
The forward projection for the global sinusoidal projection converts spherical coordinates to cartesian offsets from a reference position as follows:
dx = (x - x_reference) * cos(y) dy = y - y_reference
- Parameters:
- coordinatesSphericalCoordinates
The coordinates to project.
- projectedCoordinate2D, optional
The output coordinates. Will be created if not supplied.
- Returns:
- projectedCoordinate2D
The projected coordinates.