scipp.epoch#

scipp.epoch(*, unit)#

Constructs a zero dimensional Variable with a dtype of datetime64 that contains Scipp’s epoch.

Currently, the epoch of datetimes in Scipp is the Unix epoch 1970-01-01T00:00:00.

Parameters:

unit (Unit | str | DefaultUnit | None) – Unit of the resulting Variable.

Returns:

Variable – A scalar variable containing the datetime of the epoch.

See also

scipp.datetime, scipp.datetimes

Details

‘Dates and Times’ section in Data Types

Examples

>>> sc.epoch(unit='s')
<scipp.Variable> ()  datetime64              [s]  1970-01-01T00:00:00