Skip to content

Repository files navigation

XDF example files

Example files to test XDF readers.

minimal.xdf

Minimal example file with two streams.

Stream 0

3 int16 channels, 9 samples

Header

<info>
<name>SendDataC</name>
<type>EEG</type>
<channel_count>3</channel_count>
<nominal_srate>10</nominal_srate>
<channel_format>int16</channel_format>
<created_at>50942.723319709003</created_at>
<desc/>
<uid>xdfwriter_11_int</uid>
</info>

Footer

<info>
<writer>LabRecorder xdfwriter</writer>
<first_timestamp>5.1</first_timestamp>
<last_timestamp>5.9</last_timestamp>
<sample_count>9</sample_count>
<clock_offsets>
<offset>
<time>50979.76</time>
<value>-.01</value>
</offset>
<offset>
<time>50979.86</time>
<value>-.02</value>
</offset>
</clock_offsets>
</info>

Time-series data

time_stamp012
5.1192255238
5.2122232
5.3132333
5.4142434
5.5152535
5.6122232
5.7132333
5.8142434
5.9152535

These time-stamps precede the first clock offset measurement, but for synchronization they will be handled with respect to the first (and only in this case) detected clock segment.

Clock offsets

Clock offset times do not match the footer. This should not happen with LabRecorder but as this file is code-generated it's just a quirk. The footer values are not used for synchronization so they can be safely ignored here.

timevalue
6.1-0.1
7.1-0.1

Stream 0x02C0FFEE / 46202862

1 string channel, 9 samples

Header

<info>
<name>SendDataString</name>
<type>StringMarker</type>
<channel_count>1</channel_count>
<nominal_srate>10</nominal_srate>
<channel_format>string</channel_format>
<created_at>50942.723319709003</created_at>
<desc/>
<uid>xdfwriter_11_str</uid>
</info>

Footer

Identical to stream 0.

Time-series data

time_stamp0
5.1(XML footer)
5.2Hello
5.3World
5.4from
5.5LSL
5.6Hello
5.7World
5.8from
5.9LSL

Clock offsets

No clock offsets, so synchronization will have no effect.

clock_resets.xdf

Stream 1

1 string channel, 175 samples

Header

<info>
<name>MyMarkerStream</name>
<type>Markers</type>
<channel_count>1</channel_count>
<nominal_srate>0</nominal_srate>
<channel_format>string</channel_format>
<source_id>myuidw43536</source_id>
<version>1.1000000000000001</version>
<created_at>564076.02850699995</created_at>
<uid>1efcb4a6-8894-4014-b404-4b6f6b2205f2</uid>
<session_id>default</session_id>
<hostname>BP-LP-022</hostname>
<v4address />
<v4data_port>16572</v4data_port>
<v4service_port>16572</v4service_port>
<v6address />
<v6data_port>16572</v6data_port>
<v6service_port>16572</v6service_port>
<desc />
</info>

Footer

<info>
<first_timestamp>653153.2121885</first_timestamp>
<last_timestamp>259.6538279</last_timestamp>
<sample_count>175</sample_count>
<clock_offsets>
<offset>
<time>653156.02616855</time>
<value>-652340.2838639501</value>
</offset>
<!-- cut -->
<offset>
<time>264.6430016000002</time>
<value>1121.165595</value>
</offset>
</clock_offsets>
</info>

Time-series data

time_stamp0
653153.212188XXX
653156.001700Test
653158.235593Blah
653158.674409Test
653161.255786Test-1-2-3
255.326187Test-1-2-3
255.794242Testtest
257.288286Test
258.881481Test-1-2-3
259.653828XXX

Clock offsets

timevalue
653156.026169-652340.284
653161.027235-652340.284
653166.028073-652340.284
653171.029007-652340.284
653176.029238-652340.284
244.6422701121.166
249.6423641121.166
254.6425951121.166
259.6427181121.166
264.6430021121.166

Stream 2

8 float32 channels, 27815 samples

Header

<info>
<name>BioSemi</name>
<type>EEG</type>
<channel_count>8</channel_count>
<nominal_srate>100</nominal_srate>
<channel_format>float32</channel_format>
<source_id>myuid34234</source_id>
<version>1.1000000000000001</version>
<created_at>653103.26692229998</created_at>
<uid>fa3e14ab-b621-480e-a9d5-c740f0e47140</uid>
<session_id>default</session_id>
<hostname>BP-LP-022</hostname>
<v4address />
<v4data_port>16573</v4data_port>
<v4service_port>16573</v4service_port>
<v6address />
<v6data_port>16573</v6data_port>
<v6service_port>16573</v6service_port>
<desc />
</info>

Footer

