biopsykit.utils.datatype_helper module¶
A couple of helper functions that ease the use of the typical biopsykit data formats.
- biopsykit.utils.datatype_helper.CodebookDataFrame¶
DataFrame
representing a codebook which encodes numerical and categorical values in a standardized format.A
CodebookDataFrame
has an index level namedvariable
. The column names are the numerical values (0, 1, …), the dataframe entries then represent the mapping of numerical value to categorical value for the variable.alias of
Union
[biopsykit.utils.datatype_helper._CodebookDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.MeanSeDataFrame¶
DataFrame
containing mean and standard error of time-series data in a standardized format.The resulting dataframe must at least the two columns
mean
andse
. It can have additional index levels, such asphase
,subphase
orcondition
.alias of
Union
[biopsykit.utils.datatype_helper._MeanSeDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.BiomarkerRawDataFrame¶
DataFrame
containing raw biomarker data in a standardized format.Data needs to be in long-format and must have a
pandas.MultiIndex
with index level names:subject
: subject ID; can be number or stringsample
: saliva sample ID; can be number or string
Additionally, the following index levels can be added to identify saliva values, such as:
condition
: subject condition during the study (e.g., “Control” vs. “Condition”)day
: day ID, if saliva samples were collected over multiple daysnight
: night ID, if saliva samples were collected over multiple night…
alias of
Union
[biopsykit.utils.datatype_helper._BiomarkerRawDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SalivaRawDataFrame¶
DataFrame
containing raw saliva data in a standardized format.Data needs to be in long-format and must have a
pandas.MultiIndex
with index level names:subject
: subject ID; can be number or stringsample
: saliva sample ID; can be number or string
Additionally, the following index levels can be added to identify saliva values, such as:
condition
: subject condition during the study (e.g., “Control” vs. “Condition”)day
: day ID, if saliva samples were collected over multiple daysnight
: night ID, if saliva samples were collected over multiple night…
alias of
Union
[biopsykit.utils.datatype_helper._BiomarkerRawDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SalivaFeatureDataFrame¶
DataFrame
containing feature computed from saliva data in a standardized format.The resulting dataframe must at least have a
subject
index level and all column names need to begin with the saliva marker type (e.g. “cortisol”), followed by the feature name, separated by underscore ‘_’ Additionally, the name of the column index needs to be saliva_feature.alias of
Union
[biopsykit.utils.datatype_helper._SalivaFeatureDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SalivaMeanSeDataFrame¶
DataFrame
containing mean and standard error of saliva samples in a standardized format.The resulting dataframe must at least have a
sample
index level and the two columnsmean
andse
. It can have additional index levels, such ascondition
ortime
.alias of
Union
[biopsykit.utils.datatype_helper._SalivaMeanSeDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SleepEndpointDataFrame¶
DataFrame
containing sleep endpoints in a standardized format.The resulting dataframe must at least have a
date
index level, and, optionally, further index levels likenight
.The columns defining the sleep endpoints should follow a standardized naming convention, regardless of the origin (IMU sensor, sleep mattress, psg, etc.).
Required are the columns:
sleep_onset
: Sleep Onset, i.e., time of falling asleep, in absolute timewake_onset
: Wake Onset, i.e., time of awakening, in absolute timetotal_sleep_duration
: Total sleep duration, i.e., time between Sleep Onset and Wake Onset, in minutes
The following columns are common, but not required:
total_duration
: Total recording time, in minutesnet_sleep_duration
: Net duration spent sleeping, in minutesbed_interval_start
: Bed Interval Start, i.e, time when participant went to bed, in absolute timebed_interval_end
: Bed Interval End, i.e, time when participant left bed, in absolute timesleep_efficiency
: Sleep Efficiency, defined as the ratio between net sleep duration and sleep duration in percentsleep_onset_latency
: Sleep Onset Latency, i.e., time in bed needed to fall asleep, in minutesgetup_latency
: Get Up Latency, i.e., time in bed after awakening until getting up, in minuteswake_after_sleep_onset
: Wake After Sleep Onset (WASO), i.e., total time awake after falling asleep, in minutesnumber_wake_bouts
: Total number of wake bouts
The following columns are further possible:
total_time_light_sleep
: Total time of light sleep, in minutestotal_time_deep_sleep
: Total time of deep sleep, in minutestotal_time_rem_sleep
: Total time of REM sleep, in minutestotal_time_awake
: Total time of being awake, in minutescount_snoring_episodes
: Total number of snoring episodestotal_time_snoring
: Total time of snoring, in minutesheart_rate_avg
: Average heart rate during recording, in bpmheart_rate_min
: Minimum heart rate during recording, in bpmheart_rate_max
: Maximum heart rate during recording, in bpm
alias of
Union
[biopsykit.utils.datatype_helper._SleepEndpointDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SleepEndpointDict¶
Dictionary containing sleep endpoints in a standardized format.
The dict entries represent the sleep endpoints and should follow a standardized naming convention, regardless of the origin (IMU sensor, sleep mattress, psg, etc.).
Required are the entries:
sleep_onset
: Sleep Onset, i.e., time of falling asleep, in absolute timewake_onset
: Wake Onset, i.e., time of awakening, in absolute timetotal_sleep_duration
: Total sleep duration, i.e., time between Sleep Onset and Wake Onset, in minutes
The following entries are common, but not required:
total_duration
: Total recording time, in minutesnet_sleep_duration
: Net duration spent sleeping, in minutesbed_interval_start
: Bed Interval Start, i.e, time when participant went to bed, in absolute timebed_interval_end
: Bed Interval End, i.e, time when participant left bed, in absolute timesleep_efficiency
: Sleep Efficiency, defined as the ratio between net sleep duration and sleep duration in percentsleep_onset_latency
: Sleep Onset Latency, i.e., time in bed needed to fall asleep, in minutesgetup_latency
: Get Up Latency, i.e., time in bed after awakening until getting up, in minuteswake_after_sleep_onset
: Wake After Sleep Onset (WASO), i.e., total time awake after falling asleep, in minutessleep_bouts
: List with start and end times of sleep boutswake_bouts
: List with start and end times of wake boutsnumber_wake_bouts
: Total number of wake bouts
The following entries are, for instance, further possible:
total_time_light_sleep
: Total time of light sleep, in minutestotal_time_deep_sleep
: Total time of deep sleep, in minutestotal_time_rem_sleep
: Total time of REM sleep, in minutestotal_time_awake
: Total time of being awake, in minutescount_snoring_episodes
: Total number of snoring episodestotal_time_snoring
: Total time of snoring, in minutesheart_rate_avg
: Average heart rate during recording, in bpmheart_rate_min
: Minimum heart rate during recording, in bpmheart_rate_max
: Maximum heart rate during recording, in bpm
- biopsykit.utils.datatype_helper.EcgRawDataFrame¶
DataFrame
containing raw ECG data of one subject.The dataframe is expected to have the following columns:
ecg
: Raw ECG signal
alias of
Union
[biopsykit.utils.datatype_helper._EcgRawDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.EcgResultDataFrame¶
DataFrame
containing processed ECG data of one subject.The dataframe is expected to have the following columns:
ECG_Raw
: Raw ECG signalECG_Clean
: Cleaned (filtered) ECG signalECG_Quality
: ECG signal quality indicator in the range of [0, 1]ECG_R_Peaks
: 1.0 where R peak was detected in the ECG signal, 0.0 elseR_Peak_Outlier
: 1.0 when a detected R peak was classified as outlier, 0.0 elseHeart_Rate
: Computed Heart rate interpolated to signal length
alias of
Union
[biopsykit.utils.datatype_helper._EcgResultDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.RPeakDataFrame¶
DataFrame
containing R-peak locations of one subject extracted from ECG data.The dataframe is expected to have the following columns:
R_Peak_Quality
: Signal quality indicator (of the raw ECG signal) in the range of [0, 1]R_Peak_Idx
: Array index of detected R peak in the raw ECG signalRR_Interval
: Interval between the current and the successive R peak in secondsR_Peak_Outlier
: 1.0 when a detected R peak was classified as outlier, 0.0 else
alias of
Union
[biopsykit.utils.datatype_helper._RPeakDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.HeartRateDataFrame¶
DataFrame
containing heart rate time series data of one subject.The dataframe is expected to have the following columns:
Heart_Rate
: Heart rate data. Can either be instantaneous heart rate or resampled heart rate
alias of
Union
[biopsykit.utils.datatype_helper._HeartRateDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.Acc1dDataFrame¶
DataFrame
containing 1-d acceleration data.The dataframe is expected to have one of the following column sets:
[“acc”]: one level column index
[“acc_norm”]: one level column index
alias of
Union
[biopsykit.utils.datatype_helper._Acc1dDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.Acc3dDataFrame¶
DataFrame
containing 3-d acceleration data.The dataframe is expected to have one of the following column sets:
[“acc_x”, “acc_y”, “acc_z”]: one level column index
[(“acc”, “x”), (“acc”, “y”), (“acc”, “z”)]: two-level column index, first level specifying the channel (acceleration), second level specifying the axes
alias of
Union
[biopsykit.utils.datatype_helper._Acc3dDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.Gyr1dDataFrame¶
DataFrame
containing 1-d gyroscope data.The dataframe is expected to have one of the following column sets:
[“gyr”]: one level column index
[“gyr_norm”]: one level column index
alias of
Union
[biopsykit.utils.datatype_helper._Gyr1dDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.Gyr3dDataFrame¶
DataFrame
containing 3-d gyroscope data.The dataframe is expected to have one of the following column sets:
[“gyr_x”, “gyr_y”, “gyr_z”]: one level column index
[(“gyr”, “x”), (“gyr”, “y”), (“gyr”, “z”)]: two-level column index, first level specifying the channel (gyroscope), second level specifying the axes
alias of
Union
[biopsykit.utils.datatype_helper._Gyr3dDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.ImuDataFrame¶
DataFrame
containing 6-d inertial measurement (IMU) (acceleration and gyroscope) data.Hence, an
ImuDataFrame
must both be aAccDataFrame
and aGyrDataFrame
.The dataframe is expected to have one of the following column sets:
[“acc_x”, “acc_y”, “acc_z”, “gyr_x”, “gyr_y”, “gyr_z”]: one level column index
[(“acc”, “x”), (“acc”, “y”), (“acc”, “z”), (“gyr”, “x”), (“gyr”, “y”), (“gyr”, “z”)]: two-level column index, first level specifying the channel (acceleration and gyroscope), second level specifying the axes
alias of
Union
[biopsykit.utils.datatype_helper._ImuDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SleepWakeDataFrame¶
DataFrame
containing sleep/wake predictions.The dataframe is expected to have at least the following column(s):
[“sleep_wake”]: sleep/wake predictions where 1 indicates sleep and 0 indicates wake
alias of
Union
[biopsykit.utils.datatype_helper._SleepWakeDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SubjectConditionDataFrame¶
DataFrame
containing subject IDs and condition assignment in a standardized format.A
SubjectConditionDataFrame
has an index with subject IDs namedsubject
and a column with the condition assignment namedcondition
.alias of
Union
[biopsykit.utils.datatype_helper._SubjectConditionDataFrame
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SubjectConditionDict¶
Dictionary containing subject IDs and condition assignment in a standardized format.
A
SubjectConditionDict
contains conditions as dictionary keys and a collection of subject IDs (list, numpy array, pandas Index) as dictionary values.alias of
Dict
[str
,numpy.ndarray
]
- biopsykit.utils.datatype_helper.PhaseDict¶
Dictionary containing general time-series data of one single subject split into different phases.
A
PhaseDict
is a dictionary with the following format:{ “phase_1” : dataframe, “phase_2” : dataframe, … }
Each
dataframe
is aDataFrame
with the following format:Index:
pandas.DatetimeIndex
with timestamps, name of index level:time
alias of
Dict
[str
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.SubjectDataDict¶
Dictionary representing time-series data from multiple subjects collected during a psychological protocol.
A
SubjectDataDict
is a nested dictionary with time-series data from multiple subjects, each containing data from different phases. It is expected to have the level order subject, phase:{“subject1” : { “phase_1” : dataframe, “phase_2” : dataframe, … },“subject2” : { “phase_1” : dataframe, “phase_2” : dataframe, … },…}This dictionary can, for instance, be rearranged to a
biopsykit.utils.datatype_helper.StudyDataDict
, where the level order is reversed: phase, subject.alias of
Dict
[str
,Dict
[str
,pandas.core.frame.DataFrame
]]
- biopsykit.utils.datatype_helper.HeartRatePhaseDict¶
Dictionary containing time-series heart rate data of one single subject split into different phases.
A
HeartRatePhaseDict
is a dictionary with the following format:{ “phase_1” : hr_dataframe, “phase_2” : hr_dataframe, … }
Each
hr_dataframe
is aDataFrame
with the following format:time
Index:pandas.DatetimeIndex
with heart rate sample timestampsHeart_Rate
Column: heart rate values
alias of
Dict
[str
,Union
[biopsykit.utils.datatype_helper._HeartRateDataFrame
,pandas.core.frame.DataFrame
]]
- biopsykit.utils.datatype_helper.HeartRateSubjectDataDict¶
Dictionary with time-series heart rate data from multiple subjects collected during a psychological protocol.
A
HeartRateSubjectDataDict
is a nested dictionary with time-series heart rate data from multiple subjects, each containing data from different phases. It is expected to have the level order subject, phase:{“subject1” : { “phase_1” : hr_dataframe, “phase_2” : hr_dataframe, … },“subject2” : { “phase_1” : hr_dataframe, “phase_2” : hr_dataframe, … },…}Each
hr_dataframe
is aDataFrame
with the following format:time
Index:pandas.DatetimeIndex
with heart rate sample timestampsHeart_Rate
Column: heart rate values
This dictionary can, for instance, be rearranged to a
HeartRateStudyDataDict
, where the level order is reversed: phase, subject.alias of
Union
[Dict
[str
,Dict
[str
,Union
[biopsykit.utils.datatype_helper._HeartRateDataFrame
,pandas.core.frame.DataFrame
]]],Dict
[str
,Dict
[str
,Dict
[str
,Union
[biopsykit.utils.datatype_helper._HeartRateDataFrame
,pandas.core.frame.DataFrame
]]]]]
- biopsykit.utils.datatype_helper.HeartRateStudyDataDict¶
Dictionary with heart rate data from multiple phases collected during a psychological protocol.
A
HeartRateStudyDataDict
is a nested dictionary with time-series heart rate data from multiple phases, each phase containing data from different subjects. It is expected to have the level order phase, subject:{“phase_1” : { “subject1” : hr_dataframe, “subject2” : hr_dataframe, … },“phase_2” : { “subject1” : hr_dataframe, “subject2” : hr_dataframe, … },…}Each
hr_dataframe
is aDataFrame
with the following format:time
Index:pandas.DatetimeIndex
with heart rate sample timestampsHeart_Rate
Column: heart rate values
This dict results from rearranging a
HeartRateSubjectDataDict
by callingrearrange_subject_data_dict()
.alias of
Dict
[str
,Dict
[str
,Union
[biopsykit.utils.datatype_helper._HeartRateDataFrame
,pandas.core.frame.DataFrame
]]]
- biopsykit.utils.datatype_helper.StudyDataDict¶
Dictionary with data from multiple phases collected during a psychological protocol.
A
StudyDataDict
is a nested dictionary with time-series data from multiple phases, each phase containing data from different subjects. It is expected to have the level order phase, subject:{“phase_1” : { “subject1” : dataframe, “subject2” : dataframe, … },“phase_2” : { “subject1” : dataframe, “subject2” : dataframe, … },…}This dict results from rearranging a
biopsykit.utils.datatype_helper.SubjectDataDict
by callingrearrange_subject_data_dict()
.alias of
Dict
[str
,Dict
[str
,pandas.core.frame.DataFrame
]]
- biopsykit.utils.datatype_helper.MergedStudyDataDict¶
Dictionary with merged time-series data of multiple subjects, split into different phases.
A
MergedStudyDataDict
is a dictionary with the following format:{“phase_1” : merged_dataframe,“phase_2” : merged_dataframe,…}This dict results from merging the inner dictionary into one dataframe by calling
merge_study_data_dict()
.Note
Merging the inner dictionaries requires that the dataframes of all subjects have same length within each phase.
Each
merged_dataframe
is aDataFrame
with the following format:Index: time. Name of index level:
time
Columns: time series data per subject, each subject has its own column. Name of the column index level:
subject
alias of
Dict
[str
,pandas.core.frame.DataFrame
]
- biopsykit.utils.datatype_helper.is_subject_condition_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SubjectConditionDataFrame
.- Parameters
- Returns
True
ifdata
is aSubjectConditionDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSubjectConditionDataFrame
- Return type
See also
SubjectConditionDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_subject_condition_dict(data, raise_exception=True)[source]¶
Check whether dataframe is a
SubjectConditionDict
.- Parameters
- Returns
True
ifdata
is aSubjectConditionDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSubjectConditionDict
- Return type
See also
SubjectConditionDict
dictionary format
- biopsykit.utils.datatype_helper.is_codebook_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
CodebookDataFrame
.- Parameters
- Returns
True
ifdata
is aCodebookDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aCodebookDataFrame
- Return type
See also
CodebookDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_mean_se_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
MeanSeDataFrame
.- Parameters
- Returns
True
ifdata
is aMeanSeDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aMeanSeDataFrame
- Return type
See also
MeanSeDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_phase_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
PhaseDict
.- Parameters
- Returns
True
ifdata
is aPhaseDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aPhaseDict
- Return type
See also
PhaseDict
dictionary format
- biopsykit.utils.datatype_helper.is_hr_phase_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
HeartRatePhaseDict
.- Parameters
- Returns
True
ifdata
is aHeartRatePhaseDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aHeartRatePhaseDict
- Return type
See also
HeartRatePhaseDict
dictionary format
- biopsykit.utils.datatype_helper.is_subject_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
SubjectDataDict
.- Parameters
- Returns
True
ifdata
is aSubjectDataDict`
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSubjectDataDict
- Return type
See also
SubjectDataDict
dictionary format
- biopsykit.utils.datatype_helper.is_hr_subject_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
HeartRateSubjectDataDict
.- Parameters
- Returns
True
ifdata
is aHeartRateSubjectDataDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aHeartRateSubjectDataDict
- Return type
See also
HeartRateSubjectDataDict
dictionary format
- biopsykit.utils.datatype_helper.is_study_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
StudyDataDict
.- Parameters
- Returns
True
ifdata
is aStudyDataDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aStudyDataDict
- Return type
See also
StudyDataDict
dictionary format
- biopsykit.utils.datatype_helper.is_merged_study_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
MergedStudyDataDict
.- Parameters
- Returns
True
ifdata
is aMergedStudyDataDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aMergedStudyDataDict
- Return type
See also
MergedStudyDataDict
dictionary format
- biopsykit.utils.datatype_helper.is_saliva_raw_dataframe(data, saliva_type, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaRawDataFrame
.- Parameters
- Returns
True
ifdata
is aSalivaRawDataFrame`
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSalivaRawDataFrame
- Return type
See also
SalivaRawDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_saliva_feature_dataframe(data, saliva_type, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaFeatureDataFrame
.- Parameters
- Returns
True
ifdata
is aSalivaFeatureDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSalivaFeatureDataFrame
- Return type
See also
SalivaFeatureDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_saliva_mean_se_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaMeanSeDataFrame
.- Parameters
- Returns
True
ifdata
is aSalivaMeanSeDataFrame`
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSalivaMeanSeDataFrame
- Return type
See also
SalivaMeanSeDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_sleep_endpoint_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SleepEndpointDataFrame
.- Parameters
- Returns
True
ifdata
is aSleepEndpointDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSleepEndpointDataFrame
- Return type
See also
SleepEndpointDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_sleep_endpoint_dict(data, raise_exception=True)[source]¶
Check whether dictionary is a
SleepEndpointDict
.- Parameters
- Returns
True
ifdata
is aSleepEndpointDict
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSleepEndpointDict
- Return type
See also
SleepEndpointDict
dictionary format
- biopsykit.utils.datatype_helper.is_ecg_raw_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
EcgRawDataFrame
.- Parameters
- Returns
True
ifdata
is aEcgRawDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aEcgRawDataFrame
- Return type
See also
EcgRawDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_ecg_result_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
EcgResultDataFrame
.- Parameters
- Returns
True
ifdata
is aEcgResultDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aEcgResultDataFrame
- Return type
See also
EcgResultDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_r_peak_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
RPeakDataFrame
.- Parameters
- Returns
True
ifdata
is aRPeakDataFrame`
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aRPeakDataFrame
- Return type
See also
RPeakDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_heart_rate_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
HeartRateDataFrame
.- Parameters
- Returns
True
ifdata
is aHeartRateDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aHeartRateDataFrame
- Return type
See also
HeartRateDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_acc1d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Acc1dDataFrame
.- Parameters
- Returns
True
ifdata
is aAcc1dDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aAcc1dDataFrame
- Return type
See also
Acc1dDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_acc3d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Acc3dDataFrame
.- Parameters
- Returns
True
ifdata
is aAcc3dDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aAcc3dDataFrame
- Return type
See also
Acc3dDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_gyr1d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Gyr1dDataFrame
.- Parameters
- Returns
True
ifdata
is aGyr1dDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aGyr1dDataFrame
- Return type
See also
Gyr1dDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_gyr3d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Gyr3dDataFrame
.- Parameters
- Returns
True
ifdata
is aGyr3dDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aGyr3dDataFrame
- Return type
See also
Gyr3dDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_imu_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
ImuDataFrame
.- Parameters
- Returns
True
ifdata
is aImuDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aImuDataFrame
- Return type
See also
ImuDataFrame
dataframe format
- biopsykit.utils.datatype_helper.is_sleep_wake_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SleepWakeDataFrame
.- Parameters
- Returns
True
ifdata
is aSleepWakeDataFrame
False
otherwise (ifraise_exception
isFalse
)
- Raises
ValidationError – if
raise_exception
isTrue
anddata
is not aSleepWakeDataFrame
- Return type
See also
SleepWakeDataFrame
dataframe format