By default most object properties relating to distance on screen use units of visual angle degrees (deg). This includes deg as well as any compound units like deg/sec (e.g. speed), cycles/deg (e.g spatial frequency), etc. During experiments PsychBench converts degrees to pixels on screen using the standard formula:
val_px = 2*d_cm*tan(val_deg/2)*pxPcm
where d_cm is distance from subject to screen (cm) and pxPcm is pixels per cm on the screen.
In order to interpret deg units, PsychBench wants to know screen height (not including bezel) and distance from subject, both in cm. The first time you run an experiment, it asks for these values and saves them. Whenever you run an experiment again, it asks whether you want to use the saved values or change them. It can also save values for multiple screens in case you use different screens at different times.
You can also set screen height and distance directly in the definition of an experiment. To do this, make a screen object and set properties height_cm and distance_cm. If you do, PsychBench doesn’t prompt when the experiment runs.
For any property that uses deg, you can also use any of the following units instead. To do this, set the property to a 1×2 cell array <cd>{value, <cd><cds>"units"<cds><cd>}<cd>, where units is a string:
Properties setting color generally use RGB vectors. These are 1×3 vectors with numbers between 0–1 corresponding to intensity for red, green, blue components: 0 = no intensity, 1 = full intensity.
<cd>[0 0 0 ]<cd> = black
<cd>[1 1 1 ]<cd> = white
<cd>[1 0 0 ]<cd> = full red
<cd>[0.5 0.5 0.5 ]<cd> = 50% gray
PsychBench © 2017–2022 Giles Holland
Website © 2022 Giles Holland
End user license agreement