<info>
<first_timestamp>653150.379117</first_timestamp>
<last_timestamp>261.9267033</last_timestamp>
<sample_count>27815</sample_count>
<clock_offsets>
<offset>
<time>653156.0261441499</time>
<value>-652340.28383985</value>
</offset>
<!-- cut -->
<offset>
<time>264.6385764000001</time>
<value>1121.1656319</value>
</offset>
</clock_offsets>
</info>

Time-series data

time_stamp01234567
653150.3140610.1420.4630.3540.2200.7610.3230.3120.861
653150.3247860.3110.7400.9490.5050.0340.5180.3260.788
653150.3355120.6110.8380.7800.7670.0650.2140.0440.238
653150.3462370.7320.3180.2490.2720.9230.5750.1770.086
653150.3569620.8630.3340.3010.6451.0000.2480.6640.246
261.9754810.4180.3590.2770.8980.6270.5620.0210.015
261.9862720.0610.2150.1900.0460.9380.5230.9310.481
261.9970630.7920.3370.2990.9590.0230.6030.6200.861
262.0078530.8900.8830.6380.1130.0220.5330.6040.743
262.0186440.8730.0640.6840.1530.3060.1230.7110.892

Clock offsets

timevalue
653156.026144-652340.284
653161.027186-652340.284
653166.028073-652340.284
653171.029031-652340.284
653176.029199-652340.284
244.6372581121.166
249.6374011121.166
254.6374431121.166
259.6384061121.166
264.6385761121.166

empty_streams.xdf

Example containing empty and non-empty data and marker streams.

Stream 1

1 string channel, 1 sample

Header

<info>
<name>ctrl</name>
<type>control</type>
<channel_count>1</channel_count>
<channel_format>string</channel_format>
<source_id>kassia</source_id>
<nominal_srate>0.000000000000000</nominal_srate>
<version>1.100000000000000</version>
<created_at>91684.87631725401</created_at>
<uid>4740b9ba-d45d-4e2b-9a4b-ee966d9b56df</uid>
<session_id>default</session_id>
<hostname>kassia</hostname>
<v4address />
<v4data_port>16572</v4data_port>
<v4service_port>16572</v4service_port>
<v6address />
<v6data_port>0</v6data_port>
<v6service_port>0</v6service_port>
<desc>
<manufacturer>pylsltools</manufacturer>
</desc>
</info>

Footer

<info>
<first_timestamp>91725.014004246</first_timestamp>
<last_timestamp>91725.014004246</last_timestamp>
<sample_count>1</sample_count>
<clock_offsets>
<offset>
<time>91716.691545932</time>
<value>-1.889200211735442e-05</value>
</offset>
<!-- cut -->
<offset>
<time>91746.69261952251</time>
<value>-3.837950498564169e-05</value>
</offset>
</clock_offsets>
</info>

Time-series data

time_stamp0
91725.014004{"state": 2}

Clock offsets

timevalue
91716.691546≅0
91721.691770≅0
91726.692053≅0
91731.692211≅0
91736.692330≅0
91741.692493≅0
91746.692620≅0

Stream 2

Empty stream.

Header

<info>
<name>Empty marker stream: test stream 0 counter</name>
<type>data</type>
<channel_count>1</channel_count>
<channel_format>string</channel_format>
<source_id>test_stream.py:191748:0</source_id>
<nominal_srate>0.000000000000000</nominal_srate>
<version>1.100000000000000</version>
<created_at>91696.18816467900</created_at>
<uid>6f7e0288-10b8-4f48-89f8-0381ce20922f</uid>
<session_id>default</session_id>
<hostname>kassia</hostname>
<v4address />
<v4data_port>16574</v4data_port>
<v4service_port>16574</v4service_port>
<v6address />
<v6data_port>0</v6data_port>
<v6service_port>0</v6service_port>
<desc>
<manufacturer>pylsltools</manufacturer>
</desc>
</info>

Footer

<info>
<first_timestamp>0</first_timestamp>
<last_timestamp>0</last_timestamp>
<sample_count>0</sample_count>
<clock_offsets>
<offset>
<time>91716.691513728</time>
<value>-2.540599962230772e-05</value>
</offset>
<!-- cut -->
<offset>
<time>91746.69276649199</time>
<value>-2.026499714702368e-05</value>
</offset>
</clock_offsets>
</info>

Clock offsets

timevalue
91716.691514≅0
91721.691774≅0
91726.692058≅0
91731.692287≅0
91736.692447≅0
91741.692554≅0
91746.692766≅0

Stream 3

Empty stream.

Header

