File: tips.txt

package info (click to toggle)
psychopy 2020.2.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 44,056 kB
  • sloc: python: 119,649; javascript: 3,022; makefile: 148; sh: 125; xml: 9
file content (45 lines) | stat: -rw-r--r-- 5,953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Most dialogs have a help button that takes you to the relevant online documentation
You can use "Ctrl + [" or "Ctrl + ]" to indent/outdent a block of code in Coder view
Both in the Coder and Builder views have a demos menu with plenty of demos. There are more on Pavlovia.org
From Builder you can use "Compile" to generate the Python script that controls your experiment, and view or edit it in the Coder. (Any edits are not reflected back in the Builder, however.)
You should avoid snorting Pepsi
Most buttons have helpful usage tips if you hover over them
PsychoPy can handle many different units (degrees of visual angle, cm...) for your stimuli. But you need to tell it about your monitor first (see the online documentation on General > Units)
Menu items show you the current key bindings (which can be configured in preferences)
For brief stimuli, you should use frames rather than time to set the start/stop of your stimuli. Most monitor frame rates are precise to the microsecond!
It's a really good idea to check your data are all being saved as you like BEFORE running all of your participants!
Builder: right-clicking on any 'color' parameter will bring up the system's color-picker.
The user forum is a great place to ask questions and receive updates, at https://discourse.psychopy.org
If you do write to the forum, make it clear whether you're using Builder or Coder interfaces and which version/platform you use.
You can add or remove Components to the Favorites by right-clicking on them. And you can control the maximum number of them in preferences.
You can use the source. PsychoPy comes with all its source code included. If you know Python, you'd be surprised how easy it is to find your own bug-fixes.
Degrees of visual angle are 'device independent'. Normalized units mean that your stimulus will be different on each different computer. Do you really want that?
Chocolate probably won't help, but does that mean you shouldn't try it?
For fMRI block designs you want to use non-slip timing (trials of pre-determined duration). Builder indicates these with a green icon in the Flow panel
Builder: you can often right click on things to bring up a menu, e.g., to remove a trial.
Coder: you can click the color-picker icon on the toolbar. The R,G,B color triplet will be saved to the clipboard (in PsychoPy's rgb color units, -1..+1 not 0..255), which you can then paste into a script.
If you have a tip that you'd like to added here, email it to the users list.
To flip an image stimulus, give it a negative 'size', in x, y or both
PsychoPy is free. Please cite the most recent paper (Peirce et al 2019) if you use PsychoPy in published work
Builder: To set stimulus position to your variables X and Y, you can use either $[X,Y] or [$X,$Y]. (A $ anywhere indicates that the entire entry box is Python code)
You should wear sunscreen. (Where does it say these tips have to be original?!)
In Python, the values True and False must have capitals and really just stand for 1 and 0.
Builder: The contents of the dialog box at the start of your experiment are controlled from the Experiment Settings button. You can use these values in your study by referring to the value in expInfo e.g. expInfo['participant']
Coder: You can comment/uncomment entire blocks of code with Ctrl-' and Ctrl-Shift-'
Did your stimulus not appear? Was it really tiny? Setting units='pix' and size=0.1 means it has a size of 0.1 pixels!
The default color values in PsychoPy range from -1 to +1, with 0 being the mean grey of the screen. So black is like the maximum decrement from grey and white is an increment. Right?
Data can be output in many different formats, but it's worth saving the 'psydat' (aka pickle) format as well as the others. Although this isn't "human readable" it stores more information than excel/csv files including an entire copy of your actual experiment!
You can see how many people used PsychoPy this month at http://www.psychopy.org/usage.php
Builder: You can increase or decrease the display size of the flow using "Ctrl + =" or "Ctrl + -" (like some web browsers). Similarly, you can change the display size of routines using "Ctrl + Shift + =" and "Ctrl + Shift + -". (Use "Cmd" on Mac, not "Ctrl".)
In the Builder, you can display details about the trials and sequences of loops. Press "Ctrl + =" when at the largest view size. To turn off, press "Ctrl + -" from the smallest view size.
Builder: To put a $ symbol in a stimulus, you need to use \$, like this: "You win \$5.00!". (This is only for input boxes, and not for code components.)
You can use "Ctrl + Z" and "Ctrl + Shift + Z" to undo and redo many of the actions in the Builder, such as adding, deleting, or changing something.
In Builder you can control what appears in the 'Experiment Info' dialog box in the Experiment Settings
If you like PsychoPy spread the word
Sometimes the correct response on a given trial is not to respond at all, such as in a go/no-go task. To score such responses properly, enter 'None' as the correct answer (no quotes) in the Builder dialog box.
For the best audio timing you need to use the 'PTB' backend (set this in the app Preferences).
The Keyboard class has better timing than event.getKeys() and also reports key duration when the key has been released.
Get your department to buy a site licence for Pavlovia.org. You'll be helping fund PsychoPy development and you'll be able to run unlimited online studies.
Coder: Can't remember arguments for a class or function? Use "Ctrl + Shift + Space" after the first brace to bring up a calltip. Press "Esc" or "Enter" to close it.
Coder: Use "Ctrl + Space" to bring up a list of code completion suggestions. Press "Enter" to insert the selected suggestion into your code or "Esc" to cancel.
Coder: The "Code Structure" pane shows an outline of classes and functions defined in the current file. Click on items to go to where they are defined.