pyActigraphy.analysis.LIDS.lids_fit

LIDS.lids_fit(lids, method='leastsq', scan_period=True, bounds=('30min', '180min'), step='5min', nan_policy='raise', verbose=False)[source]

Fit oscillations of the LIDS data

The fit is performed with a fixed period ranging from 30 min to 180 min with a step of 5 min by default. The best-fit criterion is the maximal Munich Rhythmicity Index (MRI).

Parameters
  • lids (pandas.Series) – Output data from LIDS transformation.

  • method (str, optional) – Name of the fitting method to use [1]. Default is ‘leastsq’.

  • scan_period (bool, optional) – If set to True, the period of the LIDS fit function is fixed and varied between the specified bounds. The selected period corresponds to the highest MRI value. Otherwise, the period is a free parameter of the fit. Default is True.

  • bounds (2-tuple of str, optional) – Lower and upper bounds for the periods to be tested. If scan_period is set to False, the bounds are ignored. Default is (‘30min’,’180min’).

  • step (str, optional) – Time delta between the periods to be tested.

  • nan_policy (str, optional) –

    Specifies action if the objective function returns NaN values. One of:

    • ’raise’: a ValueError is raised

    • ’propagate’: the values returned from userfcn are un-altered

    • ’omit’: non-finite values are filtered

    Default is ‘raise’.

  • verbose (bool, optional) – If set to True, display fit informations

References

1

Non-Linear Least-Squares Minimization and Curve-Fitting for Python. https://lmfit.github.io/lmfit-py/index.html