<info>
<name>Empty data stream: test stream 0 counter</name>
<type>data</type>
<channel_count>1</channel_count>
<channel_format>float32</channel_format>
<source_id>test_stream.py:191790:0</source_id>
<nominal_srate>1.000000000000000</nominal_srate>
<version>1.100000000000000</version>
<created_at>91699.83395166400</created_at>
<uid>ff430a18-9954-43f5-bb5f-f5589e3aa6a2</uid>
<session_id>default</session_id>
<hostname>kassia</hostname>
<v4address />
<v4data_port>16575</v4data_port>
<v4service_port>16575</v4service_port>
<v6address />
<v6data_port>0</v6data_port>
<v6service_port>0</v6service_port>
<desc>
<manufacturer>pylsltools</manufacturer>
<channels>
<channel>
<label>ch:00</label>
<type>misc</type>
</channel>
</channels>
</desc>
</info>

Footer

<info>
<first_timestamp>0</first_timestamp>
<last_timestamp>0</last_timestamp>
<sample_count>0</sample_count>
<clock_offsets>
<offset>
<time>91716.6915301265</time>
<value>-2.211050014011562e-05</value>
</offset>
<!-- cut -->
<offset>
<time>91746.69269425601</time>
<value>-1.128000440075994e-05</value>
</offset>
</clock_offsets>
</info>

Clock offsets

timevalue
91716.691530≅0
91721.691776≅0
91726.692048≅0
91731.692247≅0
91736.692367≅0
91741.692487≅0
91746.692694≅0

Stream 4

1 int32 channel, 10 samples

Header

<info>
<name>Data stream: test stream 0 counter</name>
<type>data</type>
<channel_count>1</channel_count>
<channel_format>int32</channel_format>
<source_id>test_stream.py:191695:0</source_id>
<nominal_srate>1.000000000000000</nominal_srate>
<version>1.100000000000000</version>
<created_at>91690.55328314200</created_at>
<uid>bc60b7bb-e632-407c-b3db-e42f9cad4179</uid>
<session_id>default</session_id>
<hostname>kassia</hostname>
<v4address />
<v4data_port>16573</v4data_port>
<v4service_port>16573</v4service_port>
<v6address />
<v6data_port>0</v6data_port>
<v6service_port>0</v6service_port>
<desc>
<manufacturer>pylsltools</manufacturer>
<channels>
<channel>
<label>ch:00</label>
<type>misc</type>
</channel>
</channels>
</desc>
</info>

Footer

<info>
<first_timestamp>91725.21394789348</first_timestamp>
<last_timestamp>91735.21394789348</last_timestamp>
<sample_count>10</sample_count>
<clock_offsets>
<offset>
<time>91716.6915717245</time>
<value>-1.94335007108748e-05</value>
</offset>
<!-- cut -->
<offset>
<time>91746.69274602149</time>
<value>-3.694550105137751e-05</value>
</offset>
</clock_offsets>
</info>

Time-series data

time_stampch:00
91725.2139480
91726.2139481
91727.2139482
91728.2139483
91729.2139484
91730.2139485
91731.2139486
91732.2139487
91733.2139488
91734.2139489

Clock offsets

timevalue
91716.691572≅0
91721.691773≅0
91726.692049≅0
91731.692249≅0
91736.692457≅0
91741.692557≅0
91746.692746≅0

twochannel_string_marker.xdf

An example file with two streams, one with string markers.

Stream 3735928559

2 string channels, 1 sample

Header

<info>
<name>SendMarker</name>
<type>Marker</type>
<channel_count>2</channel_count>
<nominal_srate>1000</nominal_srate>
<channel_format>string</channel_format>
<created_at>10</created_at>
</info>

Footer

<info>
<first_timestamp>10</first_timestamp>
<last_timestamp>10.001</last_timestamp>
<sample_count>1</sample_count>
</info>

Time-series data

Data:

["Marker 0A", "Marker 0B"]

Timestamp: 16.725987961266686

These time-stamps precede the first clock offset measurement, but for synchronization they will be handled with respect to the first (and only in this case) detected clock segment.

Clock offsets

timevalue
6.1-0.1

Stream 46202862

64 Float64 channels, 1 sample

Header

<info>
<name>SendDataC</name>
<type>EEG</type>
<channel_count>64</channel_count>
<nominal_srate>1000</nominal_srate>
<channel_format>double64</channel_format>
<created_at>10</created_at>
</info>

Footer

<info>
<first_timestamp>10</first_timestamp>
<last_timestamp>10.001</last_timestamp>
<sample_count>1</sample_count>
</info>

Time-series data

Data:

[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]

Timestamp: 16.725987961266686

These time-stamps precede the first clock offset measurement, but for synchronization they will be handled with respect to the first (and only in this case) detected clock segment.

Clock offsets

timevalue
6.1-0.1

About

Minimal example files to test readers

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors