Export trial wise data from an exp running in Pavlovia

Hi,

I wonder whether there is a way to export the data collected on each trial from Pavlovia to a diiferent web site in which we can perform online analysis using python libraries, and then
feedback the output of this online analysis back to our experiment in Pavlovia trial by trial, any thoughts

cheers
david

Hi, i posted this a while ago but I have not got any reply so I hope you don’t mind me posting again! I’ll try to explain better

We are looking for a way to export the data collected on each trial from psychopy exp running in Pavlovia to a dififerent web site (Heroku) in which we can perform online analysis using Python libraries, and then feedback the output of this online analysis back to our psychopy exp in pavlovia trial by trial.

So for this Psychopy from Pavlovia -> sends a HTTP request to different host -> analysis in Python -> HTTP response -> sent to Psychopy Pavlovia for next trial

is this feasible? comments would be much appreciated

cheers

david

I’ve never done this but I think it would be feasible. It would be a single HTTP request I think. You’d make a POST call (within your JS script) out to Heroku, sending the data to analyse and get back the result within the body of the response (not as a separate HTTP request).
Pavlovia wouldn’t actually be involved at all: the communication is between the participant’s browser and the remote site.

Hi,

Thanks for the response Jon,
Do you think it would be feasible then to wait from the psychopy javascript for the output from Heroku before initiating the next trial?

So if I am understanding correctly then we would just need to include the necessary javascript code and it would work? I.E. We have made a simple test using JSpsych and it works, but we would like to use the functionality of psychopy for this experiment

Cheers
David

Yes, I think that’s exactly the idea. Assuming the heruko step doesn’t take a huge amount of time, and the network connection is stable (not likely to disappear at times during the experiment) then it should be fine.

Insert your code into a Code Component (which allows you to specify arbitrary JS code at any point in the study) and you should be able to combine your custom JS analysis with your PsychoPy study

sounds great! many thanks, we will try it out
cheers
david