Then, you put order_file.csv in the loop dialog box as your order file.
Hope this helps,
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.
To post to this group, send email to psychopy-users@googlegroups.com.
To unsubscribe from this group, send email to psychopy-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/J4BgE1me5h8J.To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/J4BgE1me5h8J.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychopy-users@googlegroups.com.
To unsubscribe from this group, send email to psychopy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Dear Vikki,
This is the way PsychoPy works: it always cycles through an entire row in a given CSV file, whether that row is chosen sequentially or randomly. The way to get around this to achieve what you want is to implement the code usefully provided by Andrew Poppe a number of times on this list (and even before in this thread?)
i.e. his code will read in your CSV file prior to the experiment, randomly shuffle the two lists independently, and then save the shuffled file back to disk. PsychoPy will still cycle through entire rows, but the shuffling now means that the stimuli are not paired across runs. And then it doesn't actually matter whether PsychoPy loops through the rows randomly or sequentially, as they are shuffled anyway.
Regards,
Michael
On 3 Aug, 2012, at 02:41, Vikki wrote:
> Hello,
>
> I have used the code above and whilst it is randomly picking from my two lists, it is however always pairing my stimuli :
>
> e.g say I have my two lists:
> List one: List Two:
>
> Person1.jpg Dog1.jpg
> Person2.jpg Dog2.jpg
> Person3.jpg Dog3.jpg
> .....etc
> it is always pairing Person1 with Dog1 and always pairing Person2 with Dog2 and so on and so forth. Is there a way to make it randomly pick one stimulus from list one and randomly pick another stimulus from list two?
>
> Thank you,
> Kindest Regards,
> Vikki
--
Michael R. MacAskill, PhD michael.maca...@nzbri.org
path1 | path2 | path3 | aligned | congruent | corr | same_target |
import randomimport csvf = csv.reader(open('conditions.csv'))path1, path2, path3, aligned, congruent, corr, same_target = zip(*f)path2rand1 = random.sample(path2, len(path2))path2rand2 = random.sample(path2, len(path2))with open('shuffledFirst.csv', 'wb') as w:writer = csv.writer(w)writer.writerow([path1, path2, path3, aligned, congruent, corr, same_target])for i in range(len(path2rand1)):writer.writerow([path1[i], path2rand1[i], path3[i], aligned[i], congruent[i], corr[i], same_target[i]])with open('shuffledSecond.csv', 'wb') as w:writer = csv.writer(w)writer.writerow([path1, path2, path3, aligned, congruent, corr, same_target])for i in range(len(path2rand2)):writer.writerow([path1[i], path2rand2[i], path3[i], aligned[i], congruent[i], corr[i], same_target[i]])
Michael R. MacAskill, PhD michael.maca...@nzbri.org
import csvf = csv.reader(open('conditions.csv'))
path1, path2, path3, aligned, congruent, corr, same_target = zip(*f)path2 = list(path2) # convert the tuple to a list to make it editable
header = path2.pop(0) # remove the header itemshuffle(path2) # randomise the actual values (simpler than random.sample)path2.insert(0, header) # restore the header at the top
with open('shuffled_file1.csv', 'wb') as w:writer = csv.writer(w)for i in range(len(path2)):writer.writerow([path1[i], path2[i], path3[i], aligned[i], congruent[i], corr[i], same_target[i]])
header = path2.pop(0)shuffle(path2)path2.insert(0, header)with open('shuffled_file2.csv', 'wb') as w:writer = csv.writer(w)for i in range(len(path2)):writer.writerow([path1[i], path2[i], path3[i], aligned[i], congruent[i], corr[i], same_target[i]])
hi, i am trying to present gabor patches as stimulus at four different locations in the periphery instead of the center. how can i change the stimulus display at prefixed locations as well as orientation should also be randomly changing.
--
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/154b68c7-c999-49d8-a31b-7612a9a25fd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Jonathan Peirce University of Nottingham 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.