pyActigraphy.io.BaseRaw.SoD¶
- BaseRaw.SoD(freq='5min', binarize=True, bin_threshold=4, whs=4, start='12:00:00', period='5h', algo='Roenneberg', *args, **kwargs)¶
Sleep over Daytime
Quantify the volume of epochs identified as sleep over daytime (SoD), using sleep-wake scoring algorithms.
- Parameters
freq (str, optional) – Resampling frequency. Default is ‘5min’
binarize (bool, optional) – If set to True, the data are binarized when determining the activity onset and offset times. Only valid if start=’AonT’ or ‘AoffT’. Default is True.
bin_threshold (int, optional) – If binarize is set to True, data above this threshold are set to 1 and to 0 otherwise. Default is 4.
whs (int, optional) – Window half size. Only valid if start=’AonT’ or ‘AoffT’. Default is 4
start (str, optional) – Start time of the period of interest. Default: ‘12:00:00’ Supported times: ‘AonT’, ‘AoffT’, any ‘HH:MM:SS’
period (str, optional) – Period length. Default is ‘5h’
algo (str, optional) – Sleep scoring algorithm to use. Default is ‘Roenneberg’.
*args – Variable length argument list passed to the scoring algorithm.
**kwargs – Arbitrary keyword arguements passed to the scoring algorithm.
- Returns
sod – Time series containing the epochs of rest (1) and activity (0) over the specified period.
- Return type
pandas.core.Series
Examples
>>> import pyActigraphy >>> rawAWD = pyActigraphy.io.read_raw_awd(fpath + 'SUBJECT_01.AWD') >>> SoD = rawAWD.SoD() >>> SoD 2018-03-26 04:16:00 1 2018-03-26 04:17:00 1 2018-03-26 04:18:00 1 (...) 2018-04-05 16:59:00 0 2018-04-05 16:59:00 0 2018-04-05 17:00:00 0 Length: 3175, dtype: int64