pyActigraphy.io.read_raw_mesa

pyActigraphy.io.read_raw_mesa(input_fname, time_origin='2000-01-01', start_time=None, period=None, intervals={'ACTIVE': 1, 'EXCLUDED': -1, 'REST': 0.5, 'REST-S': 0}, check_dayofweek=False)[source]

Reader function for MESA files

Parameters
  • input_fname (str) – Path to the ActTrust file.

  • time_origin (datetime-like) – Time origin of the timestamps. Required as the MESA files do not contain date informations. Default is ‘2000-01-01’

  • start_time (datetime-like, optional) – Read data from this time. Default is None.

  • period (str, optional) – Length of the read data. Cf. #timeseries-offset-aliases in <https://pandas.pydata.org/pandas-docs/stable/timeseries.html>. Default is None (i.e all the data).

  • intervals (dict, optional) – Map manually annotated periods to specific scores. If set to None, the names of the annotated periods is returned instead. Default is {‘EXCLUDED’: -1, ‘ACTIVE’: 1, ‘REST’: 0.5, ‘REST-S’: 0}.

  • check_dayofweek (bool, optional) – If set to True, check if the day of the week reported in the original recoring is aligned with the reconstructed index. Default is False.

Returns

raw – An object containing raw MESA data

Return type

Instance of RawMESA