OS (e.g. Win10): Win 10
PsychoPy version (e.g. 1.84.x): 2024.2.1
Standard Standalone? (y/n) If not then what?: y
This is more of a general question / request about documentation for builder components. Is there documentation that lists specifically what attributes of data are generated for each component and how to access them with code? Let me demonstrate what I mean with an example.
To build experiments, I use the builder but heavily rely on custom code snippets. I’m very often in the position where I add in a component to the builder (eg, a button) and I want to be able to access the data generated from this component (ie, its attributes) in a code block. For example, I’ll add in a button, and I want to log the time at which this button was clicked and store it in a Python list of data I’m building up in the background. So I go to the documentation page for the button component (here), and I see nothing that tells me what attributes are available, what they mean, and how to call them (yes, there’s some info in the “Data” section, but it’s vague and doesn’t answer my three questions here). I instead need to look at the default outputted data, look at the column names to see the attributes from the button that get saved to data, and infer what those attributes correspond to and how the outputted data are formatted. So for example, I see the button has .timesOn
and .timesOff
and the data are formatted as a list, from which I assume .timesOn
corresponds to when the mouse clicks on the button, timesOff
corresponds to when the mouse click releases, and the data are formatted as a list to allow multiple button presses per trial.
I’m fairly confident in these inferences for the button, but it’s still uncomfortable for me that they’re inferences. Moreover, I feel as though I’m in this position of trying to infer these types of things from either PsychoPy forums or outputted data for every component. Is there documentation for this somewhere that I’m not seeing? If not----and apologies if I’m just being difficult----but could this information perhaps be added to the existing documentation more explicitly? It would make my life as an experiment developer much easier. Thank you!