Saving several files - before the end of the experiment

Dear Pavlovia team,

Is it possible to save files at intermittent places throughout the experiment and save several files? I’m asking this for two reasons

[1] We’re recoding eye tracking data (webgazer), but because this is several times a second, a CSV file combined with the normal task data would be huge (in contrast to just the eye tracking which would just have 3 columns). So I’d like to save the eye tracking as a separate file.

[2] In my lab, we’ve been having problems with participants finishing the study, but data didn’t get saved (say for ~5-10% of participants, so that’s really too much because participant payments are quite expensive). We’ve not had that problem with JATOS when we could save the data already before participants were on the final page - I think it might be people with slow connections leave the study before the upload is complete. So ideally, we’d like to save the behaviour (which can be large) after the task, while participants do the questionnaires and then save the questionnaires.

I think I’ve also seen other posts here of people having problems with data saving, so maybe this is not just specific to our studies.

Many thanks

Jacquie Scholl

Hi Jacquie,

We are hoping to include periodic data saving in our next major release (February 2024). At the moment one option is that you could use daisy chaining so that instead of running one long experiment the participant could do several shorter experiments consecutively. This would reduce the amount of data being uploaded to the server at each stage.

There isn’t currently any possibility of saving separate data files (e.g. for just the eye tracking data) in online studies. There is now a possibility of reordering the columns using column priority in Experiment Settings / Data which can make some columns easier to find. Also, instead of having extra rows several times per second, you could append the data to a list and then save the list into a single cell after each trial.

Thanks! Would the daisy chaining (several shorter experiments) mean that every time they use a credit? Out institute doesn’t have a subscription…

I’m afraid that I think this would require one credit for each sub-experiment.

Hi wakecarter, for the eye-tracking data we followed your suggestions and got the eye tracking data (list of x and y coordinates) to be appended to a single cell after each trial (in code component’s “end routine” ) within the experiment data file.


// Create lists to which coordinates will be appended, in code component's "begin experiment" (at the start of the experiment)

// Whenever we want the data to be added to the data file (e.g., in code component's "end routine" for a trial)
thisExp.addData('x_pos', window.x_coordinates) // Creates a column 'x_pos' with single cell containing data from x_coordinates list
thisExp.addData('y_pos', window.y_coordinates) // Same for y_coordinates
window.x_coordinates=[]   // overwriting x_coordinate list with empty one
window.y_coordinates=[]   // same for y_coordinates

I’ll be quality checking the data soon (maybe we’ll get some sort of a lag in the recorded gaze positions when the data-saving/ list-overwriting code is called?), but it seems to work well.

Thanks for your help.

1 Like