pint.observatory.special_locations.T2SpacecraftObs

class pint.observatory.special_locations.T2SpacecraftObs(name, aliases=None, include_gps=True, include_bipm=True, bipm_version='BIPM2021', overwrite=False)[source]

Bases: SpecialLocation

An observatory with position tabulated following Tempo2 convention.

In tempo2, it is possible to specify the GCRS position of the observatory via the -telx, -tely, and -telz flags in a TOA file. This class is able to obtain its position in this way, i.e. by examining the flags in a TOA table.

Methods

bipm_correction(t[, bipm_version, limits])

Compute the GPS clock corrections for times t.

clear_registry()

Clear registry for ground-based observatories.

clock_corrections(t[, limits])

Compute clock corrections for a Time array.

earth_location_itrf([time])

Returns observatory geocentric position as an astropy EarthLocation object.

get(name)

Returns the Observatory instance for the specified name/alias.

get_TDBs(t[, method, ephem, options])

This is a high level function for converting TOAs to TDB time scale.

get_gcrs(t, group[, ephem])

Return spacecraft GCRS position; this assumes position flags in tim file are in km

gps_correction(t[, limits])

Compute the GPS clock corrections for times t.

last_clock_correction_mjd()

Return the MJD of the last available clock correction.

names()

List all observatories known to PINT.

names_and_aliases()

List all observatories and their aliases

posvel(t, ephem[, group])

Return observatory position and velocity for the given times.

posvel_gcrs(t, group[, ephem])

Return spacecraft GCRS position and velocity; this assumes position flags in tim file are in km and velocity flags are in km/s

Attributes

aliases

name

tempo_code

timescale

Returns the timescale that TOAs from this observatory will be in, once any clock corrections have been applied.

property timescale

Returns the timescale that TOAs from this observatory will be in, once any clock corrections have been applied. This should be a string suitable to be passed directly to the scale argument of astropy.time.Time().

get_gcrs(t, group, ephem=None)[source]

Return spacecraft GCRS position; this assumes position flags in tim file are in km

posvel_gcrs(t, group, ephem=None)[source]

Return spacecraft GCRS position and velocity; this assumes position flags in tim file are in km and velocity flags are in km/s

posvel(t, ephem, group=None)[source]

Return observatory position and velocity for the given times.

Position is relative to solar system barycenter; times are (astropy array-valued Time objects).

static bipm_correction(t, bipm_version='BIPM2021', limits='warn')

Compute the GPS clock corrections for times t.

classmethod clear_registry()

Clear registry for ground-based observatories.

clock_corrections(t, limits='warn')

Compute clock corrections for a Time array.

Given an array-valued Time, return the clock corrections as a numpy array, with units. These values are to be added to the raw TOAs in order to refer them to the timescale specified by self.timescale.

earth_location_itrf(time=None)

Returns observatory geocentric position as an astropy EarthLocation object. For observatories where this is not relevant, None can be returned.

The location is in the International Terrestrial Reference Frame (ITRF). The realization of the ITRF is determined by astropy, which uses ERFA (IAU SOFA).

The time argument is ignored for observatories with static positions. For moving observatories (e.g. spacecraft), it should be specified (as an astropy Time) and the position at that time will be returned.

classmethod get(name)

Returns the Observatory instance for the specified name/alias.

If the name has not been defined, an error will be raised. Aside from the initial observatory definitions, this is in general the only way Observatory objects should be accessed. Name-matching is case-insensitive.

get_TDBs(t, method='default', ephem=None, options=None)

This is a high level function for converting TOAs to TDB time scale.

Different method can be applied to obtain the result. Current supported methods are [‘default’, ‘ephemeris’]

Parameters:
  • t (astropy.time.Time object) – The time need for converting toas

  • method (str or callable, optional) –

    Method of computing TDB

    ”default”

    Astropy time.Time object built-in converter, uses FB90. SpacecraftObs will include a topocentric correction term.

    ”ephemeris”

    JPL ephemeris included TDB-TT correction. Not currently implemented.

    callable

    This callable is called with the parameter t as its first parameter; additional keyword arguments can be supplied in the options argument

  • ephem (str, optional) – The ephemeris to get he TDB-TT correction. Required for the ‘ephemeris’ method.

  • options (dict or None) – Options to pass to a custom callable.

static gps_correction(t, limits='warn')

Compute the GPS clock corrections for times t.

last_clock_correction_mjd()

Return the MJD of the last available clock correction.

Returns np.inf if no clock corrections are relevant.

classmethod names()

List all observatories known to PINT.

classmethod names_and_aliases()

List all observatories and their aliases