Skip to main content
Skip table of contents

Uploading your experiment to Pack&Go

Now that you have created an account, you can upload an experiment onto Pack&Go. Below are some programming language-specific tips for preparing your study. Click on the arrow to expand the section.

Recommendations for preparing your MATLAB/Psychtoolbox study for Pack&Go

Here are a few things you should keep in mind when preparing your MATLAB experiment for Pack&Go:

  • If your experiment contains subfolders, remember to replace any local file paths in your code with relative paths. Do not hardcode your file paths. For more details, see Best Practices for Designing and Implementing Pack&Go Studies

  • To retrieve the full path to the Pack&Go working directory, use the pwd function, not the mfilename one. The latter will create an error.

  • Pack&Go does not support the MATLAB addpath function.

  • Save all result files in the main experiment folder. Do not create result subfolders.

  • Pack&Go runs on a remote server with an optimized Linux X64 operating system. If you are using third-party MEX files in your experiment, make sure you specifically include Linux X64 MEX files.

Pack&Go will automatically point to the main experiment folder; when setting up relative paths to subfolders, you can start indexing from the first subfolder and use, for example, the MATLAB filesep function to add platform-specific file separators when needed.

Recommendations for preparing your Python and PsychoPy study for Pack&Go

Here are a few things you should keep in mind when preparing your Python/PsychoPy experiment for Pack&Go:

  • If your experiment contains subfolders, remember to replace any local file paths in your code with relative paths. Do not hardcode your file paths. For more details, see Best Practices for Designing and Implementing Pack&Go Studies

  • If you are using keyboard input in your study, use the Keyboard class from PsychoPy, not the event class. E.g.

    from psychopy import event
    # Wait for spacebar press to start


    from psychopy.hardware import keyboard   
    kb = keyboard.Keyboard()
    # Wait for spacebar press to exit
  • If you are playing audio in your PsychoPy experiment, you must initialize the audio by including the following lines at the start of your code:

    from psychopy import prefs
    prefs.hardware['audioLib'] = ['pygame']
    from psychopy import sound
  • Our service uses the X Window System and therefore you will need to add the following at the beginning of the experiment script for optimal timing:

    import ctypes
    xlib = ctypes.cdll.LoadLibrary("")
  • If your experiment uses any libraries besides Python’s standard library and PsychoPy (e.g. numpy and matplotlib), you must also include in the zipped folder, a requirements text file (named “requirements.txt”) which specifies which packages will need to be included on the server to run your experiment. This file should be in the root of the zipped folder, not a subfolder. For example, the following in a text file will tell us to include the version of ‘matplotlib’ 3.7.3 and ‘numpy’ 1.24.4:

  • For a general explanation about the requirements.txt file and how to create it see this resource:

  • If you’re not sure which versions exist for a module, you can search for it here:

  • Python IDE users can try the following to automatically generate their requirements.txt:

    pip freeze > requirements.txt

    This will generate a list of ALL dependencies currently installed. We recommend reviewing this .txt and eliminating any packages not used in your experiment, in order to optimize performance.

Once you have successfully tested your code on your local computer, and are ready to upload the experiment to Pack&Go, follow these steps:

  1. Create a zip file containing all of your experiment programs, image files, input data files and everything you would need to run your experiment locally. The main experiment file should be:

    1. A script, not a function

    2. Located in the root of the zipped folder and not in subfolder(s)

  2. Navigate to the Scientist Portal and log in to your account, and click on the Experiments tab. Add a new experiment by clicking the Add Experiment “+” Icon


    The main Experiments page

  3. Enter the name (A) and description (B) of the experiment. Specify the region where you would like your data to be saved (C). Choose the platform you want to use (e.g. MATLAB-Psychtoolbox, Python, or Python with PsychoPy) (D).


    New experiment interface

  4. Indicate whether this experiment is a follow-up study of a previously published experiment on Pack&Go. Previous studies must be either published or completed. If you specify this is a follow-up study, Pack&Go will automatically generate single-use invitation links for each link created in the previous study. Any output files in the previous experiment will be transferred to the new experiment.


    Follow-up section

  5. Choose which aspect to prioritize under the “Strategy” heading. At the moment, we only offer the option to prioritize latency. This means the study will be optimized to introduce the lowest possible end-to-end latency, which is the time it takes for the experiment to update in the participant view following a participant input.


    Streaming Strategy section

  6. Set the hard time limit of your experiment, after which the experiment will be automatically terminated. This places a cap on the credits spent per participant. The default time limit is 30 minutes. The minimum time limit that can be set is 15 minutes and maximum time limit that can be set is 1 hour. Extended sessions are possible, but not reccommended. Save intermediate data files often in case subjects surpass the set limit.


    Time Limit section

  7. Upload the experiment by navigating to the Upload File section and click the icon next to File. Find and select the zipped experiment folder created in step 1; click Create to upload the file.


    Upload File section

  8. After the experiment has been uploaded you will see a summary of the Experiment information, you may edit the information or delete the experiment.


    Experiment Information review section

  1. You will also see the experiment’s associated files under the Files heading. Double check that all associated files are here.


    Files section

  1. If everything looks correct, pack the experiment by clicking Pack under the Actions heading


    Actions section for a new study

  2. Once the experiment is successfully packed, the status of the experiment will change to “Ready to publish”


    Actions section for a new study, once experiment file has been uploaded successfully

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.