biopsykit.utils.dtypes module¶
A couple of helper functions that ease the use of the typical biopsykit data formats.
- biopsykit.utils.dtypes.Acc1dDataFrame = biopsykit.utils.dtypes._Acc1dDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.Acc3dDataFrame = biopsykit.utils.dtypes._Acc3dDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.BPointDataFrame = biopsykit.utils.dtypes._BPointDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining B-Point locations extracted from ICG data.The dataframe is expected to have at least the following columns:
b_point_sample: The sample index of the B-point in the ICG signal
Optionally, the dataframe can contain additional columns, such as:
nan_reason: Reason why the B-point was set to NaN (e.g., “c_point_nan”, “no_zero_crossing”)
- biopsykit.utils.dtypes.BiomarkerRawDataFrame = biopsykit.utils.dtypes._BiomarkerRawDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining raw biomarker data in a standardized format.Data needs to be in long-format and must have a
pandas.MultiIndexwith 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…
- biopsykit.utils.dtypes.CPointDataFrame = biopsykit.utils.dtypes._CPointDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining C-Point locations extracted from ICG data.The dataframe is expected to have at least the following columns:
c_point_sample: The sample index of the C-point in the ICG signal
Optionally, the dataframe can contain additional columns, such as:
nan_reason: Reason why the C-point was set to NaN (e.g., “no_local_maxima”)
- biopsykit.utils.dtypes.CodebookDataFrame = biopsykit.utils.dtypes._CodebookDataFrame | pandas.core.frame.DataFrame¶
DataFramerepresenting a codebook which encodes numerical and categorical values in a standardized format.A
CodebookDataFramehas 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.
- biopsykit.utils.dtypes.EcgRawDataFrame = biopsykit.utils.dtypes._EcgRawDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining raw ECG data of one subject.The dataframe is expected to have the following columns:
ecg: Raw ECG signal
- biopsykit.utils.dtypes.EcgResultDataFrame = biopsykit.utils.dtypes._EcgResultDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.Gyr1dDataFrame = biopsykit.utils.dtypes._Gyr1dDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.Gyr3dDataFrame = biopsykit.utils.dtypes._Gyr3dDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.HeartRateDataFrame = biopsykit.utils.dtypes._HeartRateDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.HeartRatePhaseDict¶
Dictionary containing time-series heart rate data of one single subject split into different phases.
A
HeartRatePhaseDictis a dictionary with the following format:{ “phase_1” : hr_dataframe, “phase_2” : hr_dataframe, … }
Each
hr_dataframeis aDataFramewith the following format:timeIndex:pandas.DatetimeIndexwith heart rate sample timestampsHeart_RateColumn: heart rate values
- biopsykit.utils.dtypes.HeartRateStudyDataDict¶
Dictionary with heart rate data from multiple phases collected during a psychological protocol.
A
HeartRateStudyDataDictis 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_dataframeis aDataFramewith the following format:timeIndex:pandas.DatetimeIndexwith heart rate sample timestampsHeart_RateColumn: heart rate values
This dict results from rearranging a
HeartRateSubjectDataDictby callingrearrange_subject_data_dict().
- biopsykit.utils.dtypes.HeartRateSubjectDataDict = dict[str, dict[str, biopsykit.utils.dtypes._HeartRateDataFrame | pandas.core.frame.DataFrame]] | dict[str, dict[str, dict[str, biopsykit.utils.dtypes._HeartRateDataFrame | pandas.core.frame.DataFrame]]]¶
Dictionary with time-series heart rate data from multiple subjects collected during a psychological protocol.
A
HeartRateSubjectDataDictis 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_dataframeis aDataFramewith the following format:timeIndex:pandas.DatetimeIndexwith heart rate sample timestampsHeart_RateColumn: heart rate values
This dictionary can, for instance, be rearranged to a
HeartRateStudyDataDict, where the level order is reversed: phase, subject.
- biopsykit.utils.dtypes.HeartbeatSegmentationDataFrame = biopsykit.utils.dtypes._HeartbeatSegmentationDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining results of heartbeat segmentation.The dataframe is expected to have at least the following columns:
start_sample: Start sample of segmented heartbeatend_sample: End sample of segmented heartbeatr_peak_sample: R-peak sample of segmented heartbeat
- biopsykit.utils.dtypes.IcgRawDataFrame = biopsykit.utils.dtypes._IcgRawDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining raw ICG data of one subject.The dataframe is expected to have one of the following columns:
icg: Raw ICG signalicg_der: Derivative of the ICG signal
- biopsykit.utils.dtypes.ImuDataFrame = biopsykit.utils.dtypes._ImuDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 6-d inertial measurement (IMU) (acceleration and gyroscope) data.Hence, an
ImuDataFramemust both be aAccDataFrameand 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
- biopsykit.utils.dtypes.MeanSeDataFrame = biopsykit.utils.dtypes._MeanSeDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining mean and standard error of time-series data in a standardized format.The resulting dataframe must at least the two columns
meanandse. It can have additional index levels, such asphase,subphaseorcondition.
- biopsykit.utils.dtypes.MergedStudyDataDict¶
Dictionary with merged time-series data of multiple subjects, split into different phases.
A
MergedStudyDataDictis 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_dataframeis aDataFramewith the following format:Index: time. Name of index level:
timeColumns: time series data per subject, each subject has its own column. Name of the column index level:
subject
- biopsykit.utils.dtypes.PepResultDataFrame = biopsykit.utils.dtypes._PepResultDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining results of PEP extraction.The dataframe is expected to have at least the following columns:
heartbeat_start_sample: Start sample of segmented heartbeatheartbeat_end_sample: End sample of segmented heartbeatr_peak_sample: R-peak sample of segmented heartbeatq_peak_sample: Q-peak sample of segmented heartbeatb_point_sample: B-point sample of segmented heartbeatpep_sample: Pre-ejection period (PEP) in samplespep_ms: Pre-ejection period (PEP) in milliseconds
Additionally, the dataframe can contain the following columns:
rr_interval_sample: RR interval between the previous and the current heartbeat in samplesrr_interval_ms: RR interval between the previous and the current heartbeat in millisecondsheart_rate_bpm: Heart rate in beats per minute, derived from RR intervalnan_reason: Reason why the PEP was set to NaN (e.g., “r_peak_nan”, “no_zero_crossing”)
- biopsykit.utils.dtypes.PhaseDict¶
Dictionary containing general time-series data of one single subject split into different phases.
A
PhaseDictis a dictionary with the following format:{ “phase_1” : dataframe, “phase_2” : dataframe, … }
Each
dataframeis aDataFramewith the following format:Index:
pandas.DatetimeIndexwith timestamps, name of index level:time
- biopsykit.utils.dtypes.QPeakDataFrame = biopsykit.utils.dtypes._QPeakDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining Q-peak locations extracted from ECG data.The dataframe is expected to have at least the following columns:
q_peak_sample: The sample index of the Q-peak in the ECG signal
Optionally, the dataframe can contain additional columns, such as:
nan_reason: Reason why the Q-peak was set to NaN (e.g., “r_peak_nan”, “no_zero_crossing”)
- biopsykit.utils.dtypes.RPeakDataFrame = biopsykit.utils.dtypes._RPeakDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.SalivaFeatureDataFrame = biopsykit.utils.dtypes._SalivaFeatureDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining feature computed from saliva data in a standardized format.The resulting dataframe must at least have a
subjectindex 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.
- biopsykit.utils.dtypes.SalivaMeanSeDataFrame = biopsykit.utils.dtypes._SalivaMeanSeDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining mean and standard error of saliva samples in a standardized format.The resulting dataframe must at least have a
sampleindex level and the two columnsmeanandse. It can have additional index levels, such asconditionortime.
- biopsykit.utils.dtypes.SalivaRawDataFrame = biopsykit.utils.dtypes._BiomarkerRawDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining raw saliva data in a standardized format.Data needs to be in long-format and must have a
pandas.MultiIndexwith 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…
- biopsykit.utils.dtypes.SleepEndpointDataFrame = biopsykit.utils.dtypes._SleepEndpointDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining sleep endpoints in a standardized format.The resulting dataframe must at least have a
dateindex 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
- biopsykit.utils.dtypes.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.dtypes.SleepWakeDataFrame = biopsykit.utils.dtypes._SleepWakeDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining 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
- biopsykit.utils.dtypes.StudyDataDict¶
Dictionary with data from multiple phases collected during a psychological protocol.
A
StudyDataDictis 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.dtypes.SubjectDataDictby callingrearrange_subject_data_dict().
- biopsykit.utils.dtypes.SubjectConditionDataFrame = biopsykit.utils.dtypes._SubjectConditionDataFrame | pandas.core.frame.DataFrame¶
DataFramecontaining subject IDs and condition assignment in a standardized format.A
SubjectConditionDataFramehas an index with subject IDs namedsubjectand a column with the condition assignment namedcondition.
- biopsykit.utils.dtypes.SubjectConditionDict¶
Dictionary containing subject IDs and condition assignment in a standardized format.
A
SubjectConditionDictcontains conditions as dictionary keys and a collection of subject IDs (list, numpy array, pandas Index) as dictionary values.
- biopsykit.utils.dtypes.SubjectDataDict¶
Dictionary representing time-series data from multiple subjects collected during a psychological protocol.
A
SubjectDataDictis 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.dtypes.StudyDataDict, where the level order is reversed: phase, subject.
- biopsykit.utils.dtypes.is_acc1d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Acc1dDataFrame.- Parameters
- Returns
Trueifdatais aAcc1dDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aAcc1dDataFrame- Return type
bool | None
See also
Acc1dDataFramedataframe format
- biopsykit.utils.dtypes.is_acc3d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Acc3dDataFrame.- Parameters
- Returns
Trueifdatais aAcc3dDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aAcc3dDataFrame- Return type
bool | None
See also
Acc3dDataFramedataframe format
- biopsykit.utils.dtypes.is_b_point_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
BPointDataFrame.- Parameters
- Returns
Trueifdatais aBPointDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aBPointDataFrame- Return type
bool | None
See also
BPointDataFramedataframe format
- biopsykit.utils.dtypes.is_biomarker_raw_dataframe(data, biomarker_type, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaRawDataFrame.- Parameters
- Returns
Trueifdatais aSalivaRawDataFrame`Falseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSalivaRawDataFrame- Return type
bool | None
See also
SalivaRawDataFramedataframe format
- biopsykit.utils.dtypes.is_c_point_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
CPointDataFrame.- Parameters
- Returns
Trueifdatais aCPointDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aCPointDataFrame- Return type
bool | None
See also
CPointDataFramedataframe format
- biopsykit.utils.dtypes.is_codebook_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
CodebookDataFrame.- Parameters
- Returns
Trueifdatais aCodebookDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aCodebookDataFrame- Return type
bool | None
See also
CodebookDataFramedataframe format
- biopsykit.utils.dtypes.is_ecg_raw_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
EcgRawDataFrame.- Parameters
- Returns
Trueifdatais aEcgRawDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aEcgRawDataFrame- Return type
bool | None
See also
EcgRawDataFramedataframe format
- biopsykit.utils.dtypes.is_ecg_result_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
EcgResultDataFrame.- Parameters
- Returns
Trueifdatais aEcgResultDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aEcgResultDataFrame- Return type
bool | None
See also
EcgResultDataFramedataframe format
- biopsykit.utils.dtypes.is_gyr1d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Gyr1dDataFrame.- Parameters
- Returns
Trueifdatais aGyr1dDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aGyr1dDataFrame- Return type
bool | None
See also
Gyr1dDataFramedataframe format
- biopsykit.utils.dtypes.is_gyr3d_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
Gyr3dDataFrame.- Parameters
- Returns
Trueifdatais aGyr3dDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aGyr3dDataFrame- Return type
bool | None
See also
Gyr3dDataFramedataframe format
- biopsykit.utils.dtypes.is_heart_rate_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
HeartRateDataFrame.- Parameters
- Returns
Trueifdatais aHeartRateDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aHeartRateDataFrame- Return type
bool | None
See also
HeartRateDataFramedataframe format
- biopsykit.utils.dtypes.is_heartbeat_segmentation_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
HeartbeatSegmentationDataFrame.- Parameters
- Returns
Trueifdatais aHeartbeatSegmentationDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aHeartbeatSegmentationDataFrame- Return type
bool | None
See also
HeartbeatSegmentationDataFramedataframe format
- biopsykit.utils.dtypes.is_hr_phase_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
HeartRatePhaseDict.- Parameters
- Returns
Trueifdatais aHeartRatePhaseDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aHeartRatePhaseDict- Return type
bool | None
See also
HeartRatePhaseDictdictionary format
- biopsykit.utils.dtypes.is_hr_subject_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
HeartRateSubjectDataDict.- Parameters
- Returns
Trueifdatais aHeartRateSubjectDataDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aHeartRateSubjectDataDict- Return type
bool | None
See also
HeartRateSubjectDataDictdictionary format
- biopsykit.utils.dtypes.is_icg_raw_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
IcgRawDataFrame.- Parameters
- Returns
Trueifdatais aIcgRawDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aIcgRawDataFrame- Return type
bool | None
See also
IcgRawDataFramedataframe format
- biopsykit.utils.dtypes.is_imu_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
ImuDataFrame.- Parameters
- Returns
Trueifdatais aImuDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aImuDataFrame- Return type
bool | None
See also
ImuDataFramedataframe format
- biopsykit.utils.dtypes.is_mean_se_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
MeanSeDataFrame.- Parameters
- Returns
Trueifdatais aMeanSeDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aMeanSeDataFrame- Return type
bool | None
See also
MeanSeDataFramedataframe format
- biopsykit.utils.dtypes.is_merged_study_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
MergedStudyDataDict.- Parameters
- Returns
Trueifdatais aMergedStudyDataDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aMergedStudyDataDict- Return type
bool | None
See also
MergedStudyDataDictdictionary format
- biopsykit.utils.dtypes.is_pep_result_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
PepResultDataFrame.- Parameters
- Returns
Trueifdatais aPepResultDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aPepResultDataFrame- Return type
bool | None
See also
PepResultDataFramedataframe format
- biopsykit.utils.dtypes.is_phase_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
PhaseDict.- Parameters
- Returns
Trueifdatais aPhaseDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aPhaseDict- Return type
bool | None
See also
PhaseDictdictionary format
- biopsykit.utils.dtypes.is_q_peak_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
QPeakDataFrame.- Parameters
- Returns
Trueifdatais aQPeakDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aQPeakDataFrame- Return type
bool | None
See also
QPeakDataFramedataframe format
- biopsykit.utils.dtypes.is_r_peak_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
RPeakDataFrame.- Parameters
- Returns
Trueifdatais aRPeakDataFrame`Falseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aRPeakDataFrame- Return type
bool | None
See also
RPeakDataFramedataframe format
- biopsykit.utils.dtypes.is_saliva_feature_dataframe(data, saliva_type, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaFeatureDataFrame.- Parameters
- Returns
Trueifdatais aSalivaFeatureDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSalivaFeatureDataFrame- Return type
bool | None
See also
SalivaFeatureDataFramedataframe format
- biopsykit.utils.dtypes.is_saliva_mean_se_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaMeanSeDataFrame.- Parameters
- Returns
Trueifdatais aSalivaMeanSeDataFrame`Falseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSalivaMeanSeDataFrame- Return type
bool | None
See also
SalivaMeanSeDataFramedataframe format
- biopsykit.utils.dtypes.is_saliva_raw_dataframe(data, saliva_type, raise_exception=True)[source]¶
Check whether dataframe is a
SalivaRawDataFrame.- Parameters
- Returns
Trueifdatais aSalivaRawDataFrame`Falseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSalivaRawDataFrame- Return type
bool | None
See also
SalivaRawDataFramedataframe format
- biopsykit.utils.dtypes.is_sleep_endpoint_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SleepEndpointDataFrame.- Parameters
- Returns
Trueifdatais aSleepEndpointDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSleepEndpointDataFrame- Return type
bool | None
See also
SleepEndpointDataFramedataframe format
- biopsykit.utils.dtypes.is_sleep_endpoint_dict(data, raise_exception=True)[source]¶
Check whether dictionary is a
SleepEndpointDict.- Parameters
- Returns
Trueifdatais aSleepEndpointDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSleepEndpointDict- Return type
bool | None
See also
SleepEndpointDictdictionary format
- biopsykit.utils.dtypes.is_sleep_wake_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SleepWakeDataFrame.- Parameters
- Returns
Trueifdatais aSleepWakeDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSleepWakeDataFrame- Return type
bool | None
See also
SleepWakeDataFramedataframe format
- biopsykit.utils.dtypes.is_study_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
StudyDataDict.- Parameters
- Returns
Trueifdatais aStudyDataDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aStudyDataDict- Return type
bool | None
See also
StudyDataDictdictionary format
- biopsykit.utils.dtypes.is_subject_condition_dataframe(data, raise_exception=True)[source]¶
Check whether dataframe is a
SubjectConditionDataFrame.- Parameters
- Returns
Trueifdatais aSubjectConditionDataFrameFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSubjectConditionDataFrame- Return type
bool | None
See also
SubjectConditionDataFramedataframe format
- biopsykit.utils.dtypes.is_subject_condition_dict(data, raise_exception=True)[source]¶
Check whether dataframe is a
SubjectConditionDict.- Parameters
- Returns
Trueifdatais aSubjectConditionDictFalseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSubjectConditionDict- Return type
bool | None
See also
SubjectConditionDictdictionary format
- biopsykit.utils.dtypes.is_subject_data_dict(data, raise_exception=True)[source]¶
Check whether a dict is a
SubjectDataDict.- Parameters
- Returns
Trueifdatais aSubjectDataDict`Falseotherwise (ifraise_exceptionisFalse)
- Raises
ValidationError – if
raise_exceptionisTrueanddatais not aSubjectDataDict- Return type
bool | None
See also
SubjectDataDictdictionary format