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:
SpecialLocationAn 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 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.
Return the MJD of the last available clock correction.
names()List all observatories known to PINT.
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
List of aliases for the observatory.
Short name of the observatory.
tempo_codeReturns the timescale that TOAs from this observatory will be in, once any clock corrections have been applied.
Full human-readable name of the observatory.
Whether to include GPS clock corrections.
Whether to include BIPM clock corrections.
Version of the BIPM clock file to use.
- 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).
- property aliases: List[str]
List of aliases for the observatory.
These are short names also used to specify this observatory. Includes ITOA and TEMPO codes, and any other common names.
- static bipm_correction(t: Time, bipm_version: str = 'BIPM2021', limits: str = 'warn') Quantity
Compute the GPS clock corrections for times t.
- clock_corrections(t: Time, limits: str = 'warn') Quantity
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: Time | None = None) None | ndarray
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: str) Observatory
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: Time, method: str | Callable = 'default', ephem: str | None = None, options: dict | None = 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: Time, limits: str = 'warn') Quantity
Compute the GPS clock corrections for times t.
- last_clock_correction_mjd() float
Return the MJD of the last available clock correction.
Returns
np.infif no clock corrections are relevant.
- property name: str
Short name of the observatory.
This is the name used in TOA files and in the observatory registry.
- classmethod names()
List all observatories known to PINT.