Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

universal format for importing of data into OSCAR?
#1
universal format for importing of data into OSCAR?
Is there a universal format that OSCAR will automatically accept and plot without changes to the OSCAR source code?

I'm asking because I hope to produce positional data (accelerometer) and Gyro data to detect movement direction and amplitude in order to determine if and how much legs and arms move during sleep and possible arousals.

The MPU-6050 MEMS technology Accelerometer/Gyro development boards are under $5, the Arduino Uno microcontroller is available for under $20. The Arduino is highly capable and easily can produce data in a .csv format. The Arduino development board for storing the data (SD card datalogging) card is under $10. The real time clock development board is priced around $5. Thus a nicely capable sensor and datalogging solution costs under $40. The Arduino also has 6 analog to digital inputs, making it expandable for other sensors if needed.

At present,  I intend to use this hardware for my own use (unless other users express interest). But,  I'd like to be able to import it into OSCAR without asking help from the developers or requesting OSCAR technical assistance. Is there a standard/universal format that OSCAR understands natively (such as a .csv file)? If I programmed my unit to spit out an EMF file, would OSCAR automatically import and display it?

TY

AB
Post Reply Post Reply
#2
RE: universal format for importing of data into OSCAR?
Nope, since "universal" is impossible to define in the abstract.

But if you want to look at what accelerometer data OSCAR does currently support (Somnopose: orientation, inclination, and movement magnitude) and let us know what it's missing, we can work on defining what a comprehensive generic set of position/movement channels might be and go from there.

As Phil said in your other thread, requests like this will be good to have in mind when we overhaul the database. That's a ways off, though, since that will be a very big project and there's a lot of other work that needs to happen first.
Post Reply Post Reply
#3
RE: universal format for importing of data into OSCAR?
(08-11-2020, 08:51 PM)sawinglogz Wrote: But if you want to look at what accelerator data OSCAR does currently support (Somnopose: orientation, inclination, and movement magnitude) and let us know what it's missing, we can work on defining what a comprehensive generic set of position/movement channels might be and go from there.

As Phil said in your other thread, requests like this will be good to have in mind when we overhaul the database. That's a ways off, though, since that will be a very big project and there's a lot of other work that needs to happen first.

Granted, 'universal' is a mouthful and impossible to address without further specification!

I'd love to know more about the accelerator/gyro format presently supported by OSCAR! But, haven't found where such info is posted and I'm hesitant to tie up developers as I am new, the project is in it's infancy/preliminary and might not happen and I am not aware regarding whether forum users think such an undertaking is necessary/wanted. I know importing and displaying accelerometer data is not in the WIKI, and I'm 99 percent sure it's not in the OSCAR docs....I've read the OSCAR doc file at least 10 times since I came onboard. Where is info regarding the currently supported import of accelerometer data written?

If I had more seniority, I'd comment regarding whether the OSCAR developers should make the ability to import data from a more 'universal' .EDF file more universally available or whether they should continue mods to the code when new hardware needs to be integrated into OSCAR. I'm very new, but I think that the developers might be better off taking the more 'universal' approach-and that's as much as I should say at this time. However, don't be offended please-that's just my gut feeling! I personally can see the possibility of at least 2 EEG sensors (state of sleep and REM detector) and a strain gauge chest mounted sensor, plus accelerometer/gyro data being added to OSCAR, and who knows what will happen in the future? Microelectronics is getting cheaper, smaller and better performing each day. Moderately sized PCB's can be had for $2 each (in quantity of 5, with free shipping) and as such, the future of expansion of OSCAR's ability to display new data types might be easier in the near future due to advances in technology.

Regards,

AB
Post Reply Post Reply
#4
RE: universal format for importing of data into OSCAR?
You can always UTSL (Use The Source, Luke!).

The Somnopose data type for Orientation & Inclination (which I use for movement) is a csv file with the first line containing headers and subsequent lines containing floats and is described here. The loader plugin searches, case insensitive, for columns titled 'timestamp', 'inclination' and 'orientation' which can be in any column. 'timestamp' is seconds since midnight GMT, 1 Jan 2001.

Sleep stage data can be in a ZEO or Dreem format.
Post Reply Post Reply
#5
RE: universal format for importing of data into OSCAR?
What he said! Smile

You can find the relevant source code at:

https://gitlab.com/pholy/OSCAR-code/-/bl...loader.cpp

and

https://gitlab.com/pholy/OSCAR-code/-/bl...schema.cpp
Post Reply Post Reply
#6
RE: universal format for importing of data into OSCAR?
Is there any downside in making the Somnopose importer a little more generic... e.g. add 'movement' (and maybe pulse and SPO2) and make all data columns optional? Maybe create a 'GenericCSV' plugin instead?
Post Reply Post Reply
#7
RE: universal format for importing of data into OSCAR?
(08-12-2020, 07:23 PM)kappa Wrote: Is there any downside in making the Somnopose importer a little more generic... e.g. add 'movement' (and maybe pulse and SPO2) and make all data columns optional? Maybe create a 'GenericCSV' plugin instead?

I've been studying this issue all day, and I don't have the answer. However, I now understand much about the .EDF files now and I looked at the source code sawinglog provided links to.

