PennController for IBEX › Forums › Support › Question about assigning conditions, groups + randomization › Reply To: Question about assigning conditions, groups + randomization
The debugger reports this error: TypeError: targets[row.pair][row.target_polarity] is undefined
Your CSV file does not contain the same values in the target_polarity
column as in the former CSV file. The former CSV file had POS
and NEG
, hence the recurrent references to POS
and NEG
in the code. In this file, you have posi
, neg
and NA
in that column. I would suggest you replace the occurrences of POS
and NEG
with posi
and neg
, respectively, but you’ll still be left with unhandled NA
s (which also affects the “pair” column by the way). It seems to me that those NA
rows are not of the same nature as the posi
and neg
ones, in that they won’t fall under the same crossing/distribution of conditions that you describe in your initial post, and that they should therefore live in a separate CSV file referenced somewhere else in your code
Regarding your other question, just edit the newTrial
in the code to generate trials that suit you
Jeremy