Grid¶
- class sofia_redux.scan.coordinate_systems.grid.grid.Grid[source]¶
Bases:
ABC
Initialize a Grid.
The Grid abstract class is a base for representation of astronomical data on a regular grid. The exact coordinate system used is not specified, and should be defined by the user. At the simplest level, a grid consists of a coordinate system (set of axes), a reference position, and the grid resolution.
The grid is used to convert from coordinates to offsets in relation to a specified reference onto a regular grid, and the reverse operation.
Forward transform: grid projection -> offsets -> coordinates Reverse transform: coordinates -> offsets -> grid projection
Attributes Summary
Return the coordinate system.
Return the FITS ID for the grid.
Return the number of grid dimensions.
Return the grid reference position.
Return attributes that should be referenced rather than copied.
Return the grid resolution.
Methods Summary
copy
()Create and return a copy.
Return a coordinate for the dimensions of the grid.
Return the number of grid dimensions.
Return the FITS variant ID for the grid.
get_grid_class
(name)Return a grid class of the given name.
get_grid_instance
(name)Return a grid instance for the given name.
Return the reference position of the grid.
Return the reference index of the reference position on the grid.
Return the grid resolution.
set_coordinate_system
(system)Set the coordinate system for the grid.
set_reference
(value)Set the reference position of the grid.
set_reference_index
(value)Set the reference index of the reference position on the grid.
set_resolution
(value)Set the grid resolution.
Attributes Documentation
- coordinate_system¶
Return the coordinate system.
- Returns:
- CoordinateSystem
- fits_id¶
Return the FITS ID for the grid.
- Returns:
- str
- ndim¶
Return the number of grid dimensions.
- Returns:
- n_dimensionsint
- reference¶
Return the grid reference position.
- Returns:
- Coordinate
- referenced_attributes¶
Return attributes that should be referenced rather than copied.
- Returns:
- set (str)
- resolution¶
Return the grid resolution.
- Returns:
- Coordinate
Methods Documentation
- copy()[source]¶
Create and return a copy.
Note that the copy scan is a reference. The configuration is unlinked (i.e. is no longer a reference).
- Returns:
- Channels
- get_default_coordinate_instance()[source]¶
Return a coordinate for the dimensions of the grid.
- Returns:
- Coordinate
- static get_grid_class(name)[source]¶
Return a grid class of the given name.
- Parameters:
- namestr
The name of the grid.
- Returns:
- gridclass
- static get_grid_instance(name)[source]¶
Return a grid instance for the given name.
- Parameters:
- namestr
The name of the grid.
- Returns:
- gridGrid or Grid2D1
- abstract get_reference()[source]¶
Return the reference position of the grid.
- Returns:
- referenceCoordinate
- abstract get_reference_index()[source]¶
Return the reference index of the reference position on the grid.
- Returns:
- indexOffset
- set_coordinate_system(system)[source]¶
Set the coordinate system for the grid.
- Parameters:
- systemCoordinateSystem
- Returns:
- None
- abstract set_reference(value)[source]¶
Set the reference position of the grid.
- Parameters:
- valueCoordinate
The reference coordinate to set.
- Returns:
- None