The .EDF files contain much more than just the raw data points! And, I think that in the near future, many users will want more sensors. Microelectronics is getting cheaper, smaller, has more processing power and the trend should continue. The current OSCAR software is not user friendly with regard to expansion of OSCARS ability to add a sensor for XXX (for instance). Of course it's possible for programmers to add the capability to do almost anything, but that takes their time and expertise.

Rather than expand on the base architecture of OSCAR, could a more user friendly and user modifiable module be written, which would let the user specify the name of the plot, the default Y axis parameter, and take the raw data directly from a CSV or an EDF file? The base OSCAR plots, would still be fixed and the software for them would remain intact. But a new module would put the user in command of whatever type of sensor they can dream up! The user can customize all the necessary parameters according to the supplemental sensors they want to use.

I can, in the future anticipate the need for a cheap oximiter*** sensor-$10 max, 2 EEG sensors, a gyro and an accelerometer, interfaced to a universal data logging microcomputer that would spit out digital data in .EDF or .CSV as needed for direct import into OSCAR. Most of all, the datalogger must have room for additional data inputs so it (almost) never becomes obsolete.


I will keep developing my sensors, regardless whether the data is importable into OSCAR, but the usefulness of the data is greatly enhanced if it is viewable in OSCAR.

Don't shoot me please, I wish only what's best in the long run and would very much appreciate knowing how the developers and the users feel about this.

AB

***I have 2 pulse oximeter sensors that I obtained for free from the local hospital-these days they are disposable and connect directly to a USB in a computer. Once they are used, the hospital disposes of them! A pulse oximeter sensor shouldn't have to cost $100 each, a pulse oximeter add on from Resmed shouldn't cost $1000 and a single sensor EEG from Dreem shouldn't cost $500, but that's what users are paying these days.
Post Reply Post Reply
#8
RE: universal format for importing of data into OSCAR?
Here, again, is the Somnopose data structure the OSCAR data import feature will handle to display body Orientation (sleep position angle) and Inclination (for display of whatever data you wish providing that it conforms to the indicated data structure, digit allowances, text formats, CSV file type and conforms in using the stated zero-time base in 2001). 

   
I have no particular qualifications or expertise with respect to the apnea/cpap/sleep related content of my posts beyond my own user experiences and what I've learned from others on this site. Each of us bears the burden of evaluating the validity and applicability of what we read here before acting on it.  

Of my 3 once-needed, helpful, and adjunctive devices I have listed, only the accelerometer remains operative (but now idle). My second CMS50I died, too, of old age and the so-so Dreem 2 needs head-positioning band repair--if, indeed, Dreem even supports use of it now.



 
Post Reply Post Reply
#9
RE: universal format for importing of data into OSCAR?
(08-12-2020, 07:23 PM)kappa Wrote: Is there any downside in making the Somnopose importer a little more generic... e.g. add 'movement' (and maybe pulse and SPO2) and make all data columns optional? Maybe create a 'GenericCSV' plugin instead?

No, other than the necessary infrastructure improvements and time.

Right now there are tons of hidden assumptions scattered throughout the code and in various loaders. As we clean up the code and establish the necessary support, something like a generic CSV plugin is exactly where we want to go.

We'll still have native support for the most common devices. But, as you observe, a generic CSV loader that can import any of the channels OSCAR supports would be great for flexibility.

It's just a lot harder to do at this point than it sounds.
Post Reply Post Reply
#10
RE: universal format for importing of data into OSCAR?
(08-13-2020, 09:49 AM)sawinglogz Wrote:
(08-12-2020, 07:23 PM)kappa Wrote: Is there any downside in making the Somnopose importer a little more generic... e.g. add 'movement' (and maybe pulse and SPO2) and make all data columns optional? Maybe create a 'GenericCSV' plugin instead?

No, other than the necessary infrastructure improvements and time.

Right now there are tons of hidden assumptions scattered throughout the code and in various loaders. As we clean up the code and establish the necessary support, something like a generic CSV plugin is exactly where we want to go.

We'll still have native support for the most common devices. But, as you observe, a generic CSV loader that can import any of the channels OSCAR supports would be great for flexibility.

It's just a lot harder to do at this point than it sounds.

Sawinglog,

Thanks for the peek behind the scenes and reality check with regard to this topic. And, I'm glad to hear those in charge of OSCAR software maintenance and development favor a more universal data import tool as well!!!

I am totally unable to do programming, unfortunately! So, I can't help, except by developing hardware.


Regards,

ABA
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Question OK TO IMPORT SLEEP DATA FROM OLD SD CARD INTO OSCAR W/O MESSING UP CURRENT DATA? Plmnb 2 87 19 minutes ago
Last Post: pholynyk
  OSCAR not recognising SD card data from BMC alid 6 53 1 hour ago
Last Post: Gep232
  Uploading Wellue O2 Ring Data to Oscar ggs5 9 655 2 hours ago
Last Post: StuartC
  Trouble importing data to Oscar bubbafoxus 2 94 03-22-2024, 05:40 PM
Last Post: bubbafoxus
  OSCAR Profiles and Combining Different Brand CPAP Data StratCat48 2 49 03-22-2024, 08:00 AM
Last Post: StratCat48
  Where Oscar put the data file? Rosacer24 0 62 03-22-2024, 12:16 AM
Last Post: Rosacer24
  There's 1.5 years of data in my OSCAR, but now there's a problem Snackers 8 228 03-19-2024, 03:36 AM
Last Post: Snackers


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.