cardioception.HBC.parameters.getParameters#

cardioception.HBC.parameters.getParameters(participant='Participant', session='001', serialPort='COM3', taskVersion='Garfinkel', setup='behavioral', screenNb=0, fullscr=True, resultPath=None, overwrite=False, confidenceScale=None, systole_kw={}, seed=None, triggers=None, language='english', recorder=None)[source]#

Create Heartbeat Counting task parameters.

Parameters
languagestr

The language of the instructions, a file in HBC/texts/. Can be “english” (default) or “german”; cardioception.HBC.languages.available() lists them. An unknown language raises ValueError before anything is created.

participantstr

Subject ID. Default is ‘exteroStairCase’.

recorderobject | None

A recording device to use instead of the one setup would open, e.g. cardioception.devices.LSLRecorder to read ECG from an LSL stream. Overrides setup’s choice of device but not its window.

resultPathstr or None

Root directory holding every participant. Results go to <resultPath>/sub-<participant>/ses-<session>/run-<timestamp>/. Defaults to <cwd>/data.

overwritebool

Allow writing into a run directory that already holds results. Off by default, so a repeated run cannot silently replace an earlier one.

confidenceScaleConfidenceScale | None

How confidence is collected and what its numbers mean. Defaults to seven discrete steps, labelled in the chosen language. A scale passed here keeps its own labels. See cardioception.scales.

screenNbint

Screen number. Used to parametrize py:func:psychopy.visual.Window. Default is set to 0.

serialPort: str

The USB port where the pulse oximeter is plugged. Should be written as a string e.g. “COM3” for USB ports on Windows.

sessionint

Session number. Default to ‘001’.

setupstr

Context of oximeter recording. “behavioral” will record through a Nonin pulse oximeter, “test” will use pre-recorded pulse time series (for testing only).

systole_kwdict

Additional keyword arguments for systole.recorder.Oxmeter.

taskVersionstr or None

Task version to run. Can be ‘Garfinkel’, ‘Schandry’, ‘test’ or None.

Attributes
conditions1d array-like of str

The conditions. Can be ‘Rest’, ‘Training’ or ‘Count’.

confidenceScalecardioception.scales.ConfidenceScale

The confidence scale in use, and the meaning of its numbers.

heartLogopsychopy.visual.ImageStim

Image presented during resting conditions.

labelsRatinglist

The labels of the confidence rating scale.

languagestr

The language of the instructions.

noteStartpsychopy.sound.Sound instance

The sound that will be played when trial starts.

noteStoppsychopy.sound.Sound instance

The sound that will be played when trial ends.

pathstr

The task working directory.

randomizebool

If True (default), will randomize the order of the conditions. If taskVersion is not None, will use the default task parameter instead.

ratingbool

If True (default), will add a rating scale after the evaluation.

restLengthint

The length of the resting period (seconds). Default is 300 seconds.

restLogopsychopy.visual.ImageStim

Image presented during resting conditions.

restPeriodbool

If True, a resting period will be proposed before the task.

resultPathstr

The subject result directory.

screenNbint

The screen number (Psychopy parameter). Default set to 0.

serialserial.Serial

The serial port used to record the PPG activity.

startKeystr

The key to press to start the task and go to next steps.

taskVersionstr or None

Task version to run. Can be ‘Garfinkel’, ‘Schandry’, ‘test’ or None.

textsdict

The texts to be presented, from HBC/texts/<language>.yaml.

textSizefloat

Text size.

triggersdict

Dictionary {str, callable or None}. The function will be executed before the corresponding trial sequence. The default values are None (no trigger sent). * “trialStart” * “trialStop” * “listeningStart” * “listeningStop” * “decisionStart” * “decisionStop” * “confidenceStart” * “confidenceStop”

times1d array-like of int

Length of trials, in seconds.

winpsychopy.visual.window

The window in which to draw objects.