azely.object module#

class Object(name: str, longitude: str, latitude: str, frame: str = 'icrs')[source]#

Bases: object

Object information.

Parameters:
  • name (str) – Name of the object.

  • longitude (str) – Longitude of the object (with units).

  • latitude (str) – Latitude of the object (with units).

  • frame (str) – Coordinate frame name of the object.

frame: str = 'icrs'#

Coordinate frame name of the object.

latitude: str#

Latitude of the object (with units).

longitude: str#

Longitude of the object (with units).

name: str#

Name of the object.

skycoord(obstime: Time, /) SkyCoord[source]#

Convert it to an astropy SkyCoord.

Parameters:

obstime (Time)

Return type:

SkyCoord

class ObjectDict[source]#

Bases: TypedDict

Dictionary of the object information attributes.

frame: NotRequired[str]#
latitude: Required[str]#
longitude: Required[str]#
name: Required[str]#
get_object(query: str, /, *, sep: str = '\\s*;\\s*', timeout: float = 10.0, append: bool = True, overwrite: bool = False, source: PathLike[str] | str | None = None) Object[source]#

Parse given query to create object information.

Parameters:
  • query (str) – Query string for the object information.

  • sep (str) – Separator string for splitting the query.

  • timeout (float) – Timeout length in seconds.

  • append (bool) – Whether to append the object information to the source TOML file if it does not exist.

  • overwrite (bool) – Whether to overwrite the object information to the source TOML file even if it already exists.

  • source (PathLike[str] | str | None) – Path of a source TOML file for the object information.

Return type:

Object

Returns

Object information created from the parsed query.