cardioception.PAT.task.trial#

cardioception.PAT.task.trial(parameters, trialNumber, block, startPhase, confidenceRating=True)[source]#

Run one trial of the Phase Adjustment Task.

The engine starts tones at startPhase; the mouse wheel (and the left and right keys) moves them until the participant presses space. The engine then waits for the next R-wave, for the observed period, and the participant rates their confidence. The row is appended to parameters[“results_df”] and the files are saved.

Parameters
parametersdict

Task parameters.

trialNumberint

Trial number, counted across practice and main trials so that it is unique in the marker stream and in tones.txt.

blockstr

“practice” or “main”.

startPhasefloat

Start phase of the dial, in degrees.

confidenceRatingbool

If False, no confidence rating is asked.

Returns
rowdict

The row added to final.txt.