Apnea Board Forum - CPAP | Sleep Apnea
Possible OCAR binary file parsing anomalies - 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: Possible OCAR binary file parsing anomalies (/Thread-Possible-OCAR-binary-file-parsing-anomalies)



Possible OCAR binary file parsing anomalies - darral.freund - 06-10-2022

Hello,  I’m not sure this is a major problem in the grand scheme, but I thought I would let you know an issue I’m having.  

I’m using OSCAR 1.3.1 reading data from a Respironics Dreamstation Auto CPAP.  

First, it seems that in the “Statistics” section of the “Details” pane, the numbers for “Insp. Time” and “Exp. Time” are reversed…  When I average individual inspirations and expirations from analysis of the breathing waveform, the times seem more consistent when the summary averages are reversed.  Just something to check.  Also for me expirations are longer than inspirations, but the summary statistics show otherwise.

Second, on days where “breathing not detected” events are present, the Session start and end times reported in the “Events” tab are incorrect  It also appears that the flow rate graph in the daily tab has times that are offset.

I’m attaching one file with further discussion with embedded graphics.

I tried to attach the binary files, but the was unsuccessful.  I you want the binary files, please let me know and I can email them.

Thanks,

Darral Freund


RE: Possible OCAR binary file parsing anomalies - sawinglogz - 06-11-2022

Interesting. Please send us a zip of your SD card to:

https://www.dropbox.com/request/REp6AH7LCGyeOcXfOokH

I’ll take a look at what’s going on.


RE: Possible OCAR binary file parsing anomalies - darral.freund - 06-11-2022

Thanks,

I just uploaded the zip file.

Darral


RE: Possible OCAR binary file parsing anomalies - darral.freund - 06-11-2022

Hello,

I took another look at the channels  hex 0x110A'  dec 4362 (expiration times / offsets) and hex '0x110B' d 4363 (inspiration times / offsets) in the Oscar .001 data file.

The set of time offsets for these two channels are identical.  In my data, the 4363 inspiration times correlate best to my inspiration times (derived from my analysis of the breathing waveform), and the 4362 times correlate to my expiration times.  

So, I’m thinking that channels are input and stored correctly in OSCAR, but are displayed reversed…  This was also the case with Sleepyhead.

Interestingly, it appears that the offsets are TRUNCATED to the nearest 0.2s,  corresponding to the quantizing value for the 5Hz waveform data.  The inspiration / expiration times are either truncated or rounded (I need to look at this more, but my initial looks points to truncation).  Unfortunately, this slightly biases the statistics but probably not enough to make a big difference.  

I haven’t really paid any attention to the machine generated data, but my look at this in the future to see how it might help my efforts.

Thanks,

Darral


RE: Possible OCAR binary file parsing anomalies - sawinglogz - 06-14-2022

Phew, there are a lot of observations, and I might have missed one, but here goes:

Quote:First, it seems that in the “Statistics” section of the “Details” pane, the numbers for “Insp. Time” and “Exp. Time” are reversed… Also for me expirations are longer than inspirations, but the summary statistics show otherwise.
The "Statistics" pane is consistent with OSCAR's graphs of those channels. (For example, your May 26 sample graph for Ti is ~2.0 and for Te a little over 1.0; the Statistics pane says 2.0 median Ti and 1.3 median Te.)

That said, they may indeed be reversed. PRS1 machines don't report Ti and Te (Resmed does), so OSCAR inherits SleepyHead's old algorithm for deriving Ti and Te from flow rate. I don't trust that algorithm to be accurate, but at least one clinician finds the graphs useful even in their current state, so we haven't removed them.

Quote:Second, on days where “breathing not detected” events are present, the Session start and end times reported in the “Events” tab are incorrect
That's not related to BND, it's related to your use of an oximeter and the presence of two CPAP sessions (ignoring the BND). On your March 6 sample, look at the session times at the bottom of "Details". There are 2 PRS1 sessions, the first including the BND, then the second after the machine was restarted for the rest of the night. Then your oximeter has a single session for the entire night.

The issue is that the Session Start/End times in the "Events" tab appear to be sorted, losing the connection between a given start and end. So you're seeing CPAP session 1 start, Oximeter start, CPAP session 2 start in "Session Start Times", then CPAP session 1 start, CPAP session 2 end, Oximeter end in "Session End Times".

As another example of BND being unrelated to sessions, see your May 26 sample. The BND is in the middle of session 1 (#1867). Session 2 (#1868) doesn't start until about 2 hours after that. You can toggle off the second session to see the BND present in the first session.

Quote:It also appears that the flow rate graph in the daily tab has times that are offset.
This is a separate issue, also unrelated to BND. It looks like the legend underneath the graphs is an hour off, probably due to DST. (It's off on March 6, but not May 26.) The times in the left pane (Details and Events) are consistent, as is the label at the bottom of the graph panel showing the current cursor position.

Quote:Interestingly, it appears that the offsets are TRUNCATED to the nearest 0.2s,  corresponding to the quantizing value for the 5Hz waveform data.  The inspiration / expiration times are either truncated or rounded (I need to look at this more, but my initial looks points to truncation).
Since these are derived from flow samples, they'll inherently be 1 less sample than the flow. (You can only derive slope between samples.)


RE: Possible OCAR binary file parsing anomalies - darral.freund - 06-15-2022

Thanks so much for looking at this.  I'll take a close look at everything you said.