OutputFile
Module used for writing numerical data to a text file. The data is represented in the file as a number of columns given names in a header. The first column is called "T" and contains the time (in ticks) when the row was written. All other columns in the output file are defined in the XML file.
Example XML definitions
<module
class = "OutputFile"
name = "OUT"
filename = "data.txt"
>
<column name = "X" />
<column name = "Y" />
</module>
The following example shows how the header describes the number of' columns in each output column and its name. The file could have been produced by the above module definition if the input vector to "X" had one value and the input to "Y" had two values.
T/1 X/1 Y/2 0 2.0000 12.0000 5.0102 1 31.0000 5.4000 10.4321 : :
As default there are four decimals in each column. This can be changed with the decimals attribute:
<module
class = "OutputFile"
name = "OUT"
filename = "data.txt"
decimals = "0"
>
<column name = "X" />
<column name = "Y" decimals = "2" />
</module>
Here, the attribute decimals in the module tag sets the default decimals to none for all columns. This is changed locally for column Y where 2 decimals are used. The example above will now become:
T/1 X/1 Y/2 0 2 12.00 5.01 1 31 5.40 10.43 : :
Example XML definition
Example
<module
class = "OutputFile"
name = "OutputFile"
filename = "data.txt"
/>
Parameters
| Name | Description | Type | Default |
|---|---|---|---|
| class | The class name for the module; must be "OutputFile". | string | |
| name | The name of this instance of the module. | string | |
| filename | File to write the data to | string | |
| decimals | Number of decimals for all columns | int | 0 |
| column | Definition of a column in the output file; name attribute sets the name of the column; decimals sets the number decimals of this column | element |
Module Connections
Inputs
| Name | Description |
|---|---|
| * | The module can have any number of inputs; each will generate a column in the output |
Limitations
It should be possible to supress the timing column "T".
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
OutputFile.h
OutputFile.cc
OutputFile.ikc