SleepyHead 0.8.8 "Almost Beta" Release

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:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Sat Dec 17, 2011 9:22 pm

Nice to hear your having fun playing around with it. The calcs.cpp logic is still very messy.. :-/
I started to rewrite it but fogged out and had to roll back to avert disaster. It can wait for a fog free day.

Respiratory Rate is mostly integer due to the way it counts breaths, except for the bit that adds on the partial breath at the end. It gets a little mucked up by noisy waveform areas.

Minute vent, and Tidal Volume calcs are also mostly integer due to the way Tidal Volume is created, from the integer flow waveform source. It smooths them at the end by applying a median filter of the past 5 values.. It could average instead here, and the smoothing distance could be enlarged.

Tidal Volume calcs have a lot of room for improvement.. Unfortunately the flow resolution is a little too low (5hz) to get it really good. But right now I'm only taking the top half the equation.. (it's mostly symmetrical, but it would be more accurate if it averaged the top and bottom volumes together, especially at this crummy 5hz resolution)

I'm going to rewrite this stuff soon to work on other machines.. (not that they need it, I just want to make my code more accurate, and will have something to compare it to) All I've compared it to so far is ASV machines charts. My calcs are definitely a lot noisier, but they did follow the trends ok.

_________________
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
Perrybucsdad
Posts: 834
Joined: Mon Sep 12, 2011 7:09 am
Location: Northeast Ohio

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by Perrybucsdad » Sun Dec 18, 2011 7:33 am

Mark... figured out the issue with the import.... was my NAS acting up.

Didn't see a reply yet to the pressure AVG's not working correctly. See this post. viewtopic.php?f=1&t=71696&st=0&sk=t&sd= ... 05#p663818

Also, I went back on APAP last night just to try something, and then I saw this today. Take a look at the two MIN's. They should be the same, but they are not. I had my pressure range 10 - 14, but Pressure says 14 - 14. EPAP is correct.

Image

_________________
Machine: ResMed AirSense™ 10 AutoSet™ CPAP Machine with HumidAir™ Heated Humidifier
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Additional Comments: ResScan v5.9; Sleepyhead v1.0.0-beta

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

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Sun Dec 18, 2011 10:43 am

Perrybucsdad wrote:
jedimark wrote:
Perrybucsdad wrote:Mark, when exporting the data from the app, what does "Pressure" and "EPAP" indicate under event for the detail export? I have a Resmed unit.

Pressure is your raw pressure graph data, (try and graph it in excel/oocalc and see )
EPAP is Exhalation pressure (which is basically pressure minus EPR on your machine)

Export still needs a little work.. It would be nice if you could select the data fields you want..
Kind of figured that, but how come the AVG in sleepyhead does not match the AVG in Excel?

Also, it noted that I am using an EPR of 2 which is not the case. PM me an email and I can send you the RAW data to see.

John
SleepyHead uses a Time Weighted average.. Plain old Average is not accurate dealing with time delta pressure data..

_________________
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

tetragon
Posts: 539
Joined: Wed Oct 19, 2011 4:06 am
Location: Toronto, ON
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by tetragon » Sun Dec 18, 2011 11:15 am

jedimark wrote:Minute vent, and Tidal Volume calcs are also mostly integer due to the way Tidal Volume is created, from the integer flow waveform source. It smooths them at the end by applying a median filter of the past 5 values.. It could average instead here, and the smoothing distance could be enlarged.
Messy. I've found some lecture notes here with nicer ways of doing that type of stuff without enlarging the window size too much (although a mere five sample points is rather small to be working against, I'm more used to seeing w = 5, or 11 points). The algorithms are more complex, but more resistant to outliers. But at least I now know how the variable name med was derived.

_________________
Mask: AirFit™ P10 For Her Nasal Pillow CPAP Mask with Headgear
Additional Comments: Software: SleepyHead, loosely following HEAD

User avatar
peterg
Posts: 191
Joined: Fri Aug 05, 2011 11:01 pm

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by peterg » Fri Dec 23, 2011 12:49 am

Ive just started using sleepyhead with Devilbiss but a first suggestion is for page up and down keys to scroll vertically through the main screens (windows XP) . tia and well done.

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

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Fri Dec 23, 2011 4:48 am

