cardioception.HSD.task.run#

cardioception.HSD.task.run(parameters, confidenceRating=True, runTutorial=True)[source]#

Run the Heartbeat Synchrony Discrimination task.

Parameters
parametersdict

Task parameters, from cardioception.HSD.parameters.getParameters().

confidenceRatingbool

Ask for a confidence rating after each decision.

runTutorialbool

Show the instructions and three practice trials first.

Raises
RuntimeError

After MAX_EMPTY_TRIALS trials in a row that delivered no tone. The files are saved first.

Notes

Writes final (one row per trial, see cardioception.HSD._outcome.HSDTrialOutcome), tones (one row per beat a tone was tried on), beats (every beat polled), posterior (.npy, float32, the posterior after every trial), engine (JSON, the engine’s state) and the parameters pickle. The nTrials column counts the trials that had reached the posterior when the row was written.

beats holds every beat polled during the session, filed under the trial whose markers carry it. Those polled between trains have status "between": polled before a train, they are filed with its trial and attempt; polled after it, during the decision, the rating or a break, with that trial and no attempt. Beats polled before the first trial, or around the practice trials, have no trial.