biopsykit.sleep.utils module
Module with utility functions to handle sleep data.
-
biopsykit.sleep.utils.split_nights(data)[source]
Split continuous data into individual nights.
This function splits data into individual nights. The split is performed at 6pm because that’s the time of day
where the probability of sleeping is the lowest.
- Parameters
data (DataFrame
) – input data
- Returns
dictionary with recording date (keys) and dataframes split into individual nights (values).
By convention, if the recording of one night started after 12 am the recording date is set to the previous date.
- Return type
dict