blank cells in Excel (self-paced reading)

168 views
Skip to first unread message

Paula

unread,
Nov 19, 2013, 4:57:01 AM11/19/13
to psychop...@googlegroups.com
Hello,
I am just starting to discover PsychoPy and I know nothing (yet) about Python, in particular, or programming, in general. So, I am using the Builder (and trying to see what is in the Coder).
I am just exploring PsychoPy probably to use it afterwards with our eyetracker, but now I was just trying to do some experiments that I have already done with E-Prime or PsyScope. I am trying to build a self-paced reading and I actually did it, but I have one problem (which is also a problem for PsyScope but not for E-Prime). I cannot use lists with sentences of different size, that is, with different number of segments, for instance:
     \John \ runs. 
     \John \ likes \ to \ run.
If I have a blank cell like I do in the first sentence, PsychoPy presents a segment of other sentence or the text "nonsense" in the blank space.
I tried to created different groups (routines inside a loop): one for each group of sentence with the same size (number of segments), but I was unable to randomize the presentation of groups (for instance, present one sentence of group 1 - 2-segments group - and after one sentence of group 2 - 3-segments group). For instance, I created two routines for group 1 (seg_1 and seg_2) with a loop and three routines for group 2 (seg_1, seg_2 and seg_3) with a loop. After I defined a loop for the two groups. Sentences are randomly presented inside each group but sentences of group 2 are always presented only after all sentences of group 1 have been presented.
I would like to know if it is possible to go around blank cell in Excel and/or if there is a way to randomize stimuli of different groups (routines inside loops).
Thanks,

Paula

Jonathan Peirce

unread,
Nov 19, 2013, 5:38:11 AM11/19/13
to psychop...@googlegroups.com
I guess PsychoPy is not willing to set a text stimulus with no text. But what about if you set the text in that cell to be a space, so it isn't empty but also isn't visible? I don't remember if that gets squished when the file is imported.

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/0f765f3d-11bc-47a9-a0e5-54f90fbf8a91%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.


Paula

unread,
Nov 19, 2013, 6:31:06 AM11/19/13
to psychop...@googlegroups.com
Hi Jon,

Thanks a lot for your answer. It works, but this is not the best solution, since I will have to tell participants to press the space bar (or other key) whenever there is an empty screen. Having sentences with different lengths is very frequent in reading studies (and, of course, in real life), so, it would be nice to have a solution to this problem. 
I think that one possible solution would be to create different procedures, one for each group of stimuli, and randomize between groups (I implemented this solution in E-Prime and it worked). Would that be possible?
Thanks,

Paula

Jeremy Gray

unread,
Nov 19, 2013, 6:47:05 AM11/19/13
to psychop...@googlegroups.com
Hi Paula,

In your example, the last word of the sentence ends with a period. If this is always the case, you could not worry about the sentence length at all: Just keep presenting words until the word that is displayed ends with a period. To do this, have a code component in the routine, inside a loop (e.g., named "trials"), with the variable "word" set to contain each word of the sentence. In the End routine box, put something like this (not sure I have the syntax right):

if word.endswith('.'):
    trials.finished = True

Have the nReps for the loop be at least as long as your longest sentence in the experiment, or maybe just 1000 which should always be long enough.

--Jeremy


--Jeremy


Paula

unread,
Nov 19, 2013, 9:13:41 AM11/19/13
to psychop...@googlegroups.com
Hi Jeremy, 
Thanks for your answer. 
I tried to implement your solution but I did not succeed (yet, I hope). I will keep trying (as I wrote, I am just starting).


Paula
Reply all
Reply to author
Forward
0 new messages