embodied-computation-group / Cardioception

Python Cardioception Package - Measuring interoceptive performance with Psychopy
https://embodied-computation-group.github.io/Cardioception/
GNU General Public License v3.0
25 stars 16 forks source link

Compatibility with BITalino #77

Open DominiqueMakowski opened 1 year ago

DominiqueMakowski commented 1 year ago

Salut Nicolas!

We are starting a project for which we'd like to use your Cardioception battery, in particular the HR discrimination task. However, we are using BITalino recording devices to record PPG or ECG.

I was wondering about the feasibility of adding support for this hardware. Do you know if there are any known blockers or issues or prerequisites, and whether it would be something implementable rather easily?

(I'd be happy trying to contribute that of course with your guidance)

LegrandNico commented 1 year ago

Salut @DominiqueMakowski !

Happy to see that you find the task interesting, I'm looking forward to what you will find.

So yes, it is definitely possible to add any kind of hardware, provided that you can access the signal in real-time somehow from the computer that runs the task. By default the package uses Systole's recorders to interact with Nonin PPG, we also have code to read BrainAmp devices through ethernet. So if you have a Python API for your device that can return the last 5 seconds of your signal, you can just call it here to replace the default recorder, and call the peak detection method that fits your signal to compute heart rate (BPM). Everything else should be the same.

That's for the "biofeedback" part of the task, but if the signal you record is not the one you want to use to measure HR, you can also just send triggers to the scanner/amplifier to epoch your recording. To do so you can just call your own function in lines like this one, that by default send triggers to the Nonin recorder at different phases of the trials.

Let me know how it is going.

DominiqueMakowski commented 1 year ago

It seems that receiving data is possible via LSL (doc)

I'm still waiting for the devices to be shipped, but once I get my hands on them I'll give it a go and keep you updated of the process

cheers :)

drvisted commented 7 months ago

Hi there! First post here. Thank you for a wonderful script package with Cardioception. I am also trying to use BITalino with Cardioception. If anyone want to share the code to do this, I would be grateful. If I manage to adapt the code myself, I can share it if there is interest :)

DominiqueMakowski commented 7 months ago

@drvisted by all means please do 😁