Bases: object
Represent and manipulate times and dates for astronomy.
A Time object is initialized with one or more times in the val argument. The input times in val must conform to the specified format and must correspond to the specified time scale. The optional val2 time input should be supplied only for numeric input formats (e.g. JD) where very high precision (better than 64-bit precision) is required.
Parameters : | val : sequence, str, number, or Time object
val2 : sequence, str, or number; optional
format : str, optional
scale : str, optional
opt : dict, optional
lat : float, optional
lon : float, optional
copy : bool, optional
|
---|
Attributes Summary
delta_tdb_tt | |
FORMATS | |
scale | Time scale |
val | Time value(s) in current format |
SCALES | tuple() -> empty tuple |
out_subfmt | Unix wildcard pattern to select subformats for outputting times |
jd1 | First of the two doubles that internally store time value(s) in JD |
jd2 | Second of the two doubles that internally store time value(s) in JD |
delta_ut1_utc | Get SOFA DUT arg = UT1 - UTC. |
format | Time format |
precision | Decimal precision when outputting seconds as floating point (int value between 0 and 9 inclusive). |
vals | Time values in current format as a numpy array |
in_subfmt | Unix wildcard pattern to select subformats for parsing string input |
Methods Summary
replicate([format, copy]) | Return a replica of the Time object, optionally changing the format. |
copy([format]) | Return a fully independent copy the Time object, optionally changing the format. |
Attributes Documentation
TDB - TT time scale offset
Dict of time formats
List of time scales
UT1 - UTC time scale offset
Decimal precision when outputting seconds as floating point (int value between 0 and 9 inclusive).
Methods Documentation
Return a replica of the Time object, optionally changing the format.
If format is supplied then the time format of the returned Time object will be set accordingly, otherwise it will be unchanged from the original.
If copy is set to True then a full copy of the internal time arrays will be made. By default the replica will use a reference to the original arrays when possible to save memory. The internal time arrays are normally not changeable by the user so in most cases it should not be necessary to set copy to True.
The convenience method copy() is available in which copy is True by default.
Parameters : | format : str, optional
copy : bool, optional
|
---|---|
Returns : | tm: Time object :
|
Return a fully independent copy the Time object, optionally changing the format.
If format is supplied then the time format of the returned Time object will be set accordingly, otherwise it will be unchanged from the original.
In this method a full copy of the internal time arrays will be made. The internal time arrays are normally not changeable by the user so in most cases the replicate() method should be used.
Parameters : | format : str, optional
|
---|---|
Returns : | tm: Time object :
|