Apnea Board Forum - CPAP | Sleep Apnea
Is there a way to enter Sleep Stage data into OSCAR manually? - 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: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: Is there a way to enter Sleep Stage data into OSCAR manually? (/Thread-Is-there-a-way-to-enter-Sleep-Stage-data-into-OSCAR-manually)



Is there a way to enter Sleep Stage data into OSCAR manually? - cathyf - 05-24-2021

I notice in the OSCAR preferences there is a waveform for Sleep Stage.

I have a fitbit which does a pretty good job of figuring out sleep stages, but the user interface to get the data is moronic. (If I go to my fitbit account in the web interface and bring up the graph, it shows a picture. If I mouse-over various segments on the graph then little boxes pop up showing the sleep stage and a beginning time and ending time. There is no way to download that data -- the only thing that Fitbit will give you in a download is the fraction of the night that you spent in each sleep stage.) While it would be tedious, it would be straightforward to transcribe that data into a text file.

If I were to do such a thing, is there any user interface to suck sleep-stage data from a text file and get it into OSCAR? I can see that under the OSCAR->Data->Import Zeo/Dreem/Somnopose Data menu items OSCAR seems to want to load in CSV files. Can someone tell me the expected format and  I will try to dummy up a CSV file by hand?


RE: Is there a way to enter Sleep Stage data into OSCAR manually? - Crimson Nape - 05-24-2021

I suggest downloading the OSCAR code and look at the oscar/SleepLib/loader_plugins/somnopose_loader.cpp file.


RE: Is there a way to enter Sleep Stage data into OSCAR manually? - kappa - 05-24-2021

Somnopose is currently the simplest format to generate. OSCAR <= 1.2.0 requires columns timestamp, orientation and inclination (this will change in later versions to make this more flexible). Zeo and Dreem have a single row for each sleep session with a hypnogram column that has a sleep stage value for each 30 second epoch in the session. See this post for some examples (note that the Dreem sleep stage reporting changed from numbers to names as per this note, and names is what OSCAR expects in the Dreem loader).