I am trying to help some trainees recover their data. This experiment had subjects come for visit one and visit two. The task in question was built using PsychoPy infrastructure and output data files with behaviour using .txt and .psydat formats. Sadly, the .txt file from the second visit might have overwritten the .txt file from the first visit, but the two .psydat files from the two visits are there, and we are hoping there might be some chance to recover the participant data from the .psydat file.
I loaded the .psydat file and looked at its content with
dir(psydatfile). This gives a list of attributes for this object. I put these attributes in a list, and using a python loop, I then printed the content of each of these attributes, e.g.
dir(psydatfile.attribute). I was able to recover a little bit of the data, but not things like confidence, or reaction times etc. which would have normally been stored in the .txt file.
I tried then to pierce more deeply into some of these attributes with
dir(psydatfile.attribute.name_of_subattribute). I chose some attributes that the PsychoPy code says they should be storing participant behaviour from the experiment, e.g. addData, addOtherData, addResponse. There’s just another list of attributes there, i.e. no RT data… more like a matryoschka of subsubattributes of subattributes in attributes.
I looked on the PsychoPy forum to see if there’s a way to get csv, excel or txt files out of the psydat, but so far this is inconclusive. The notes on the PsychoPy website say that this .psydat file can be used to generate back the excel, and that it has much more information since it also has the code of the task (which is true, it does have the code). However, there’s no indication on the PsychoPy website how to generate back the excel.
Do you happen to have an idea how to get the csv, excel or txt from psydat?
Or do you reckon that the only way is to load the .psydat and extract the content of some of the attributes, and save that to csv?
How deep do I have to look into the psydat to recover the data, e.g. first level attributes, attributes of attributes, subattributes of attributes?
Is there a better way to recover data other than looking at each of these attributes and subattributes of the .psydat object?
Thanks in advance.