pyActigraphy.metrics.MetricsMixin.RA

MetricsMixin.RA(binarize=True, threshold=4)[source]

Relative rest/activity amplitude

Relative amplitude between the mean activity during the 10 most active hours of the day and the mean activity during the 5 least active hours of the day.

Parameters
  • binarize (bool, optional) – If set to True, the data are binarized. Default is True.

  • threshold (int, optional) – If binarize is set to True, data above this threshold are set to 1 and to 0 otherwise. Default is 4.

Returns

ra

Return type

float

Notes

The RA [1] variable is calculated as:

\[RA = \frac{M10 - L5}{M10 + L5}\]

References

1

Van Someren, E.J.W., Lijzenga, C., Mirmiran, M., Swaab, D.F. (1997). Long-Term Fitness Training Improves the Circadian Rest-Activity Rhythm in Healthy Elderly Males. Journal of Biological Rhythms, 12(2), 146–156. http://doi.org/10.1177/074873049701200206

Examples

>>> import pyActigraphy
>>> rawAWD = pyActigraphy.io.read_raw_awd(fpath + 'SUBJECT_01.AWD')
>>> rawAWD.RA()
0.XXXX
>>> rawAWD.RA(binarize=False)
0.XXXX