Freaking out: Unable to synchronize changes on new computer/Create new experiment

Three thoughts

  1. You could just use a string of if statements instead of elifs to avoid the nested structure. Logically you only need to use elifs if you end on an else or if multiple statements can be true and you want to prioritise them. Actually if you are just setting P1S2 and vidDur you can prioritise using if statements by putitng the higher priority last.

  2. Put your conditionals into an Excel file and loop through with a code component that sets P1S2 and vidDur if the participant and session values match the expInfo versions.

  3. In a similar situation my solution was:

allOrders=['CABD','ACDB','CBDA','DBAC','BDAC','DCAB','ACBD','CDAB','DACB','DCBA','DABC','BCAD','BDCA','ADBC','ADCB','CADB','BCDA','CDBA','DBCA','BADC','CBAD','BACD','ABDC','ABCD']
thisOrder=allOrders[int(expInfo['participant'])%24]
thisFile=int(expInfo['session'])%4
Stimfile = 'stimfile_'+thisOrder[thisFile]+'.xlsx'

I think I’ve also added participant to session and taken the modulus but I can’t remember which experiment that was for.

1 Like