| Reference | Downloads | Github

Eliminating extra trial information that is output to csv file, and question about timestamp


I’m using:
Mac High Sierra
PsychoPy version 1.90.1
Standard Standalone? y

In experimental settings, I output a csv file and an excel file. The excel file looks good after running the expeirment, but just a quick question about the csv file. There are a lot of extra columns in the csv file I’m not used to seeing (with previous psychopy experiments I’ve built) that have to do with the internal trial counter for the loops. There is a column for myloop.thisRepN, myloop.thisTrialN, myloop.thisN, and myloop.thisIndex. I’m not used to seeing these columns output to the csv file. Is there a setting for this somewhere? I can’t find it, but I would prefer to (easily) exclude these from my csv file if possible. I have a lot of loops and it makes it harder to parse if I want to use the csv files for parsing.

Also, I wonder if it’s possible to spit out separate csv files for different loops (rather than separate worksheets in one excel workbook)? If it’s not easily doable, no biggie, just curious.

Lastly, I also have a question about timestamps. I’ve seen some posts about writing timestamps to the data with code components… I’m just wondering if there’s an easy way to tell builder to put a timestamp for the start of each trial in the csv files, or if it’s necessary to write that into a code component? If code component, I will look more carefully at other posts.

Thanks so much!

Those counters might seem redundant if you only have a simple loop structure, but for more complicated designs, people would struggle at the analysis stage to account for order effects if they aren’t present. There is no setting to switch them off, you just need to ignore/exclude them at the analysis stage. This is easily done when analysing in a script based environment, (e.g. with R or Python). But even if using Excel for data manipulation, you should just hide rather than delete those columns. It makes it easier to incorporate new data if they all have the same arrangement of columns, and you never know if you will actually need them to look for some unexpected order effects.

Yes, but it will take a line in a code component. Each loop can save its own data. Look up the documentation for the TrialHandler class, and its methods like saveAsWideText()

Yes, this takes a line or two of code (one to get a time from the global clock at the start of the first routine, and one to save the difference between that the current time on every routine).