0

I am building an experiment with the psychopy builder and I want to do an "evaluative conditioning" experiment. That is: first, different stimuli are rated according to their valence. Later, neutral stimuli will be paired with negative or positive stimuli. Here is the structure, I have done so far: Experiment structure

Specifically, in a first step, participants rate different items (pictures, shapes, ciphers). So far, no problem. The next trials, the problem starts. Trial structure in the builder

In a next routine, the pictures should be arranged according to their rating. That is positive, neutral, negative pictures (1-3 = negative, 4-6 = neutral, 7-9 = positive). They are called UCStim. First, I need, to know, if at least 5 pictures in the rating routine were rated < 3. If yes, the experiment can continue. If not, it has to be stopped. Second step: select the 5 most negatively rated pictures. (But what, if 8 were rated with 1? Then a random selection of the images rated with 1 should take place). Then select 5 pictures with values between 4 and 6 (neutral pictures). Third step: combine the shapes (NeutralStim) with neutral Pictures and the ciphers (also NeutralStim) with negative pictures. The definition of shape vs. cipher is done in the excel-file of the loop (called condLoop.xlsx, column is called "kind"). The shapes should now be presented before negatively rated pictures and the ciphers before positively rated pictures.

My first problem is: how to I get the rated values? Do I have to import the csv-file? Or can I directly import them (the responses of the ratings are called rating.response_raw in the data file.

Sarah
  • 35
  • 6
  • I think you want to make the question more specific. Try writing out a recipie without worrying about exactly how to do this in Python Then point to the steps where you have the problem. Someone else may be able to help. For instance, maybe the names of the pictures would be the keys in a dictionary and the valence ratings would fill in the values. Then later you could pick from that dictionary based on the valence values, and use the returned key to pick the picture to show. Here is a link explaining python dictionaries: http://learnpythonthehardway.org/book/ex39.html – brittAnderson Oct 08 '15 at 12:06
  • Thank you for the reply. Yes, I guess, I have to be more specific. I also figured that I need to increase my knowledge in coding. I guess, the dictionary is a good hint for a starter. But I'm far away to be able to define dictionaries. – Sarah Oct 09 '15 at 08:42
  • I doubt that. We were all like you at one time. You might find these exercises useful for self-study. I didn't write them, but I really like them and recommend them often: http://sapir.psych.wisc.edu/wiki/index.php/Psych711 – brittAnderson Oct 09 '15 at 12:03
  • Agree with @brittUWaterloo Dictionaries will help you here: store the responses in memory as you go, pairing image names with their ratings, and then they will be easy to look up later in the experiment. But also split this question up into smaller problems in order to get useful answers. – Michael MacAskill Oct 13 '15 at 22:45

0 Answers0