| Reference | Downloads | Github

Reduce Unnecessary Columns in Data CSV

If this template helps then use it. If not then just delete and start from scratch.

OS: macOS Catalina 8 Beta
PsychoPy version : 3.1.5
**Standard Standalone? Y
**What are you trying to achieve?: I just want to remove some of the outputs from the mouse and blocks in my data file to clean it up. For Instance I don’t need my mouse location or middle and right clicks or time of mouse click or anything like that. I honestly just need what was clicked and I’ve got that. I also don’t need a lot of the columns generated when a loop is added. Especially the .thisIndex .this___N. I know this is kind of nit-picky and once I “finish” the program I can go into the code and remove these, but I adjust the code frequently and it’s a hassle to have to do that every time I change something in the builder. I understand if there currently isn’t and implementation for this, but I hope there is. The recent-ish update to allow unchecking a stimulus onset offset times made my life so much better.


**What did you try to make it work?:Checked all the options for psychophysics and builder parts

**What specifically went wrong when you tried that?: Nothing…I just couldn’t find it

No I’m afraid that isn’t possible right now and there are no plans currently to allow those to be removed. Although you might not need to know what trial/block you were on it seems like something that should always be saved and for something like a mouse time (when your response really was made by a mouse) then I really think it’s worth having just in case. (Are you certain a reviewer won’t some day ask you if this was just a speed-accuracy tradeoff?)

One suggestion (that you might no like) is to switch to using a scriptable analysis package, like R or Python. In these, when you load the data file and analyse it, you just request the column names that you need. This way don’t need to care if there were other unused columns or if the column has changed position, which can also happen. I understand I’m suggesting quite a shift in your research pipeline, but in the long term it’s a great thing to do for numerous reasons.

However, I am aware that the columns have gone a bit crazy lately (because some users wanted onset/offset for every Component in the study on by default). My intention is that, instead of allowing further options to skip saving of data, we should allow more options to prioritise the position of the data you care about. Let’s say you run the Stroop task and you just want the congruence and resp.rt it would be natural enough to ask PsychoPy to put the resp columns close to the left and then you’ll see those most easily when you open the file. The other coumns would still be there, but continuing off to the right where you can ignore them. Would that solution work for you? (I should point out we haven’t begun coding such a thing but it’s in my mind).


Thats actually a fantastic solution. I totally understand why you don’t plan to implement a way to remove those, and I think being able to prioritize the location of columns is a really good compromise. As far as switching to using straight python that is the goal eventually, but I’ve had to learn everything over the course of the last year (I was coding illiterate) and PsychoPy has been an invaluable tool. Without I wouldn’t have been able to program my thesis and other projects.