Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Feb 14, 2021

Conversation

ErikBjare
Copy link
Contributor

@ErikBjare ErikBjare commented Nov 30, 2020

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

  • Needs rebasing on upstream (remove unrelated commits)
  • Needs testing
  • Changes by black should be applied in separate commit, or skipped altogether
  • Don't write the entire file every time

@ErikBjare ErikBjare force-pushed the dev/continuous-record branch 3 times, most recently from 2e78b01 to 147f402 Compare December 2, 2020 15:05
@sjawhar
Copy link
Contributor

sjawhar commented Dec 5, 2020

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
Copy link
Contributor

xloem commented Jan 7, 2021

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

@ErikBjare ErikBjare changed the title feat: started working on continuous recording (to make resilient against failing streams) feat: continuous recording (resilient against failing streams) Feb 7, 2021
@ErikBjare ErikBjare marked this pull request as ready for review February 7, 2021 11:19
@ErikBjare
Copy link
Contributor Author

ErikBjare commented Feb 7, 2021

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

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

As a Muse 'old head' with a stack of 'original' non-BLE Muse 2014s laying around, I simply must correct this. Let's call the 2016 version the 'classic' version.
@jdpigeon
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants