Apnea Board Forum - CPAP | Sleep Apnea
Synchronize CPAP and Oximeter Data - FEATURE REQUEST - 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: Synchronize CPAP and Oximeter Data - FEATURE REQUEST (/Thread-Synchronize-CPAP-and-Oximeter-Data-FEATURE-REQUEST)

Pages: 1 2


Synchronize CPAP and Oximeter Data - FEATURE REQUEST - SleepyTimeTime - 01-27-2020

I'm trying to synchronize three sets of time series data:
1. OSCAR CPAP data (ResMed AirSense 10)
2. Contec CMS-50F pulse oximeter
3. SnoreLab audio recording

I start the CPAP and Contec at the same instant, but, after I import the oximeter data into OSCAR, the oximeter data is 27 seconds behind the CPAP data.

Is there any way to "slide" one data series forward or backward in time after importing it into OSCAR?

In the "Audacity" audio editing program there is a feature that allows you to "slide" one audio track to synch it to another. It's a very handy feature. It sure would be nice to have this capability in OSCAR.

I've set the clocks on the CPAP and the Oximeter manually, but they are both very crude at time-setting. You have to wait until the minute changes and then set the time. It sure would be nice if all of these devices would synch to a network time server using NTP. It's just silly in 2020 to have to push a button to synch time.

I see I am able to make start time adjustments to the Oximeter time series data when I import it, but I don't know how far off the oximeter time series is compared to the CPAP time series in advance of importing. So I don't see a way to enter the time adjustment in advance. How do people use this time adjustment on importing oximeter data?

I've attached a screen cap showing my CPAP and oximeter data where can see the oximeter data stream starts 27 seconds after the CPAP data stream. Last night I started the CPAP and oximeter simultaneously, so I assume this discrepancy is due to clock differences. (Maybe getting this close is good enough for this type of analytical work?) On the strip charts, I generally see my SpO2 starting to decrease about 60 seconds after the onset of an apnea period. Some of this 60 seconds is blood flow lag to the fingertip and some is due to the time offset of the oximeter vs CPAP data. 

Lastly, I use the audio recording from SnoreLab to hear what I'm doing during sleep. I'm able to visually (manually) synch SnoreLab in playback to the graphs in OSCAR. I can nicely tie my motion during sleep to arousals and apneas.


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - sawinglogz - 01-27-2020

The oximetry wizard needs a lot of work. It's on the longer-term list that may not make the next release of OSCAR.

It would also be nice to adjust the times of different machines on a day-by-day basis, but that's an even bigger undertaking. Among other questions: should adjustments apply only to that day? Or should OSCAR interpolate adjustments on days between manual adjustments? Is there a way to automatically perform this adjustment, such as recognizing when a device's clock has been adjusted (by cellular modem, user, or by OSCAR)? etc...


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - SleepyTimeTime - 01-29-2020

Wow...lots of difficult design decisions on something as simple as synching time between two devices.

Today I used the time adjustment feature on the Oximeter import page. As long as I write down the CPAP start time, I can set the Oximeter to that. It worked fine.

I tried using the option to set the oximeter start to the CPAP start, but it kept changing the Oximeter time to the end-time of the CPAP run. That was weird.


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - johnnyb00 - 03-13-2021

Just want to chime in and say that I think it would be great to be able to slide the time scale for spo2 and pulse as well.
Even when I make sure all the clocks are good, when it imports (Viatom Data) the spo2 gets shifted right by a good amount.
You could have a marker on the graph that says "Time Shifted" whenever it's altered, and/or you could just not save it and have it revert to how it originally imported when Oscar is restarted.

John


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - GuyScharf - 03-13-2021

When I want a precise alignment between oximeter and OSCAR, I do a two-step process: Import the oximeter data, determine how much I want to shift the time, purge the oximeter data, import again and adjust the start time by the amount it needs to be shifted.


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - johnnyb00 - 03-14-2021

Thanks very much for the feedback Guy. I'm sure I'm ignoring something basic, but when I import Viatom data I'm only given a choice of which file to import. I don't see a way of adjusting start time. Is that done through a different menu?

John


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - Crimson Nape - 03-14-2021

For a better synced time, a little trick that you can do with the Viatom/Wellue devices is to import your CPAP data first.  After importing its data, look at the starting time listed.   The Viatom/Wellue data files list their starting time in the file name.  

Example: 20210111230252 will break down as: year=2021 (20210111230252), month=01 (20210111230252), day=11 (20210111230252), time=23:02:52 (20210111230252)

If you rename this file to match the starting time of the CPAP, your data should sync up closer.  One caveat, if you have multiple sessions for the same night, then it gets a little more involved.  You will need to determine the time difference between the first file and the CPAP's time.  Using this difference you will need to use this difference when renaming the other files.  Just keep in mind that you need to remember whether it's add or subtract.

EDIT:
What I posted was wrong.  In fact, the Wellue/Viatom data files do have their start time located at the offset of 0x06 through 0x08.  You will need to use a Hex editor to modify this.  - My Bad!


I hope this may help.

-Red


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - GuyScharf - 03-14-2021

(03-14-2021, 09:18 AM)johnnyb00 Wrote: Thanks very much for the feedback Guy. I'm sure I'm ignoring something basic, but when I import Viatom data I'm only given a choice of which file to import. I don't see a way of adjusting start time. Is that done through a different menu?

I missed that you were using Viatom. My technique works with the oximetry wizard and importing Contec data.


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - johnnyb00 - 03-15-2021

Thanks a ton for the info Red. No problem Guy.

I tried renaming the file and re-imported after deleting current day's oxymetry data, but it starts about 30 minutes after the cpap data again. This is a consistent offset I'm seeing across multiple days. Last night's cpap start was 20:48:18 and O2 file was named ...21:19:10.

John


RE: Synchronize CPAP and Oximeter Data - FEATURE REQUEST - Crimson Nape - 03-15-2021

Since you have a Dreamstation and its time is factory set, I see where syncing can be a problem. Are you saying that your CPAP shows a 20:48:18 start time and setting the O2's filename to the 204818 time still produces a 30-minute delta? Assuming it was last night's data the complete filename would be, 20210314204818.