Data collection in EventIDE is done with a special integrated tool, called Report. Report is a high-speed and crash-protected storage for any data received during an experiment run. Adding new data to Report is a task that needs to be programmed in code snippets. For example, the following code adds a new line with 5 separated fields to the Report (usually such line is added on each trial)
After an experiment completed, all lines collected in Report can be exported to a text or Excel file.
In many scenarios it’s practical to add a subject info in the start of the data file. The subject info can contain several parameters, like participant’s name, age and other values defined individually for each participant. EventIDE does not have a startup window, where such parameters can be entered at the start of the experiment but, in fact, the similar task is easily achievable. Here, we show how to do it.
Composing the subject info
At the start, define a list of global variables in Header that will be used to store the subject info:
There are two ways to change values for each participant. First the values can be entered directly in the Header code:
Secondly, if the public keyword is added before variable name (as on examples above), the global variable appears in the proxy list of the EventIDE designer:
Then, values of the global variable can be entered directly in the designer. The values will be preserved on an experiment run.
Storing the subject info
Suppose, these 3 variables compose the subject info that have to be stored beside of in the header of all collected data. The best way to accomplish it is to use the OnInitialized code snippets of the experiment object (it can be opened using the snippet panel, as below). The OnInitialized snippet is called once at the start of an experiment run, thus its the best place for all initialization actions.
Then, in the snippet code, add the following code:
This code composes a string that contains three lines of the subject info (“\n” is a new line char) and add this string into Report. After exporting Report to a text file or to Excel, the header there would look similar to this:
The OnInitialized snippet is also can be used to create a column headers for the data that is going to be saved later in an experiment. In this case, just add extra lines to the example above:
Notice that you have to use “Report=Report+” expression if you want to compose several Report line in the same snippet. Only last value of any proxy variable (Report is a proxy variable) is actually counted when a snippet call ends, therefore the Report variable has to accumulate all additions.