../../_images/OST600.png

The Pavlovia environment§

1

What is PsychoJS?§

When we make an experiment in PsychoPy builder, it is writing our experiment in Python code under the hood. Now it also writes our experiment to JavaScript via PsychoPy’s sister library PsychoJS.

../../_images/psychopy_pav_psychojs.png
2

What is PsychoJS?§

If you prefer to write experiments in pure code, you can write experiments purely in Javascript using PsychoJS, but in general it will be more flexible, less bug prone and easier to share with non-coders if you use Builder.

3

What is Pavlovia?§

Once we have our experiment written in JS, we need a way to “host” it online. Pavlovia. is a secure server for running experiments and storing data but it is also a good way to share your experiments publically with other researchers! Pavlovia is fully GDPR complient.

../../_images/psychopy_pav_psychojs.png
align:center

:scale:50%

4

What is free, what costs and why?§

There are many features that we can use for free in pavlovia such as :

But to support the ongoing development of PsychoPy (which has been developed for free for years by dedicated contributors) a small cost is introduced for storing data from experiments you run.

5

Finding openly shared experiments§

There are two ways we can find and use existing experiments from Pavlovia:

6

Finding shared experiments from Pavlovia itself§

In the explore. tab each experiment has it’s own icon. You can choose to run the experiment (if it is set to running) or view the code <>

../../_images/stroop_pavlovia.png
7

Finding shared experiments from Pavlovia itself§

We can then fork the experiment to our own “namespace” or a selected “gitlab group”.

../../_images/fork_online.png
8

Finding shared experiments from Pavlovia itself§

Finally, we would use the search icon inside PsychoPy to search and sync:

../../_images/sync_local.png
9

Finding shared experiments from PsychoPy§

Alternatively, we could just search from inside PsychoPy itself and “Fork +Sync” all at once

../../_images/fork_local.png
10

Finding shared experiments from PsychoPy§

Since the second method is easier than the first, you might wonder “why bother” with the first approach?

11

Gitlab§

Benefits of GitLab (the important bits):
  • Fork existing projects
  • Version control
  • Add lab members to projects to work on the same files
  • Easy sharing of your task (open science)
12

Version control§

../../_images/gitlabComHistory.png

You can see when the last changes were made to the task by looking at the commit history.

13

Version control§

If you click on the change you can see deletions (in red) and insertions (in green)

../../_images/gitlabComChange.png
14

Version control§

You can browse the repository at that point in history:

../../_images/gitlabBrowse.png

Imagine you have a working task, you then make a bunch of changes, and it doesn’t work. If you commit little and often you can easily revert those changes.

15

Adding team members§

To add members to your own project, you can use the settings>members option where you can search and invite collaborators.

../../_images/gitlabSettings.png
16

Making your task public§

You can change the visibility of your task at any time under permissions.

../../_images/gitlabPermissions.png
17

Making your task public§

One thing to note is that once you make your project “public” the data file stored there will also be public.
  • good as allows easy data sharing
  • Something to bare in mind if you are collecting protected data
18

Exercises (10-15 mins)§

Let’s get some practice using pavlovia.org!

  1. try forking a task you like (hint: those in the ‘demos’ group can be useful)
  2. try searching that project from your local psychopy
  3. make a small edit
  4. upload and see if the change shows on gitlab!
  5. add someone else in your breakout room as a team member

NB. don’t forget to give stars to the projects you like! this could help future researchers picking tasks!

19