chaosmagpy.data_utils.timestamp

chaosmagpy.data_utils.timestamp(time)[source]

Convert modified Julian date to NumPy’s datetime format.

Parameters
timendarray, shape (…)

Modified Julian date (units of days).

Returns
timendarray, shape (…)

Array of numpy.datetime64[us].

Examples

>>> timestamp(0.53245)
    numpy.datetime64('2000-01-01T12:46:43.680000')
>>> timestamp(np.linspace(0., 1.5, 2))
    array(['2000-01-01T00:00:00.000000', '2000-01-02T12:00:00.000000'], dtype='datetime64[us]')