scipp.epoch

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.

Seealso

scipp.datetime() scipp.datetimes() ‘Dates and Times’ section in Data Types

Parameters

unit (Union[scipp._scipp.core.Unit, str]) – Unit of the resulting Variable.

Return type

scipp._scipp.core.Variable

Examples:

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