cardioception.HSD.parameters.getParameters#
- cardioception.HSD.parameters.getParameters(participant='SubjectTest', session='001', setup='behavioral', axis=None, nTrials=None, device='keyboard', screenNb=0, fullscr=True, nBreaking=20, resultPath=None, overwrite=False, confidenceScale=None, language='english', seed=None, autopilot=None, recorder=None, beat_source=None, tone_player=None, triggers=None, config=None, clock=None)[source]#
Create Heartbeat Synchrony Discrimination task parameters.
Beta. The design is documented in
docs/source/tasks/hsd/design.md.- Parameters
- participant, sessionstr
Identifiers, as for the HRD.
- setupstr
"behavioral"buildsLSLBeatSourceoverrecorderandTonePlayer(PsychPortAudio, the tone fromconfig), both on the session clock."test"opens a small window and needsbeat_sourceandtone_playerpassed in.- axisstr | None
"absolute": delays in ms after the R-wave."phase": delays as a fraction of the anticipated interbeat interval.Nonekeeps the axis ofconfig("absolute"by default).- nTrialsint | None
The most trials to run, written into
configasmaxTrials.Nonekeepsconfig.maxTrials(60 by default). The session stops earlier once themucredible interval is narrow enough, afterconfig.minTrials, whichnTrialsmay not be below.- devicestr
"keyboard", the only device so far.- screenNbint
Screen number, for
psychopy.visual.Window.- fullscrbool
Full screen. Always off with
setup="test".- nBreakingint
Trials between breaks.
0for none.- resultPathstr | 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.
- confidenceScaleConfidenceScale | None
How confidence is collected.
Nonetakes ten discrete steps, as the HRD keyboard does, with the language’s end labels.- languagestr
A language in
cardioception/HSD/texts;"english"so far.- seedint | None
Seeds the session generator. Recorded either way.
- autopilotHSDAutopilot | None
A simulated participant, for headless runs.
- recorderLSLRecorder | None
The LSL recorder whose stream the beat source reads, and whose marker outlet receives the task’s JSON markers. Its own
readandreadInWaitingare not used: the beat source is the sole reader of the inlet, so the recorder holds no signal and the task saves no recording file of its own. Record the ECG stream and the marker stream with LabRecorder: the XDF is the session’s recording.- beat_source, tone_player
Objects satisfying
BeatSourceandTonePlayer. They win oversetup. Both must report times on the session clock.- triggersdict | None
{event: callable}for the events incardioception.HSD._constants.EVENTS.- configTaskConfig | None
Every design value.
axisandnTrials, when given, replace itsaxisandmaxTrials.- clockcallable | None
The session clock.
Nonetakesdefault_clock().
Notes
The HSD writes nothing to
Channel_0. Its trigger codes (cardioception.HSD._constants.Trigger) go to the recorder’s marker stream as JSON instead,{"kind": "trigger", "name", "code", "trial"}, together with the scheduler’sbeat,tone_scheduled,tone_onsetandtone_skippedmarkers and thedecisionandconfidencemarkers, one string per marker. The HRD writes different meanings to the same trigger codes.