I am new to Psychopy and coding, I have an experiment with different 10 image stimuli, I am generating tens of data per each stimuli, i saved the data in another excel file but I will need the name of the image/stimuli in another column to know which data is gotten from which image.
I tried adding a column with image.name but its just listing ‘image’ instead and not the name/path of each of the stimuli.
I need help with this.
Hello Easyteam
did you take a look at the csv-file? The columns of your Excel-file used to present the stimuli will be save to the csv-file.
BTW, Peirce, J. W., Hirst, R. J. & MacAskill, M. R. (2022). Building Experiments in PsychoPy. 2nd Edn London: Sage is an excellent source to get started with PsychoPy.
Best wishes Jens
Thank you for your reply, there is the column in the csv file, but I have two csv files, the normal output csv from psychopy and another csv I created myself, I want the Image names column on the csv file I created.
Hello Easyteam
so how do you try to add the image-column to your self-created csv-file?
Best wishes Jens
Thank you, I used “ws.write(row, 1, str(image.name))”, image is the name of the component.
Is it possible to have another column in the original csv file showing the image stimuli names again? I already have the default column but I need another column, I tried “thisExp.addData(‘images’, image.name)” but its just giving the name of the component which is “image” and not the name of each of the image stimuli.
Hello,
I have a column in an Excel-file called imageName which specifies the image presented in a trial. When I add
thisExp.addData('FileName', imageName)
in a code-component in the End routine tab I get an extra column in the PsychoPy data-file called FileName which lists the filenames of the images displayed.
Best wishes Jens
Thank you greatly, that works
1 Like