Bases: astropy.time.Time
Represent the time difference between two times.
A TimeDelta object is initialized with one or more times in the val argument. The input times in val must conform to the specified format. 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.
The allowed values for format can be listed with:
>>> sorted(TimeDelta.FORMATS)
['jd', 'sec']
Note that for time differences, the scale can be among three groups: geocentric (‘tai’, ‘tt’, ‘tcg’), barycentric (‘tcb’, ‘tdb’), and rotational (‘ut1’). Within each of these, the scales for time differences are the same. Conversion between geocentric and barycentric is possible, as there is only a scale factor change, but one cannot convert to or from ‘ut1’, as this requires knowledge of the actual times, not just their difference. For a similar reason, ‘utc’ is not a valid scale for a time difference: a UTC day is not always 86400 seconds.
Parameters: | val : numpy ndarray, list, str, number, or TimeDelta object
val2 : numpy ndarray, list, str, or number; optional
format : str, optional
scale : str, optional
copy : bool, optional
|
---|
Attributes Summary
FORMATS | Dict of time delta formats. |
SCALES | List of time delta scales. |
Methods Summary
replicate(*args, **kwargs) | |
to(*args, **kwargs) |
Attributes Documentation
Dict of time delta formats.
List of time delta scales.
Methods Documentation