Summary
- Plugin name : CSV File Writer
- Version : 1.0
- Author : Victor Herlin
- Company : Mensia Technologies SA
- Short description : Writes signal in a CSV (text based) file
- Documentation template generation date : Apr 11 2018
Description
This box writes incoming time series along with a stimulation stream into a text file using the Comma Separated Values format conforming to the RFC 4180 format.
The header of the CSV file contains some additional information that enables additional features during subsequent reading. This format is described in the Miscellaneous section.
Inputs
1. Input stream
Time series input, this can be either a Signal, Streamed Matrix, Spectrum, Covariance Matrix or Feature Vector stream.
- Type identifier : Signal (0x5ba36127, 0x195feae1)
2. Stimulations stream
Stimulations to be written alongside the signal.
- Type identifier : Stimulations (0x6f752dd0, 0x082a321e)
Settings
1. Filename
Path of the CSV file to be written.
- Type identifier : Filename (0x330306dd, 0x74a95f98)
- Default value : [ record-[$core{date}-$core{time}].csv ]
2. Precision
Precision, in number of decimal digits, of the resulting data. For longer data the precision can significantly impact the file size.
- Type identifier : Integer (0x007deef9, 0x2f3e95c6)
- Default value : [ 10 ]
3. Append data
By default this box will overwrite data in the file if it exists. If this setting is set to true, the box will append data to the file instead. If the file is empty a header will be added as well. It is up to the user to ensure herself that the data written is of the same type and dimensions.
- Type identifier : Boolean (0x2cdb2f0b, 0x12f231ea)
- Default value : [ false ]
4. Only last matrix
If this setting is activated, only the last received matrix will be written to the file. This can be used, for example, with cumulative average box.
- Type identifier : Boolean (0x2cdb2f0b, 0x12f231ea)
- Default value : [ false ]
Examples
Example of writing a spectrum into a CSV file:
Miscellaneous
The CSV Format
Example file containing Signal data and Stimulations
Signal file sampled at 8Hz, with epochs of 0.5s length. Note that the timestamps do not have an end time which is implicit.
In this example each x represents an arbitrary floating point value. The header contains the following rows:
- Time:8Hz - contains the timestamp of each sample, this label also encodes the original sampling rate
- Epoch - contains the number of the epoch in which each sample is contained, this allows encoding even overlapping signal
- O1, O2, Pz, P3, P4 - channels containing EEG data
- Event Id - contains a colon separated list of StimulationIds
- Event Date - contains the same number of timestamps
- Event Duration - is constructed in the same manner as Event Date
Example file containing a three dimensional matrix
This example file contains 2x2x2 matrices produced every 0.125 seconds and spanning one second.
The labels for this matrix are:
- for first dimension "LA", "LB"
- for second dimension "1", "2"
- for third dimension "X", "Y"
- Note
- A label can be an empty string. If second dimension had an empty label then the first column would have label "LA::X", if it were the third dimension the column would have label "LA:1:"
Example file containing a spectrum
Spectrum file with 2 channels, 128Hz signal and spectra calculated on periods of 1 second every 0.125 seconds. The last element in the Time column (128) represents the original sampling rate.
Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4