Time and Position Transformation

New in version 0.2.

Time and position transform objects.

Time

class lsl.transform.Time(value, format='MJD', timesys='UTC')

Holds an absolute time value and can manipulate the value in various representations.

After creation, a particular time format and time system may be accessed using the appropriate instance member. If marked with ‘(S)’, the Time value may also be updated by setting the member to a new value.

utc_jd (S) - UTC standard Julian day utc_mjd (S) - UTC modified Julian day utc_timet (S) - UTC UNIX timet seconds utc_py_date (S) - UTC python datetime.datetime object utc_ln_date (S) - UTC libnova astro.date object utc_str - UTC ISO8601 calendar string format

tai_jd (S) - TAI standard Julian day tai_mjd (S) - TAI modified Julian day tai_timet (S) - TAI UNIX timet seconds

static date_ln_to_py(lnDate)

Convert libnova astro.date object into a python datetime.datetime object.

static date_py_to_ln(pyDate)

Convert python datatime.datetime object into a libnova astro.date object.

classmethod from_system(klass)

Factory method to create a Time instance from current system clock value.

tai_jd

Time value formatted as TAI standard julian day (float).

tai_mjd

Time value formatted as TAI modified julian day (float).

tai_timet

Time value formatted as TAI UNIX timet seconds.

utc_jd

Time value formatted as UTC standard julian day (float).

utc_ln_date

Time value formatted as UTC calendar astro.date object.

utc_mjd

Time value formatted as UTC modified julian day (float).

utc_py_date

Time value formattes as UTC calendar datetime.datetime object.

utc_str

Time value formatted as UTC ISO 8601 calendar string.

utc_timet

Time value formatted as UTC UNIX timet seconds.

Celstial Positions

class lsl.transform.CelestialPosition(value, format='EQU', epoch='J2000', name='')

Holds a celestial object position value and can manipulate the value in various representations.

After creation, the celestial coordinates may be accessed in different formats and epoch by using the appropriate instance member. If marked with ‘(S)’, the Time value may also be updated by setting the member to a new value.

j2000_equ (S) - J2000 equatorial coordinates j2000_gal (S) - J2000 galactic coordinates j2000_ecl (S) - J2000 ecliptic coordinates

b1950_equ (S) - B1950 equatorial coordinates

The instance methods apparent_equ() and apparent_ecl() may be used to get the apparent equatorial or ecliptic coordinates for a particular time.

apparent_ecl(time_)

Return position formatted as apparent ecliptic coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return alue is object of type astro.ecl_posn.

apparent_equ(time_)

Return position formatted as apparent equatorial coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is object of type astro.equ_posn.

b1950_equ

Position formatted as B1950 equatorial coordinates. Value is object of type astro.equ_posn.

j2000_ecl

Position formatted as J2000 ecliptic coordinates. Value is object of type astro.ecl_posn.

j2000_equ

Position formatted as J2000 equatorial coordinates. Value is object of type astro.equ_posn.

j2000_gal

Position formatted as J2000 galactic coordinates. Value is object of type astro.gal_posn.

class lsl.transform.PlanetaryPosition(name)

Holds a solar, lunar, or planetary position value and can manipulate the value in various representations.

The instance methods apparent_equ() and apparent_ecl() may be used to get the apparent equatorial or ecliptic coordinates for a particular time.

apparent_ecl(time_)

Position formatted as apparent ecliptic coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is object of type astro.ecl_posn.

apparent_equ(time_)

Position formatted as apparent equatorial coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is object of type astro.equ_posn.

class lsl.transform.SkyPosition

Base abstract class for representing positions on the sky.

apparent_ecl(time_)

Return position formatted as apparent ecliptic coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return alue is object of type astro.ecl_posn.

apparent_equ(time_)

Return position formatted as apparent equatorial coordinates. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is object of type astro.equ_posn.

class lsl.transform.PointingDirection(source, site)

Represent a target source object pointing direction for a particular ground site location.

Each PointingDirection instance pairs a celestial position with a ground observation site position. Each instance contains a ‘source’ member reference of type CelestialPosition or PlanetaryPosition and a ‘site’ member reference of type GeographicalPosition.

The instance methods hrz() and dir_cos() may be called to get the pointing direction as horizontal coordinates or direction cosine components for a particular time of interest. The rst() method may be called to get the rise, set, and transit ephemeris times.

dir_cos(time_)

Return the pointing direction as three direction cosine components. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is a tuple (l, m, n) of direction cosine components.

hrz(time_)

Return the pointing direction in horizontal coordinates as type astro.hrz_posn. The ‘time‘ parameter should be set to a Time instance providing the time of interest.

rst(time_)

Return the rise, set, and transit ephemeris times. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Return value is an object of type astro.rst_time, or None if the source is circumpolar.

Geographic Positions

class lsl.transform.GeographicalPosition(value, format='GEO', name='')

Holds a geographical position valuee and can manipulate the value in various representations.

After creation, the celestial coordinates may be accessed in different formats and epoch by using the appropriate instance member. If marked with ‘(S)’, the Time value may also be updated by setting the member to a new value.

geo (S) - longitude and latitude degrees, elevation meters ecef (S) - Earth centered rectilinear coordinates

ecef

Position formatted as ECEF rectagular coordinates. Value is object of type astro.rect_posn.

geo

Position formatted as geodedic longitude, latitude, elevation. Value is object of type astro.geo_posn.

sidereal(time_)

Return the apparent sidereal time for this location. The ‘time‘ parameter should be set to a Time instance providing the time of interest. Returns sidereal time as a float in range [0.0, 24.0).

Table Of Contents

Previous topic

Catalogs and Sky Map

Next topic

Math Utilities

This Page