astropy:docs

TimeDelta

class astropy.time.TimeDelta(val, val2=None, format=None, scale=None, copy=False)[source] [edit on github]

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.

Parameters:

val : numpy ndarray, list, str, number, or TimeDelta object

Data to initialize table.

val2 : numpy ndarray, list, str, or number; optional

Data to initialize table.

format : str, optional

Format of input value(s)

scale : str, optional

Time scale of input value(s)

copy : bool, optional

Make a copy of the input values

Attributes Summary

FORMATS
SCALES list() -> new empty list

Methods Summary

replicate(*args, **kwargs)
to(*args, **kwargs)

Attributes Documentation

FORMATS = {u'jd': <class 'astropy.time.core.TimeDeltaJD'>, u'sec': <class 'astropy.time.core.TimeDeltaSec'>}

Dict of time delta formats.

SCALES = [u'tdb', u'tt', u'ut1', u'tcg', u'tcb', u'tai']

List of time delta scales.

Methods Documentation

replicate(*args, **kwargs)[source] [edit on github]
to(*args, **kwargs)[source] [edit on github]

Page Contents