Apnea Board Forum - CPAP | Sleep Apnea
Custom user events / interpretation - 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: Custom user events / interpretation (/Thread-Custom-user-events-interpretation)

Pages: 1 2


Custom user events / interpretation - permabear - 01-30-2022

I'm very interested in the use of Custom CPAP User Event Flagging. However, whenever I raise the Flow restriction %, the number of flagged events increases. Does this make sense? I'd expect to score a lower event number at higher restriction %.

How should the flow restriction % be interpretated? It seems to work the other way around and I'm a bit lost here.

Thanks for helping me out.


RE: Custom user events / interpretation - pholynyk - 01-30-2022

It's just the opposite... When you set flow restriction to 80%, SleepyHead, and therefore OSCAR, interprets that as flow restricted to 80% of normal... not much restriction at all, really....not 'restricted by 80%'

I'm not sure if we should address the confusion by re-wording the descriptive text - easy --- or by changing the code - harder, and affects current users of User Flags...


RE: Custom user events / interpretation - permabear - 01-30-2022

Thank you pholynyk, this helps!
And speaking for myself, a descriptive text would do (i.e. in the Oscar Wiki).
Have a nice day!


RE: Custom user events / interpretation - Gideon - 01-30-2022

I've always thought of it as flow percentage so the lower number the worse it is.


RE: Custom user events / interpretation - pholynyk - 01-30-2022

Interesting, Gideon. I remember being confused when I first used the User Flags, as I had permabear's concept.
Yours is a good (better?) way to think about it, so perhaps some clarification in a tool tip would be in order.


RE: Custom user events / interpretation - permabear - 01-30-2022

Another question if that's okay. If I define Flag 1 as 70% / 8,0 sec and Flag 2 as 70% / 6,0 sec I witness lower Flag 2 events reported compared to Flag 1.

I interpret 6 sec as '6 seconds and more' so I'd expect the number of 8 sec events (Flag 1) to be included in the number of 6 sec events (Flag 2). So in my mind Flag 2 should be higher than Flag 1. 
Where do I go wrong?

Thanks again for elaborating!


RE: Custom user events / interpretation - Gideon - 01-30-2022

My thought, years ago when I was playing with it, on SH pre-OSCAR that it. I never saw correspondence with OA and H events, at least not a strong one.
I thought it MIGHT be excluding OA and H events, since they were covered elsewhere, Phil, what does the code say about flagging these events?


RE: Custom user events / interpretation - pholynyk - 01-30-2022

I'm not sure. The ResMed loader doesn't do anything about User Flags. They must be detected in the calculation or analysis routines, so I'll have to look into those.


RE: Custom user events / interpretation - pholynyk - 01-30-2022

OK, in the calc files there is a class called FlowParser which has the routine flagUserEvents. That routine does its thing and finds events, but as its last thing, it checks a user Preference flag called allowDuplicates. If duplicates are not allowed, then a scan of existing events is made to see if this potential event falls within another event. If duplicates are allowed, or there is no previous event, then this new event is added to the list.

Long story short, if duplicates are not allowed, and UF1 has a longer duration than UF2 (with the same restriction), then - because UF1 is checked before UF2 - the potential UF2 events which fall within a UF1 event will be ignored, and only the UF2 events longer than the UF2 duration but shorter than the UF1 duration will be flagged. This may be unexpected, but I think is the most useful case. If you wish the 'covered' UF2 flags to be counted, then you can change the flag in the Preferences window and purge and reload the data.

'Nuff said ?

Nope. As Geer1 points out below, the Preferences item no longer shows up. Duplicates (shadowed) are never counted.


RE: Custom user events / interpretation - Geer1 - 01-30-2022

Back when I first set user flags it made sense to me (20% being less flow than 50%) although I just set them that way based on someone's recommendation and not thinking about it. Now that I know the definition of an apnea is 90% flow reduction and hypopnea is 50% flow reduction it doesn't make as much sense although like you say can be a wording thing and explained in the disclaimer easily enough.

The main issue with the calculations are that they are inconsistent which is one reason I stopped paying attention to mine. It wasn't that uncommon for me to see more 20% events to be flagged than 50% events. I just tried playing with the 6 vs 8 second durations (both at 50%) and see inconsistent results, some nights 8 is higher as expected, other nights 6 is higher.

As Gideon notes you never see these user flags where apnea are flagged and upon closer inspection you never see multiple user flags for the same event. Obviously the code tries to avoid flagging events with multiple flags. I assume it is that part of the code that is making these results confusing.

Edit: I see you found what I presumed to be the issue.