using expinfo to select particular rows of different condition files

234 views
Skip to first unread message

Anneke Haddad

unread,
May 29, 2015, 8:24:08 AM5/29/15
to psychop...@googlegroups.com
Dear all,

I'm new to psychopy (and python) but am very impressed with its flexibility and ease of use. 

I've run into just one problem so far that I can't figure out: I'm trying to use expInfo to select different condition files  (using the Builder view) as I have two versions of my experiment to counterbalance the stimulus types. I found some helpful answers on this list which enabled me to figure out that I wanted to write something like:

$'trials_'+ expInfo['version'] + '.xlsx'


in the "Conditions" box.


This works fine, unless I try to additionally select particular rows (fixed, not variable) using the box above - in which case I get a "SyntaxError: invalid syntax". Is it simply not possible to select particular rows of a variable conditions file?


(Incidentally, when the contents of the "conditions" box are long, it's a little annoying that the middle of the text gets replaced with "..." - this means I can't just copy-paste the contents to another loop. I'm not sure if this can be changed though!?)


Many thanks in advance,

Anneke

Michael MacAskill

unread,
Jun 1, 2015, 5:56:16 PM6/1/15
to psychop...@googlegroups.com
> This works fine, unless I try to additionally select particular rows (fixed, not variable) using the box above - in which case I get a "SyntaxError: invalid syntax". Is it simply not possible to select particular rows of a variable conditions file?
Yes, that is what the "Selected rows" field is for (although I suspect there are some problems with it).

But we can't infer the reason for the syntax error without seeing what you actually entered in that field: please show us.

Also, please tell us exactly what version of PsychoPy you are using.

> (Incidentally, when the contents of the "conditions" box are long, it's a little annoying that the middle of the text gets replaced with "..." - this means I can't just copy-paste the contents to another loop. I'm not sure if this can be changed though!?)

Agreed, that is a problem (and one which I thought had been corrected quite a while ago…)

I've added it as an issue on our GitHUb page here: <https://github.com/psychopy/psychopy/issues/909> and will try to fix it, assuming the other developers agree.


Regards,

Michael

Anneke Haddad

unread,
Jun 2, 2015, 5:12:35 AM6/2/15
to psychop...@googlegroups.com
Many thanks for your reply, Michael. I'm using v1.82.01 on a Mac running OS X (apologies - I ought to have included that in my initial post).

The exact details in the dialogue box for my loop are:

random seed $: (blank)
nReps $: 2
Selected rows $: 1:2
Conditions: $'trials_'+ expInfo['version'] + '.xlsx'

However - after quitting and restarting Psychopy, the problem seems to have been resolved (!?) and behaviour is now as expected... Hopefully it was just a temporary thing!

Thanks also for adding the truncated box contents to the GitHub page.

Best wishes,
Anneke

Michael MacAskill

unread,
Jun 3, 2015, 5:05:54 PM6/3/15
to psychop...@googlegroups.com

> On 2/06/2015, at 21:12, Anneke Haddad <anneke...@gmail.com> wrote:
>
> Thanks also for adding the truncated box contents to the GitHub page.

This behaviour has now been removed in the source code, which should be seen in the next major release of PsychoPy.

Regards,

Michael

Reply all
Reply to author
Forward
0 new messages