tetragon wrote:
jedimark wrote:Minute vent, and Tidal Volume calcs are also mostly integer due to the way Tidal Volume is created, from the integer flow waveform source. It smooths them at the end by applying a median filter of the past 5 values.. It could average instead here, and the smoothing distance could be enlarged.
Messy. I've found some lecture notes here with nicer ways of doing that type of stuff without enlarging the window size too much (although a mere five sample points is rather small to be working against, I'm more used to seeing w = 5, or 11 points). The algorithms are more complex, but more resistant to outliers. But at least I now know how the variable name med was derived.
It's only really a bit of a distraction to keep things fun at this stage. I'm more interested in getting the rest of the app going first.

It could do with some better pre-filtering, but I found with the crummy 5hz sample-rate it didn't make a much of a difference.. Maybe ResMed data will give better results.. (I can't remember it's sample rate off the top of my head, but it's higher than PRS1.)

Also not helping is we are dealing with sub-hz signals, which makes clean filtering even messier.

Anyway, Let me know if you come up with anything cool in your tinkering.. I'm always open to suggestions.

_________________
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

tetragon
Posts: 539
Joined: Wed Oct 19, 2011 4:06 am
Location: Toronto, ON
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by tetragon » Fri Dec 23, 2011 5:07 am

jedimark wrote:Anyway, Let me know if you come up with anything cool in your tinkering.. I'm always open to suggestions.
One readability suggestion is to pull your median code into a function (with window size parameter). That was what I did before I started on with experiments. Neater to just replace a function call than comment out chunks.

_________________
Mask: AirFit™ P10 For Her Nasal Pillow CPAP Mask with Headgear
Additional Comments: Software: SleepyHead, loosely following HEAD

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

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Fri Dec 23, 2011 5:32 am

tetragon wrote:
jedimark wrote:Anyway, Let me know if you come up with anything cool in your tinkering.. I'm always open to suggestions.
One readability suggestion is to pull your median code into a function (with window size parameter). That was what I did before I started on with experiments. Neater to just replace a function call than comment out chunks.
I have a 3 step coding process.

One write it so it works..
Two, rewrite it cleaner.
Three, optimise the crap out of it..

That section is still stage one

_________________
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
robysue
Posts: 7520
Joined: Sat Sep 18, 2010 2:30 pm
Location: Buffalo, NY
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by robysue » Fri Dec 23, 2011 9:58 am

Two and a half comments about the current version of SH.

1) Once upon a time (SleepyHead 0.6??? or SH 0.7??), SleepyHead reported two different VSI's for the System One machines. Based on my own data, one type is recorded by the machine regardless of whether the machine is running in Auto mode or fixed pressure mode and is NOT recorded as tick marks on the wave flow data in either Encore Pro or SleepyHead; these snores, however, are recorded as ticks in the event table in Encore Pro/Viewer and once upon a time were shown as ticks in the event table in some older version of SH. The other type is recorded only when the machine is set to Auto Mode and does show up as ticks on the wave form in both Encore Pro and SH; these are the snores that the machine actually decides are worthy of pressure increases and perhaps that's why they are not recorded when a PR machine is running in fixed pressure mode.

It would be nice if the current version of SH would show both kinds of VS's in the event table data. I bring this up because the current set up presents a user with wildly different snore numbers if they look at the data in both SH and Encore Viewer/Pro. (The difference in my own snore numbers can differ by an order of magnitude on a bad snoring night.) Moreover, seeing VSI = 0.0 night after night because your machine is running in fixed pressure mode could potentially mislead to new users with fixed pressure machines into thinking that their snoring is under control when it remains very problematic.

1.5) The half-comment: On the PR machines, the Flow Limitation tick marks are recorded only when the machine is running in Auto mode. If the machine is running as a straight CPAP or fixed BiPAP, no FL's are tagged. And hence, what shows up night after night in the data is FL = 0.0, which is misleading both in Encore Viewer and SH. I know I was shocked when I was switched from fixed BiPAP to BiPAP Auto and all of a sudden there were gobs of FL's instead of the FL= 0.0 I'd been seeing for weeks and had been thinking was somehow accurate. Perhaps a note to PR users could be added to the distribution notes that indicates that FL data and SleepyHead's VS data are not recorded when the machine is running in fixed mode.

