psychopy.org | Reference | Downloads | Github

How to make onset of component dependent on variable in Excel?

I’m running a dot probe task where I’m varying the onset of the dot that appears following the presentation of a pair of images. The images disappear from the screen after 3 seconds and I have a column (SOA) on the Excel sheet that dictates after what time period when the dot should appear (1.2s and 0.3s following the images disappearing from the screen).

I’ve tried making the start time of the dot component conditional upon the SOA by setting this as a variable ($SOA) in PsychoPy but from running the experiment, I get the impression that it is either not working outright or that it is treating the 1.2s and 0.3s as durations from the start of the routine as the dot appears before the images appear and remains on screen for a short while even after the images disappear.

Apologies if this has been asked before but I’m new to PsychoPy and short on time so I would be grateful for any help!

Thank you in advance.

Hi,

If I interpret your question correctly, it seems that the easiest solution would be to specify the onset of the dot, not the SOA. So, you could have a column dotOnset in your Excel input file that says 3.3 or 4.2 (assuming only the picture with a length of 3 s is presented before the dot appears), and use $dotOnset for the onset of the respective component.

Hope this helps.

Jan

Hi Jan,

Thanks for your reply.

Strangely enough, after mulling over for a short while, I thought of that solution (except I called the column ‘AbsoluteSOA’ which isn’t technically accurate - dotOnset is a much better name!).

Thanks again. :slight_smile:

You can also put expressions in fields, not just isolated variables. So in your case, this should work:

$3.0 + SOA
1 Like