ctdproc.helpers.mtlb2datetime

ctdproc.helpers.mtlb2datetime(matlab_datenum, strip_microseconds=False, strip_seconds=False)[source]

Convert Matlab datenum format to python datetime. This version also works for vector input and strips milliseconds if desired.

Parameters:
  • matlab_datenum (float or np.array) – Matlab time vector.

  • strip_microseconds (bool) – Get rid of microseconds (optional)

  • strip_seconds (bool) – Get rid of seconds (optional)

Returns:

t – Time in numpy’s datetime64 format.

Return type:

np.datetime64