2) I wish that the Pressure Overview graph tracked the 90% IPAP and EPAP levels as well as the Max IPAP and Min EPAP pressure levels. In my case, the Max IPAP and Min EPAP's are nothing more than the prescribed settings of 8/4 since it is a very, very rare night that I don't hit IPAP = 8cm at some point during the night. And I always start out with EPAP = min EPAP. So the real questions that I'm more interested in are whether the 90% levels are much different than the Max/Min levels. Yes, it makes for busier graph, but it also provides more useful and substantial information.

Thanks for all the great work JediMark!

_________________
Machine: DreamStation BiPAP® Auto Machine
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Additional Comments: PR System DreamStation and Humidifier. Max IPAP = 9, Min EPAP=4, Rise time setting = 3, minPS = 3, maxPS=5

User avatar
peterg
Posts: 191
Joined: Fri Aug 05, 2011 11:01 pm

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by peterg » Fri Dec 23, 2011 9:01 pm

bug?

even though I put my profile in as APAP mode, the details tab list my correct model as DB DV54D but mode as unknown. (doesnt worry me, if it doesnt affect data).

also I installed git and tried to get hold of the source code, but only got as far as the notes. should it be available to strangers? can I PM you for an email of it?

also I get a crash when I go to the online help page (using your browser) Windows XP (Ill try it on Linux when I get home from holidays). dr watson style crash of the sleepyhead program.

I got the links off the programs welcome page and opened them up into Firefox. (suggestion for mouseover popups for the hyperlink address, just for convenience).
usage notes and release notes are not web links though so I cant see them.

and could there be more details on what all these terms mean (I am going to dive into encore help if I can get it). eg Ti, Te,

another suggestion, drag and drop or preferences ordering of the graphs horizontal ordering .
maybe a glossary of terms.

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

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Fri Dec 23, 2011 9:43 pm

robysue wrote:Two and a half comments about the current version of SH.

1) Once upon a time (SleepyHead 0.6??? or SH 0.7??), SleepyHead reported two different VSI's for the System One machines. Based on my own data, one type is recorded by the machine regardless of whether the machine is running in Auto mode or fixed pressure mode and is NOT recorded as tick marks on the wave flow data in either Encore Pro or SleepyHead; these snores, however, are recorded as ticks in the event table in Encore Pro/Viewer and once upon a time were shown as ticks in the event table in some older version of SH. The other type is recorded only when the machine is set to Auto Mode and does show up as ticks on the wave form in both Encore Pro and SH; these are the snores that the machine actually decides are worthy of pressure increases and perhaps that's why they are not recorded when a PR machine is running in fixed pressure mode.

It would be nice if the current version of SH would show both kinds of VS's in the event table data. I bring this up because the current set up presents a user with wildly different snore numbers if they look at the data in both SH and Encore Viewer/Pro. (The difference in my own snore numbers can differ by an order of magnitude on a bad snoring night.) Moreover, seeing VSI = 0.0 night after night because your machine is running in fixed pressure mode could potentially mislead to new users with fixed pressure machines into thinking that their snoring is under control when it remains very problematic.

1.5) The half-comment: On the PR machines, the Flow Limitation tick marks are recorded only when the machine is running in Auto mode. If the machine is running as a straight CPAP or fixed BiPAP, no FL's are tagged. And hence, what shows up night after night in the data is FL = 0.0, which is misleading both in Encore Viewer and SH. I know I was shocked when I was switched from fixed BiPAP to BiPAP Auto and all of a sudden there were gobs of FL's instead of the FL= 0.0 I'd been seeing for weeks and had been thinking was somehow accurate. Perhaps a note to PR users could be added to the distribution notes that indicates that FL data and SleepyHead's VS data are not recorded when the machine is running in fixed mode.

2) I wish that the Pressure Overview graph tracked the 90% IPAP and EPAP levels as well as the Max IPAP and Min EPAP pressure levels. In my case, the Max IPAP and Min EPAP's are nothing more than the prescribed settings of 8/4 since it is a very, very rare night that I don't hit IPAP = 8cm at some point during the night. And I always start out with EPAP = min EPAP. So the real questions that I'm more interested in are whether the 90% levels are much different than the Max/Min levels. Yes, it makes for busier graph, but it also provides more useful and substantial information.

All good ideas..

Thanks for all the great work JediMark!
1) SleepyHead still records both snores.. One is displayed as the flag lines, the other is displayed as the snore graph.

Thanks for noticing the "pressure" affecting snores don't show up in CPAP mode.. It only just hit me when I went and looked just then.. I've been on straight cpap for a while, and didn't notice the lack of snore flags..

