From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I determine if data lies between two experimentally determined curves?

Solved!
Go to solution

I have a preset low and a high boundary acceptance curves for my data, defined by x and y values. They were experimentally derived curves, so are not a formula. I have roughly 200 points mapping each curve. 

 

When I collect data from a new experiment, I want to verify in a script whether or not the new data is between those two curves. The x values are from my experiment, and as such are not monotonic. Each experiment generates between 700 - 900 data points. 

 

How can I map or interpolate this data so that I can confirm with a script whether or not the new data is within the boundaries? I tried using linear mapping to map all three curves (lower, upper, and experimental data) to the same x-values, but since my experimental data's x-values are not monotonic I am unable to do so. 

0 Kudos
Message 1 of 5
(3,236 Views)

Hello jordyjordyjordy,

It is necessary to have the same time base to compare the data. For this you have two options: mapping the boundary curves to the time base of the measured data or mapping the measured data to the boundary time base. Attached you find an example script.

Greetings

Walter

0 Kudos
Message 2 of 5
(3,180 Views)

Hi Walter_Rick - neither of those methods work because my x-channel for my data is not monotonic increasing. It is distance values taken at a certain frequency. 

0 Kudos
Message 3 of 5
(3,161 Views)
Solution
Accepted by topic author jordyjordyjordy

Hi jordyjordyjordy,

in this case you can sort the data before you analyze it.

You can create an index channel to be able to come back to the original order. Then sort the data, analyze them, sort the data again and delete the temporary index channel. I attached an example.

Greetings

Walter

Message 4 of 5
(3,150 Views)

Thank you! This worked.

0 Kudos
Message 5 of 5
(3,117 Views)