Skip to content

Commit bc8b21f

Browse files
authored
Merge pull request #35 from LegrandNico/master
Fix None error when starting the task with catch trial
2 parents 124a16c + 1e90f58 commit bc8b21f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cardioception/HRD/task.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ def run(
9393
print("... load psi staircase.")
9494
alpha = parameters["stairCase"][modality].next()
9595
stairCond = "psi"
96-
elif trialType == "psiCatchTrial":
97-
print("... load psiCatchTrial staircase.")
96+
elif trialType == "CatchTrial":
97+
print("... load catch trial.")
9898
# Select pseudo-random extrem value based on number
9999
# of previous catch trial.
100100
catchIdx = sum(
101101
parameters["staircaseType"][:nTrial][
102102
parameters["Modality"][:nTrial] == modality
103103
]
104-
== "psiCatchTrial"
104+
== "CatchTrial"
105105
)
106106
alpha = np.array([-30, 10, -20, 20, -10, 30])[catchIdx % 6]
107-
stairCond = "psiCatchTrial"
107+
stairCond = "CatchTrial"
108108

109109
# Start trial
110110
(
@@ -997,6 +997,7 @@ def tutorial(parameters: dict, win: Optional[visual.Window] = None):
997997

998998
if parameters["setup"] in ["test", "behavioral"]:
999999
parameters["oxiTask"].setup().read(duration=2)
1000+
10001001
# Run 5 training trials with confidence rating
10011002
for i in range(parameters["nConfidence"]):
10021003

0 commit comments

Comments
 (0)