Skip to main content
`Ctrl`+`K`

# obsgeo_to_frame

astropy.wcs.utils.obsgeo_to_frame(obsgeo, obstime)

  Convert a WCS obsgeo property into an ITRS coordinate frame.

  Parameters:
    obsgeo numpy:array_like

      A shape `(6, )` array representing `OBSGEO-[XYZ], OBSGEO-[BLH]` as returned by `WCS.wcs.obsgeo`.

    obstime astropy:time-like

      The time associated with the coordinate, will be passed to `ITRS` as the obstime keyword.

  Returns:
    `ITRS`

      An `ITRS` coordinate frame representing the coordinates.

  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.