How to combine multiple experiments on-line

URL of experiment: n/a

Description of the problem:

This is a general question: I have a battery of 4 short experiments. My design requires that each subject provides data for each experiment twice, in 2 separated sessions.
I understand that e.g. prolific can handle multi-session studies. But what is the best way of stitching together several experiments into one session.
I dread having to stick all 4 experiments into one mega experiment with a loop around each. Not to mention that that effectively would mean starting from scratch again. Any wise ideas?
Thanks
Marc

If you have a Pavlovia licence then you could have the completed URL for each experiment pointing to the next one and including the expInfo parameters. Without a licence the problem is that you will consume a credit at each stage (even if your participant doesn’t make it through them all).

You can copy routines (but not loops) from one experiment to another. Click on New and open within PsychoPy instead of clicking on the file

2 Likes

Cool – thanks. I will give that a try and get back to you if I have more questions if that is OK

Dear @wakecarter
I implemented your suggestion to pass participant detail in the completed URL.
This works well when passing from the first experiment to the second. But then it breaks down. What am I doing wrong?

The URL to the first experiment is:

https://pavlovia.org/run/MJB/fapesp_anticipation_2020/html/

Please could you show me a screenshot of your URL options?

Absolutely - thanks. The sequence of experiments should be Anticipation - Libet - Reproduction - Estimation

They need to be formatted like text components as per the example on my crib sheet.

"https://brookeshls.co1.qualtrics.com/surveyname?expname="+$expName+"&participant="+expInfo['participant']

Please note the quotes around the text and the $ before the first element outside of quotes.

2 Likes

Thank you @wakecarter. I would have never worked that out, since I followed the instructions from
https://www.psychopy.org/online/onlineParticipants.html
Perhaps that can be updated in light of what you said?

I have a follow-on question about counterbalancing experiment order, but I will start a new thread for this.

Thanks, as always!

I’m just a user here so I can’t update that page – my solutions are on a separate crib sheet https://docs.google.com/document/d/13jp0QAqQeFlYSjeZS0fDInvgaDzBXjGQNe4VNKbbNHQ/edit?usp=sharing

3 Likes

Wow – You are amazing @wakecarter. I thought you were one of the team, given the dedication with which you are helping people here. Thanks even more!

@jon can you see above in this thread the issue about passing participant details from one URL to the next, and perhaps updating the official documentation in light of this?

Thanks, as always,
Marc

Yes, we can update the docs.

Wakefield (who as you rightly say is doing an amazing job of supporting people!) is right that this is about using a variable combined with a literal string and the standard way of doing that in PsychoPy is to use the $

His version works but I would write it very slightly differently. I would have used:

$"https://brookeshls.co1.qualtrics.com/surveyname?expname="+expName+"&participant="+expInfo['participant']

rather than

"https://brookeshls.co1.qualtrics.com/surveyname?expname="+$expName+"&participant="+expInfo['participant']

Using it with expName leads you to think the $ indicates “this value is a variable”. It actually indicates that “this entire box is Python code”. The Python code in this instance is a string combined with a variable. PsychoPy generally can handle it either way but it’s good to think of it with the true meaning :slight_smile:

2 Likes

I’d say you’re certainly part of the team, Wakefield - PsychoPy is a community effort, not an exclusive club. Anyone can contribute changes to the code or documentation - all it takes is an account at Github. Ideally, your crib sheet would become part of the official documentation. As it is solving pain points for many users, it would be most effective if it had the profile of being with the rest of the documentation.

e.g. the online participant documentation page under discussion is found here on the PsychoPy Github site:

Instructions on becoming a psychoPy developer are here (where being a “developer” includes simply proposing changes to the docs):

https://www.psychopy.org/developers/developers.html

And specific info about working with the documentation source files are here:

https://www.psychopy.org/developers/addingdocumentation.html

There is a bit of a learning curve at first, but it is mainly about how to use Git - once you have a handle on that, you’ll be able to make contributions to any open-source project. But for very simple changes (e.g. correcting typos in the docs), you can actually do the changes entirely within the Github site - just fork psychopy/psychopy to a branch in your own account, and click the “edit” icon to make changes directly in the web browser. You can then submit a pull request to have the change moved from your branch back to the main PsychoPy repository.

This all applies to a relatively old hand like Marc as well. Users learning to do new things are the best people to propose changes to the documentation - developers who are contributing to the code itself are less likely to be poring over the documentation to learn how to do things, so they don’t notice deficiencies or out-of-date content.