Yippie! Lowest stats yet.

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Yippie! Lowest stats yet.

Post by jedimark » Fri Mar 25, 2011 3:21 pm

Image

My last nights stats.. from the older version of my program I still use for reviewing.

I feel good. Not fantastic.. but pretty darn good today. Note the lack of CSR's and only 1 Clear Airway event. First time I've seen it this good.

I was naughty and didn't take my Circadin last night - I haven't had an unbroken night on it in a week because of it. I took my last two 10mg temazepam instead, and didn't wake up once. Not sure whether I should stick with the Circadin stuff. I've had better sleep on nights without taking anything.

The new version is still all graphs and raw info, but much much cleaner on the inside, and supports plugins and a lot more goodies. I'm just not sure where to place all the bits of information and graphs, etc..

I already have PRS1, Zeo & CMS50 support. I'm adding manual weight/BP/Glucose tracking, support for the SleepTracker watch, and hopefully the ResMed S9 if I can get my hands on some SDcard data.

If anyone has ideas on what awesome sleep/health monitoring software SHOULD look like/work like, I'd like to hear from them. I don't want to copy, but I don't mind borrowing concepts that are known to work.

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
Otter
Posts: 1063
Joined: Sat Mar 19, 2011 5:02 pm

Re: Yippie! Lowest stats yet.

Post by Otter » Fri Mar 25, 2011 4:26 pm

Congratulations on the low stats.

What's are using for circadian? I've tried taking melatonin in doses from 300mcg to 3mg, and eventually arrived at the conclusion that if I took it every night, it just confused my body more. That was me, though, and with untreated OSA.

I have lots of ideas for your new program. Ignore them all if you like, I didn't get any sleep last night. And I'm a bit buzzed on adrenalin as well.

The ability to superimpose charts with the same time scale would be nice. The stacked charts in your old prog look good too. Perhaps that could be another option, with a vertical line you can move horizontally. Maybe you have that already?. Ideally, it would appear only in charts with the same time scale.

The option to choose bar, line, maybe even candlestick charts could be good too. Basically, what I"m saying is make it as customizable as you can without having a stroke, and let the users decide how they want it look and what they want to do with it. Allow them to share these configurations, and you've got something like skins. I'd concentrate on the useful aspects, though, and leave options for making a data analysis tool that looks like audio equipment or a toaster, or has some tone deaf pop star's face plastered on it for people who won't actually use the software to analyze their breathing. Maybe one of the manufacturers will add such foolishness to their user software so that we have something to do while we're not actually analyzing our data, because of course, we leave that the professionals like good little sheep.

It might be a good idea to design with statistical graphics in mind for the future, like the studies stock and commodities traders add to their charts to help them see the patterns and trends. I can find you some examples if it's not clear what I'm talking about. I'm not sure what the math would be, but suspect that if you make it easy for non-coders to enter a formula and have it graphed over or below their data, this could be a case of "if you build it, they will come". It shouldn't be all that hard as this is basically what the apnea and hypoapnea event detections are.

The first use would probably be to customize the definitions of these events and see how your stats look if apnea is interpreted more aggressively. The Intellipap lets you do that in the machine itself, though it doesn't give you the data to analyze your sleep the next day. If such customizations become standard on machines that do let you download the low-level data, then it could be very useful to see where the machine would have responded if you took 10% off the flow reduction that defines an apnea, and at the same time display the events as they were actually defined and detected.

If you leave it open so users can generate any curve based on any data available, people may find ways to mathematically link events whose relationship isn't obvious and make these connections stand out.

This is probably more than you want to get into with this iteration. What I'm suggesting is that you leave your program structure open for this so you can add it later without having to tear the guts out of your UI and start over.

Another good thing along those lines would be a way to include data from cheap pulse oximeters or other data-logging gadgets.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Software: SleepyHead 0.9 beta

User avatar
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: Yippie! Lowest stats yet.

Post by jedimark » Sat Mar 26, 2011 3:12 am

Thanks Otter.. I've found its hard drawing cool ideas like that from people.. They are very welcome and appreciated

I'm on 2mg.. apart from being expensive and making me a little tired at night, it's not doing me a lot of good. :-/

The superimposing thing is technically how I draw the event flags over the top of the waveform. As long one of the dimensions is related (eg date-time) a lot of cool stuff can be done. The charts can hold a lot more information then what is displayed. Effectively I just set a left and right date limit on the area I'm looking at. That's how I implement zooming, scrolling and area selection. I could for instance display the sleep stage alpha blended in light colours underneath the flow waveform.. I would then draw the sleep stage "ticker" on the right side of the graph.

You can select an area of the Sleep Flags by dragging the mouse between two points, and it will show the waveform for that section underneath. Or you can just click anywhere on the sleep flags and it will show a reasonable sized chunk of the waveform around that time. You can select points between the waveform section, and zoom in.. Right click to return to previous zoom level/section. That orange line highlights what section of wave is visible. It's not fast.. it can take up to half a second to move the waveform.. (otherwise I'd be using the scroll wheel to zoom)

I've already done the tests linking the pulse/spo2/waveforms/pressure/leaks with the flags. I tried Pleth too, but it look a little too busy..

As for scripted formulae charting, the advanced user can script/theme already.. using a little bit of python code. It's not hard sharing around a python file. Maybe an "import plug-ins" feature for the clue impaired who can't find the directory. Would probably be nice having a few templates for the beginner to get started.

The theming idea is very worthy of contemplation.. Something like use XML/whatever to lay the graphs/pages/reports out would be awesome. That way someone else can do the crappy layout work for me (that I suck so bad at).

All the cool graphing methods are already supported by matplotlib.. It's just a case of preparing the data in the right format for the graphing library and calling the right plot fuction to do it's magic. As for formulae, most are based on datasets or frequency models. But if it's that complicated it should probably be done in code in the first place.

PM me if you've got the time to bang heads and bounce ideas around.. Worst I'll do is make you do is test my shoddy code

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS50D+/F Oximeter, S9 VPAP Auto/Adapt, PRS1 Auto, Intellipap Auto, SleepyHead :)
Author of the free, cross platform, open-source sleep tracking software SleepyHead.
Download http://sleepyhead.jedimark.net
Source Code http://gitlab.com/sleepyhead/sleepyhead-code

User avatar
tschultz
Posts: 257
Joined: Sun Dec 19, 2010 9:36 pm
Location: Moncton, NB, Canada, Earth, Milky Way Galaxy

Re: Yippie! Lowest stats yet.

Post by tschultz » Sat Mar 26, 2011 10:09 am

jedimark, I emailed you some raw S9 files. They are standard EDF+ format, except for the event data which is EDF+D format. I skipped the CRC files as they are not needed for anything other than the ResScan software.

Congrats on the low numbers and good work on your program so far.

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Currenlty using Auto 15-20, EPR 1 with medium response; 95% pressure is 16.8
Adjusting to life with OSA and being pressurized each night ...