cardioception.HRD.task.trial#

cardioception.HRD.task.trial(parameters: dict, alpha: float, modality: str, confidenceRating: bool = True, feedback: bool = False, nTrial: Optional[int] = None) Tuple[str, float, float, Optional[str], Optional[float], Optional[float], Optional[float], float, Optional[bool], bool, bool, float, float, float, Optional[float], Optional[float], float][source]#

Run one trial of the Heart Rate Discrimination task.

Parameters
parameterdict

Task parameters.

alphafloat

The intensity of the stimulus, from the staircase procedure.

modalitystr

The modality, can be ‘Intero’ or ‘Extro’ if an exteroceptive control condition has been added.

confidenceRatingboolean

If False, do not display confidence rating scale.

feedbackboolean

If True, will provide feedback.

nTrialint

Trial number (optional).

Returns
conditionstr

The trial condition, can be ‘Higher’ or ‘Lower’ depending on the alpha value.

listenBPMfloat

The frequency of the tones (exteroceptive condition) or of the heart rate (interoceptive condition), expressed in BPM.

responseBPMfloat

The frequency of thefeebdack tones, expressed in BPM.

decisionstr

The participant decision. Can be ‘up’ (the participant indicates the beats are faster than the recorded heart rate) or ‘down’ (the participant indicates the beats are slower than recorded heart rate).

decisionRTfloat

The response time from sound start to choice (seconds).

confidenceint

If confidenceRating is True, the confidence of the participant. The range of the scale is defined in parameters[‘confScale’]. Default is [1, 7].

confidenceRTfloat

The response time (RT) for the confidence rating scale.

alphaint

The difference between the true heart rate and the delivered tone BPM. Alpha is defined by the stairCase.intensities values and is updated on each trial.

isCorrectint

0 for incorrect response, 1 for correct responses. Note that this value is not feeded to the staircase when using the (Yes/No) version of the task, but instead will check if the response is ‘More’ or not.

respProvidedbool

Was the decision provided (True) or not (False).

ratingProvidedbool

Was the rating provided (True) or not (False). If no decision was provided, the ratig scale is not proposed and no ratings can be provided.

startTrigger, soundTrigger, responseMadeTrigger, ratingStartTrigger, ratingEndTrigger, endTriggerfloat

Time stamp of key timepoints inside the trial.