In the previous versions of EventIDE data collection in trials had to be coded manually. It was not a difficult task, because saving of multiple variables could be done in one code line:
Report=TrialNumber+";"+BlockNumber+";"+ConditionNumber+";"+RT;
The Report variable represents a built-in file storage for data collection in EventIDE. Text data is saved there each time, when assignment of a new string is done to the Report variable. Although being pretty flexible, this approach requires forming verbose string expressions (like one above), in which recorded variables are interleaved with separator characters. While writing an expression, it’s easy to make a typo or miss necessary quotas. In addition, conversion of variable values to string (albeit automatic in C#) is also not very intuitive in the above example.
A new element, which allows to automate data collection, is introduced in the latest version of EventIDE. The element is called Reporter, it provides a visual designer for collecting and recording data blocks (in rows or columns) made of selected global or proxy variables. The designer is shown on the screenshot below:
In the designer window you can select variables, arrange them and see a preview of how data will look in the resulting file. Working with the element at runtime is very easy. The element makes a snapshot of the selected variables either on onset or offset of the parent event. The it automatically forms a data block and record it into Report. When the element is placed in one of events in a trial loop (usually the last one), it will repeatedly add new data blocks into Report, thus producing a data table of trials. You can read more about applying the Reporter element in the dedicated wiki article and check reworked experiment demos, included with EventIDE.
In some occasions you may still need to use old way- to code data collection with the Report variable. For example, when you want to record all values in an array, you need to write a code that iterates over all array members and builds a data block. The code may look like this:
sting DataBlock="";
for (int i=0;i<ArrayA.Length;i++)
{
DataBlock=DataBlock+ArrayA[i].ToString()+";"; // builds a string containing values
// of all array members, separated by ';'
}
Report=DataBlock; // saves the array data block to a data report
You can use multiple Reporter element and combine them with code-based data recording but, for the majority of experiments, a single Reporter element can handle all data collection in an experiment and yield a nicely formed data table with experiment results.