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

is it possible to save the PPG data from Muse 2 (with bluemuse and/or brainflow)? #233

Open
danielemarinazzo opened this issue May 9, 2023 · 2 comments

Comments

@danielemarinazzo
Copy link
Contributor

📝 Provide a description of the new feature

Hi, unless I have missed something, is not possible to save the PPG file from the Muse 2, right? I can start the stream with bluemuse but then the PPG is not saved.
Is this something I can add myself, or that can be added with not too much effort?
It can be also with brainflow.

@JohnGriffiths
Copy link
Collaborator

Ciao @danielemarinazzo

We haven't tried using the ppg and accelerometer data in eegnb. Mainly because it hasn't been straightforward to access that data previously.

Blusemuse does send the ppg chans, to a separate lsl stream as the eeg. You can see this in the blue muse gui.

The preferred streaming option is now Brainflow not Blusemuse however.

Previously Brainflow did not support anything other than the eeg chans from muse. However I just took a look at the docs and it looks like it does indeed now allow accelerometer and ppg chans to be pulled also -

Available BrainFlow Presets:

BrainFlowPresets.DEFAULT_PRESET, it contains EEG data, to enable 5th EEG channel use board.config_board("p50")

BrainFlowPresets.AUXILIARY_PRESET, it contains Gyro and Accel data, enabled by default

BrainFlowPresets.ANCILLARY_PRESET, it contains PPG data, to enable it use board.config_board("p61")

I think it would be a very good idea to switch to always grabbing those additional streams by default in the eegnb EEG muse device class, and output cav file, IF doing so does not prove too difficult.

One difficulty that could arise is that the sampling rate is different for the ppg to the eeg.

A PR attempting this would be superb! Remember to fork from develop when doing so, not main.

Thoughts?

@tmorshed
Copy link
Collaborator

tmorshed commented Oct 5, 2023

So, one idea is to add a new device type to the devices.eeg board type, e.g., named "museX_bfp":
https://github.com/NeuroTechX/eeg-notebooks/blob/ac1f5fb14d3c2baa8be0cc6ef0cfb87671060e95/eegnb/devices/eeg.py#L33

This could use the pertinent board config from brainflow and get the new channels. Updating the old device types may be tricky as it may add dimensions and mess up with legacy code and experiments/analyses.

Also see: https://github.com/brainflow-dev/brainflow/blob/master/python_package/examples/tests/muse_ppg.py

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

No branches or pull requests

4 participants