obsgeo_to_frame#
- astropy.wcs.utils.obsgeo_to_frame(obsgeo, obstime)[source]#
Convert a WCS obsgeo property into an ITRS coordinate frame.
- Parameters:
- obsgeoarray_like
A shape
(6, )
array representingOBSGEO-[XYZ], OBSGEO-[BLH]
as returned byWCS.wcs.obsgeo
.- obstimeastropy:time-like
The time associated with the coordinate, will be passed to
ITRS
as the obstime keyword.
- Returns:
Notes
The obsgeo array as accessed on a
WCS
object is a length 6 numpy array where the first three elements are the coordinate in a cartesian representation and the second 3 are the coordinate in a spherical representation.This function priorities reading the cartesian coordinates, and will only read the spherical coordinates if the cartesian coordinates are either all zero or any of the cartesian coordinates are non-finite.
In the case where both the spherical and cartesian coordinates have some non-finite values the spherical coordinates will be returned with the non-finite values included.