psychopy.org | Reference | Downloads | Github

Give unique Code to PARTICIPANT

Description of the problem: How do I need to change my settings so the .csv file that gets Saved has a unique code for every Participant and doesn’t look like this.

image

If you add the unique code to the participants field, the file will begin with your unique code, and you can parse this during your analysis. The timing data within the filename ensures with high probability that you never get a name conflict when saving data.

@dvbridges

This is how I set it up. Am I missing a participants field somewhere?

Ah, yes unfortunately, the field must be “participant”, otherwise the input is not used in the filename.

@dvbridges how would I go about saving variables into the CSV file?

For local studies, you use Python code:

thisExp.addData('columnName', variable)

For online studies, you would the following JavaScript:

psychoJS.experiment.addData('columnName', variable);

@dvbridges thank you!

I was wondering if this can now be customized or the field must still be participant. The reason I am asking is that when recruited from Mechanical Turk, subjects may get confused regarding what to put in a field named participant; instead they would know what their WorkerID is.

Thanks!

@rob-linguistics13, ‘participant’ is not a required field online, but ‘participant’ is used in the data filename. If no ‘participant’ field is available, the default “PARTICIPANT” string will be added to the data file name. You will still have unique filenames though, based on the time and date of the participant completing the task.

1 Like