astromodels.core.sky_direction module

exception astromodels.core.sky_direction.IllegalCoordinateValue[source]

Bases: ValueError

class astromodels.core.sky_direction.SkyDirection(ra=None, dec=None, l=None, b=None, equinox='J2000')[source]

Bases: Node

This is essentially a wrapper around astropy.coordinates.SkyCoord with a possibility for being serialized and deserialized with YAML.

property equinox

Returns the equinox for the coordinates.

Returns:

fix()[source]

Fix the parameters with the coordinates (either ra,dec or l,b depending on how the class has been instanced)

free()[source]

Free the parameters with the coordinates (either ra,dec or l,b depending on how the class has been instanced)

classmethod from_dict(data)[source]
get_b()[source]

Get Galactic latitude (b) corresponding to the current position

Returns:

Latitude

get_dec()[source]

Get Dec. corresponding to the current position (ICRS, J2000)

Returns:

Declination

get_l()[source]

Get Galactic Longitude (l) corresponding to the current position

Returns:

Galactic Longitude

get_ra()[source]

Get R.A. corresponding to the current position (ICRS, J2000)

Returns:

Right Ascension

property parameters

Get the dictionary of parameters (either ra,dec or l,b)

Returns:

dictionary of parameters

property sky_coord

Return an instance of astropy.coordinates.SkyCoord which can be used to make all transformations supported by it

Returns:

astropy.coordinates.SkyCoord

to_dict(minimal=False)[source]
exception astromodels.core.sky_direction.WrongCoordinatePair[source]

Bases: ValueError

exception astromodels.core.sky_direction.WrongCoordinateSystem[source]

Bases: ValueError