pyActigraphy.metrics.MetricsMixin.IVm

MetricsMixin.IVm(freqs=['1T', '2T', '3T', '4T', '5T', '6T', '8T', '9T', '10T', '12T', '15T', '16T', '18T', '20T', '24T', '30T', '32T', '36T', '40T', '45T', '48T', '60T'], binarize=True, threshold=4)[source]

Average intradaily variability

IVm [1] is the average of the IV values obtained with resampling periods divisors of 1440 between 1 and 60 min.

Parameters
  • freq (str, optional) – Data resampling frequency strings.

  • 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 set to 4.

Returns

ivm

Return type

float

Notes

By default, the resampling periods are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 30, 32, 36, 40, 45, 48 and 60 min.

References

1

Gonçalves, B. S., Cavalcanti, P. R., Tavares, G. R., Campos, T. F., & Araujo, J. F. (2014). Nonparametric methods in actigraphy: An update. Sleep science (Sao Paulo, Brazil), 7(3), 158-64.

Examples

>>> import pyActigraphy
>>> rawAWD = pyActigraphy.io.read_raw_awd(fpath + 'SUBJECT_01.AWD')
>>> rawAWD.IVm()
0.3482306825356382
>>> rawAWD.IVm(binarize=False)
0.6414533006190071
>>> rawAWD.IVm(freqs=['10min','30min','1H'], binarize=False)
0.7124465677737196