# Help for a beginner: developing a good desing

**URL:** <https://discourse.psychopy.org/t/help-for-a-beginner-developing-a-good-desing/7369>\
**Category:** Builder\
**Tags:** randomization, images\
**Created:** [April 11, 2019, 8:15am UTC](https://discourse.psychopy.org/t/help-for-a-beginner-developing-a-good-desing/7369 "2019-04-11T08:15:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [April 11, 2019, 8:15am UTC](https://discourse.psychopy.org/t/help-for-a-beginner-developing-a-good-desing/7369/1 "2019-04-11T08:15:52Z")

</div>

**OS** (e.g. Win10): Ubuntu 18.10  
**PsychoPy version** (e.g. 1.84.x): 1.85.3  
**Standard Standalone? (y/n)** Yes  
**What are you trying to achieve?:**  
I’m working for a simple experiment for my undergraduate thesis.  
I need to show for X time a set of neutral / negative pictures but after every pictures I have to show 2 other pictures with a particular meaning and my subjects have to pick one.  
It’s pretty easy but I have to satisfy these requirement:

- After a negative picture, I’m going to show only food pictures vs caring pictures.
- After a neutral one, I’m going to show food pictures vs caring pictures or neutral pictures vs neutral pictures.  
I need to randomize stimuli ( neutral and negative) but setting that every time Neg is on screen, after that should follow food vs caring. For neutral is good to randomize food vs caring with neutral vs neutral.

At this moment i’m stuck at experiment design on builder.  
On excel I set these parameters:  
stimuli: negative and neutral pictures  
label: each file are labelled or neg or neutral  
id\_1: all of the food pictures  
id\_2: all of the caring pictures  
id\_3: the other set of neutral pictures  
rand: randomization column

my idea is to make a big loop, split in two the stimuli and set that they should be random.  
Every stimuli should have a loop that respect my requisites.  
but it looks reaaally messy. Any idea to make a clean work?

Thank you so much

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [April 11, 2019, 10:43am UTC](https://discourse.psychopy.org/t/help-for-a-beginner-developing-a-good-desing/7369/2 "2019-04-11T10:43:33Z")

</div>

Hi @robbu, here is one solution. See the attached excel sheet below. For the design, you would have two routines in a loop.

### Routine 1 - neg/neu image

In the first routine, you need an image component to present your image, which takes the image from the `valenceStim` column in the conditions file attached . You present your negative/neutral picture for a duration. After the duration, the routine ends and moves on to the next routine, which holds your image pairings.

### Routine 2 - image pairs

In this routine, you need two image components, positioned side by side and either a keyboard or mouse for responding. The two image components will take `img1` and `img2` from the conditions file.

### Randomization

Randomization of trial order is controlled with your loop ([see docs](https://www.psychopy.org/builder/flow.html#loops)). The default is random presentation of your conditions file, but have a look in your loop and familiarize yourself with the settings. The outcome here is that neg and neutral stim presentation will be random, but the pairings are fixed. If you want random order of your pairings, then you need to add some code to randomise their pairing with the stimValence stim, alternatively you can create different conditions files with different stims pairings e.g., orderA, orderB etc and present equal number of times across participants.

### conditions file

Here is an example conditions file [imagePairings.xlsx](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/2X/3/329b2ddb161b1c7e1b73e3a78492aa7afbd9e52f.xlsx) (7.9 KB)

---

<div class="post-metadata">

**Author:** ![robbu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/robbu/32/4425_2.png) [@robbu](https://discourse.psychopy.org/u/robbu)\
**Post date:** [April 11, 2019, 7:40pm UTC](https://discourse.psychopy.org/t/help-for-a-beginner-developing-a-good-desing/7369/3 "2019-04-11T19:40:43Z")

</div>

Thank you so much! The easiest way is always the smartest one. I don’t know why i’ve switched to a difficult one. You make everything clear!
