SphericalGrid¶
- class sofia_redux.scan.coordinate_systems.grid.spherical_grid.SphericalGrid(reference=None)[source]¶
Bases:
Grid2D
Initialize a spherical grid.
The spherical grid is used to convert between longitude/latitude coordinates on a sphere and offsets in relation to a specified reference position onto a regular grid, and the reverse operation.
Forward transform: grid projection -> offsets -> coordinates Reverse transform: coordinates -> offsets -> grid projection
- Parameters:
- referenceSphericalCoordinates
The reference coordinate from which to base any projections.
Attributes Summary
Return the unit for the FITS x-axis.
Return the unit for the FITS y-axis.
Return the reference value for the spherical grid.
Methods Summary
get_coordinate_instance_for
(ctype)Return a coordinate instance for the given name.
Return the default unit for the grid class.
Returns if the x-axis is reversed.
Returns if the y-axis is reversed.
parse_projection
(header)Parse the projection from the header.
Set the default values for the grid.
set_reference
(reference)Set the reference position of the grid.
Attributes Documentation
- fits_x_unit¶
Return the unit for the FITS x-axis.
- Returns:
- units.Unit
- fits_y_unit¶
Return the unit for the FITS y-axis.
- Returns:
- units.Unit
- reference¶
Return the reference value for the spherical grid.
- Returns:
- SphericalCoordinates
Methods Documentation
- classmethod get_coordinate_instance_for(ctype)[source]¶
Return a coordinate instance for the given name.
- Parameters:
- ctypestr
- Returns:
- SphericalCoordinates
- classmethod get_default_unit()[source]¶
Return the default unit for the grid class.
- Returns:
- unitunits.Unit
- parse_projection(header)[source]¶
Parse the projection from the header.
The projection is taken from the CTYPE1 value in the header (if no alternate designation is prescribed), beginning with the 5th character. For example, RA—TAN parses “-TAN” to create a gnomonic projection.
- Parameters:
- headerfits.Header
- Returns:
- None