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
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
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.
Thanks for the response Jon,
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