How to log and view the conditions for trials and blocks of trials

Hi all,

Just a little tip that might come in handy for those running different blocks of trials, and wanting to quickly know which conditions they are using.

On the first routine insert a code block, and in the begin routine section include the python code:

console.log(trial_condition.getCurrentTrial())

(rename trial_condition to whatever your outer loop is called)

This will log the name of the .xlsx or .csv file in use to the console. This works for HTML if auto->JS is enabled.

This can also be further adapted to see the conditions for the current inner loop using

console.log(currentLoop.getCurrentTrial())

A very simple bit of code but potentially time saving depending on the complexity of the trial, so I thought I’d share. Hope this comes in handy for anyone.