Apnea Board Forum - CPAP | Sleep Apnea
Has anyone tried building their own PSG? - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Main Apnea Board Forum (https://www.apneaboard.com/forums/Forum-Main-Apnea-Board-Forum)
+--- Thread: Has anyone tried building their own PSG? (/Thread-Has-anyone-tried-building-their-own-PSG)



Has anyone tried building their own PSG? - Illorum - 03-07-2020

Full-on in-lab type I polysomnography is hard to get nowadays with the take-home type III craze that insurance companies have started in the past few years. Sadly this means nobody can truly know things like what one's Arousal Index was while sleeping or how many RERAs one is having (though an educated guess can be made with CPAP) which has led me to wonder: have any of you tried to recreate a PSG in your own homes? There are plenty of commercial options available for wearable EEG devices. All you really need an EEG, nasal cannula + oral thermistor for flow, and respiratory effort belt, and pulse oximeter. Not to mention CPAPs are basically already flow measuring devices.

The hardest part is the data analysis - I'm a software engineer and been thinking of making open source PSG software.


RE: Has anyone tried building their own PSG? - Crimson Nape - 03-07-2020

Hi Illorum! - Welcome

I can't recall anyone presenting your idea here before but that doesn't mean much.

Seeing that you're a software engineer, I would like to see if you may be interested in joining the OSCAR development team? If so, please PM bonjour with your request and any specialty skills (e.g.: UI design, data analysis, etc.)


RE: Has anyone tried building their own PSG? - Sleeprider - 03-07-2020

Illorum, interesting project. You seem to be familiar with OSCAR and my first thought is, you might want to join the development team. Your project is a natural branch of the exhisting CPAP Analysis Reporter, and part of the future development of OSCAR may be to increase compatibility to additional devices like oximeters, EEG, and even fitness watches. If you're interested in taking a closer look, and especially if you can work with any aspect of GitLab, the source code and want to hack data outputs from additional devices, your help would be welcome. Contact "bonjour" or "pholynyk" by PM.


RE: Has anyone tried building their own PSG? - slowriter - 03-07-2020

I've not looked at it closely myself, since I don't have the skills or time.

But I'm definitely interested as an end user, and I did look around for any existing efforts, and came across the OpenBCI and Open EEG projects. They may have software and/or hardware to build on.

I will also mention this thread, which is about integrating Dreem 2 data into OSCAR. Right now, it's only the EEG-derived hyponogram data (which is helpful), but hopefully that will expand over time.

I agree with Sleeprider, BTW; would be cool if your work could find its way into OSCAR.


RE: Has anyone tried building their own PSG? - selfcoacher - 02-14-2021

This is something that interests me as well. Bitalino is worth mentioning, but they lack nasal canula/flow meter. Is there any good flow meter that is not part of a CPAP?


RE: Has anyone tried building their own PSG? - davidcmoors - 03-18-2021

Polyman EDF+ seems to be an existing open source PSG software, with an attempt at automated sleep stage scoring.

It comes with a couple of sample xml files that illustrate the data schema. If you could reconstruct your own data in the same format it might be usable.

I downloaded it in the hope that it would enable me to analyse a few sample night's raw data I have from my Dreem 2 EEG headband, as I had been told that the Dreem data was in both EDF and H5 format. The H5 data is readable in both Matlab and HDFView, but the other Dreem data doesn't appear to be EDF readable.


RE: Has anyone tried building their own PSG? - selfcoacher - 03-20-2021

Getting some warnings on Polyman+ when uploading to virustotal.


RE: Has anyone tried building their own PSG? - Gideon - 03-21-2021

Your CMS device is the same one I have.
I agree w SleepRider's assessment. It is likely an unreliable reading. That said, an hour under 88% is a serious concern. You are talking to your doctor about it and that is the right thing to do. IMHO an in-lab sleep study will confirm or deny that issue assuming it occurs with consistency. You can ask your doc if he can provide an overnight O2 study (he can). If you are scheduled for a sleep study, let them know to call you if they have a cancelation. The idea is to validate your home study. Even go and try the cms again, on a different finger.