CSV File Writer

Summary

Doc_BoxAlgorithm_CSVFileWriter.png
  • Plugin name : CSV File Writer
  • Version : 1.0
  • Author : Yann Renard
  • Company : INRIA
  • Short description : Writes signal in a CSV (text based) file
  • Documentation template generation date : Jul 24 2014

Description

This box allows to output some of the OpenViBE streams in a text file that is easy to read by the machine and easy to read by the human. CSV files are text files with different values separated by a special character such as a colon, a semicolon or a tabulation. This basic syntax makes them very easy to read for both machine and human. The purpose of this box is to quicly export some data to other softwares.

Inputs

1. Streamed matrix

This is input is used to know what data to dump in the considered file. The type of this input can be modified by the user and the format of the output will be adapted depending on this type. Supported inputs are : Signal, Spectrum and Stimulations. Format specific to each of these stream types is detailed in section Miscellaneous.

  • Type identifier : Signal (0x5ba36127, 0x195feae1)

Settings

1. Filename

This setting contains the file where to store the data.

  • Type identifier : Filename (0x330306dd, 0x74a95f98)
  • Default value : [ record-[$core{date}-$core{time}].csv ]

2. Column separator

This setting contains the special character to use as a separation for the different fields. Typical examples are colon, semi colon and tabulations.

  • Type identifier : String (0x79a9edeb, 0x245d83fc)
  • Default value : [ ; ]

3. Use compression

Due to the fact that text files can grow very quickly, it is possible to compress the file using gzip format. If you want to use compression, just tick this setting. Note: this is not implemented at the moment.

  • Type identifier : Boolean (0x2cdb2f0b, 0x12f231ea)
  • Default value : [ false ]

Examples

Miscellaneous

In this section, we detail the typical outputs that you will find in the output file depending on the type of the input connector.

For the Signal stream, you will have something like this :

Time (s), Channel 1, Channel 2, ..., Channel n, Sampling Rate
Time of measure 1, Measure 1 of channel 1, Measure 1 of channel 2, ..., Measure 1 of channel n, Value of the sampling rate
Time of measure 2, Measure 2 of channel 1, Measure 2 of channel 2, ..., Measure 2 of channel n
...
Time of measure t, Measure t of channel 1, Measure t of channel 2, ..., Measure t of channel n

For the Spectrum stream, you will have something like this :

Time (s), Channel 1, Channel 2, ..., Channel n, Min frequency band, Max frequency band
Time of measure 1, Freq band 1 of m. 1 of chan 1, Freq band 1 of m. 1 of chan 2, ..., Freq band 1 of m. 1 of chan n, Value Min Frequency Band of band 1, Value Max Frequency Band of band 1
Time of measure 1, Freq band 2 of m. 1 of chan 1, Freq band 2 of m. 1 of chan 2, ..., Freq band 2 of m. 1 of chan n, Value Min Frequency Band of band 2, Value Max Frequency Band of band 2
...
Time of measure 1, Freq band f of m. 1 of chan 1, Freq band f of m. 1 of chan 2, ..., Freq band f of m. 1 of chan n, Value Min Frequency Band of band f, Value Max Frequency Band of band f
Time of measure 2, Freq band 1 of m. 2 of chan 1, Freq band 1 of m. 2 of chan 2, ..., Freq band 1 of m. 2 of chan n
Time of measure 2, Freq band 2 of m. 2 of chan 1, Freq band 2 of m. 2 of chan 2, ..., Freq band 2 of m. 2 of chan n
...
Time of measure 2, Freq band f of m. 2 of chan 1, Freq band f of m. 2 of chan 2, ..., Freq band f of m. 2 of chan n
...
...
...
Time of measure t, Freq band 1 of m. t of chan 1, Freq band 1 of m. t of chan 2, ..., Freq band 1 of m. t of chan n
Time of measure t, Freq band 2 of m. t of chan 1, Freq band 2 of m. t of chan 2, ..., Freq band 2 of m. t of chan n
...
Time of measure t, Freq band f of m. t of chan 1, Freq band f of m. t of chan 2, ..., Freq band f of m. t of chan n

For the Stimulation stream, you will have something like this :

Time (s), Identifier, Duration
Time of stim 1, Identifier of stim 1, Duration of stim 1
Time of stim 2, Identifier of stim 2, Duration of stim 2
...
Time of stim n, Identifier of stim n, Duration of stim n