alexandrebarachant / muse-lsl

Python script to stream EEG data from the muse 2016 headset
BSD 3-Clause "New" or "Revised" License
616 stars 182 forks source link

feat: continuous recording (resilient against failing streams) #139

Closed ErikBjare closed 3 years ago

ErikBjare commented 3 years ago

This might be of interest to you @JohnGriffiths

Note: not actually 'continuous', it just saves every 10s. Ideally, it'd append rows into the CSV file instead of rewriting the entire file (but since a DataFrame is used this would require more extensive rewriting).

TODO

sjawhar commented 3 years ago

For appending, all you'd need to do is check if the file already exists and continuous mode is on. If so, use kwargs mode='a', header=False in the call to to_csv()

xloem commented 3 years ago

I've merged this into https://github.com/xloem/muse-lsl .

ErikBjare commented 3 years ago

Just finished this up with the additional comment from @sjawhar.

Works great now, ready for merge! (plz review @jdpigeon)

jdpigeon commented 3 years ago

Awesome. Thanks so much for this. Our original implementation was really quite shaky for collecting longer sessions.