biopsykit.protocols.car module¶
Module representing the Cortisol Awakening Response (CAR) protocol.
- class biopsykit.protocols.car.CAR(name=None, **kwargs)[source]¶
Bases:
BaseProtocolClass representing psychological protocols for assessing the cortisol awakening response (CAR).
- Parameters
name (str, optional) – name of CAR study or
Noneto use default name (“CAR”). Default:None**kwargs –
additional parameters to be passed to
CARand its superclass,BaseProtocol, such as:car_saliva_plot_params: parameters to stylecar_saliva_plot()
- car_plot_params¶
Plot parameters to style
car_saliva_plot().
- car_saliva_plot(saliva_type='cortisol', **kwargs)[source]¶
Plot CAR saliva data as lineplot.
- Parameters
saliva_type (str, optional) – type of saliva data to plot. Default:
cortisol**kwargs (optional arguments to be passed to
lineplot()) –
- Returns
- Return type
See also
lineplot()draw line plot with error bars
- structure: dict[str, Any]¶
Structure of protocol, i.e., whether protocol is divided into different parts, phases, or subphases.
If protocol is not divided into different parts
protocol_structureis set toNone.
- test_times: Sequence[int]¶
Start and end time of psychological test (in minutes).
If no psychological test was performed in the protocol
test_timesis set to [0, 0].
- sample_times: dict[str, Sequence[int]]¶
Dictionary with sample times of saliva samples (in minutes).
Sample times are either provided explicitly using the
sample_timesparameter inadd_saliva_data()or by extracting it from the saliva data (if atimecolumn is present).
- saliva_data: dict[str, SalivaRawDataFrame]¶
Dictionary with saliva data collected during the study.
Data in
SalivaRawDataFrameformat can be added usingadd_saliva_data().
- hr_data: dict[str, HeartRateSubjectDataDict]¶
Dictionary with heart rate data collected during the study. If the study consists of multiple study parts each part has its own
HeartRateSubjectDataDict. If the study has no individual study parts (only different phases), the name of the one and only study part defaults toStudy(to ensure consistent dictionary structure).Data in
HeartRateSubjectDataDictformat can be added usingadd_hr_data().
- rpeak_data: dict[str, SubjectDataDict]¶
Dictionary with R peak data collected during the study. If the study consists of multiple study parts each part has its own
SubjectDataDict. If the study has no individual study parts (only different phases), the name of the one and only study part defaults toStudy(to ensure consistent dictionary structure).Data in
SubjectDataDictformat can be added usingadd_hr_data().
- hr_results: dict[str, pd.DataFrame]¶
Dictionary with heart rate results.
Dict keys are the identifiers that are specified when computing results from
hr_datausingcompute_hr_results().
- hr_above_baseline_results: dict[str, pd.DataFrame]¶
Dictionary with heart rate above baseline results.
Dict keys are the identifiers that are specified when computing results from
hr_datausingcompute_hr_above_baseline().
- hrv_results: dict[str, pd.DataFrame]¶
Dictionary with heart rate variability ensemble.
Dict keys are the identifiers that are specified when computing ensemble from
rpeak_datausingcompute_hrv_results().
- hrv_above_baseline_results: dict[str, pd.DataFrame]¶
Dictionary with heart rate variability above baseline results.
Dict keys are the identifiers that are specified when computing results from
rpeak_datausingcompute_hrv_above_baseline().
- hr_ensemble: dict[str, dict[str, pd.DataFrame]]¶
Dictionary with merged heart rate data for heart rate ensemble plot.
Dict keys are the identifiers that are specified when computing ensemble HR data from
hr_datausingcompute_hr_ensemble().See also
hr_ensemble_plot()heart rate ensemble plot
- saliva_plot_params: dict[str, Any]¶
Plot parameters for customizing the general saliva plot for a specific psychological protocol.
See also
saliva_plot()saliva plot
- hr_mean_plot_params: dict[str, Any]¶
Plot parameters for customizing the general HR mean plot for a specific psychological protocol.
See also
hr_mean_plot()HR mean plot
- hr_ensemble_plot_params: dict[str, Any]¶
Plot parameters for customizing the general HR ensemble plot for a specific psychological protocol.
See also
hr_ensemble_plot()HR ensemble plot