Ready made experiments and scripts
You can find pre-made experiments to use here (Kent users only).
Over time we will try and add any useful tips or gotcha’s regarding EPrime and PsychoPy which will hopefully help you with your own experiments.
- Video files can be problematic due to the different encoding types. PsychoPy recommend that videos are either MP4 or MOV and are encoded with H.264 compression and audio set to Linear PCM.
- If you’re working in Builder mode (the GUI interface as opposed to the ‘code only’ mode) then the default setting is that if you press ESC whilst you’re running, it will abort your experiment. This is great for when you’re developing but you probably don’t want this when you’re running live participants in case they press it by mistake. The good news is that it’s easy to disable this setting
- Run PsychoPy and load your experiment
- You’ll need to be in Builder mode (VIEW / ‘Goto Builder view’)
- Goto into ‘Experiment settings’
- ‘Experiment settings’ is only available in Builder and only by clicking the blue, rectangular icon at the top with a double headed white arrow.
- The ‘Basic’ tab on its dialog includes an option ‘Enable Escape key’ which is selected by default.
- Just deselect it when you run in the labs
- Remember to save your experiment once you’ve made the change so that it remembers it for next time.
- When you have 5 minutes spare, take a look at the other settings available in ‘Experiment settings’ as you may find some of the others useful.
- Beware of indentations in any code blocks. The Python language is very strict on this and is a common cause of errors.
- If you use a variable to contain a particular data type, trying to assign it to another variable of a different type will cause errors. You must either use a different variable or look into “Casting” functions to translate from one data type to another.
- Ordering of code blocks between Stimuli objects can cause confusion sometimes. If you wish items to run sequentially, you must ensure that the procedure properties for script generation are set to “BeforeObjectRun” and that your stimuli objects have a property “PreRelease” of 0.
- EPrime’s Ebasic language is very strict on data types. Be sure you carefully use the correct data type when defining variables.
- EPrime’s timing is notorious for being slightly off at times by 20-30 milliseconds. Here are some suggestions which could help tighten up timings:
- Avoid using stretch and scale in a paint package to the size required beforehand.
- Reduce size of display (resolution settings – less pixels to refresh)
- Set GeneratePreRun on the slide object to “Before Object Run”
- Remove Sound device from the experiment (by clicking the very top of the workflow, click Devices tab and remove the Sound device) – Apparently this can sometimes cause 30ms delays. One less resource required, so makes sense to remove.
- Remove and delete any unnecessary objects from the “Unreferenced E-Objects” area. As they are never properly deleted otherwise
- Request 60hz refresh rate as part of experiment
- by clicking the very top of the workflow
- click Devices tab
- double click the “Display” item to get a pop up window
- Change “Refresh Rate Requested” to 60hz
- Ensure that no other programs are running in the background to free up resources