For now I've added VSnore2 back.. (the line was just commented out) Do you think I should try to hide the VSnore2 Event Flags line from displaying in Auto mode? Or will PRS1 users be ok with two separate Snore flags?

VSnore2 also now shows in the Events tree as you requested. (I didn't realize it was missing from there)

1.5) That info is definitely worth showing somewhere in the users guide.. For now, in CPAP mode, I just made it so Flow Limit doesn't display (just the grey box does), and VSnore index shows the VSnore2 index instead. Might lessen the confusion a little

2) Quite possible. I'll see if I can make all that fit..

For the upcoming Beta (coming soon!) I've done a new welcome page, which shows some useful summary stats.. I need to take BIPAP/VPAP/ASV/etc into consideration here too.

_________________
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
jedimark
Posts: 1300
Joined: Fri Feb 18, 2011 12:45 am
Location: Bundaberg, Australia
Contact:

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Fri Dec 23, 2011 9:55 pm

peterg wrote:bug?

even though I put my profile in as APAP mode, the details tab list my correct model as DB DV54D but mode as unknown. (doesnt worry me, if it doesnt affect data).

also I installed git and tried to get hold of the source code, but only got as far as the notes. should it be available to strangers? can I PM you for an email of it?

also I get a crash when I go to the online help page (using your browser) Windows XP (Ill try it on Linux when I get home from holidays). dr watson style crash of the sleepyhead program.

I got the links off the programs welcome page and opened them up into Firefox. (suggestion for mouseover popups for the hyperlink address, just for convenience).
usage notes and release notes are not web links though so I cant see them.

and could there be more details on what all these terms mean (I am going to dive into encore help if I can get it). eg Ti, Te,

another suggestion, drag and drop or preferences ordering of the graphs horizontal ordering .
maybe a glossary of terms.
DeVilbiss support is very new.. it needs quite a bit of testing to get right..

SleepyHead is 100% open and free.. Pull (with a GIT client) fresh from here: git://sleepyhead.git.sourceforge.net/gitroot/sleepyhead/sleepyhead
You need the QtSDK, available free from qt.nokia.com to build it. (The windows version comes with the compiler too, mac's need Xcode)

I've probably missed a DLL for some image format or something, which will likely be causing that crash.

If someone could tell me what Ti, Te are, I certainly could add the popups.. Right now, I have no idea what they mean.. Target Inspiration/Expiration?

You can already drag and drop graph orders... Grab the vertical titles and drag.. It remembers graph orders and sizes when you close and reopen too.

A glossary is being worked on, thanks to Pugsy.. It's now on the SleepyHead Wiki..
http://sourceforge.net/apps/mediawiki/s ... e=Glossary
I'll be adding a link to it in the Help menu..

There's lots of other notes at the wiki too..

Edit: There's also a wiki here..

_________________
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

geopal
Posts: 12
Joined: Mon Aug 18, 2008 3:17 am

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by geopal » Sat Dec 24, 2011 6:20 am

Hello all! Is there a way to print my PR ONE report from SleepyHead, in the same format like Encore Pro was printing them?

_________________
MaskHumidifier

SleepyToo2
Posts: 1005
Joined: Sun Sep 11, 2011 7:55 am
Location: North of Philadelphia, PA

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by SleepyToo2 » Sat Dec 24, 2011 9:10 am

From the release notes from the latest version (0.8.
"Rewritten Print Support. Can now print reports in Daily View, Overview and Oximetry. You can hide graphs you don't want to print."
My understanding (as a simple user, not the programmer!) is that there is no way to print multiple days at once - you would have to do that manually. For the overview, select the date range you want to include, then click the print button at the bottom right of that page.

_________________
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Additional Comments: Use SleepyHead software.
Not a medical professional - just a patient who has done a lot of reading

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

Re: SleepyHead 0.8.8 "Almost Beta" Release

Post by jedimark » Sat Dec 24, 2011 7:22 pm

geopal wrote:Hello all! Is there a way to print my PR ONE report from SleepyHead, in the same format like Encore Pro was printing them?
SleepyHead isn't being designed as an Encore clone.. It's being designed to surpass it and leave it in the dust..

If there's any information missing in particular from these reports you need, please let me know and I'll see what I can do to add it..

Copying their reports verbatim, making SleepyHead pretend to be Encore could leave me in very hot water on multiple counts..

_________________
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