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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract high values from graph "PART 2"

Solved!
Go to solution

This question builds from the post found here.  

 

In th attached VI, how to correctly set the threshold so that all the "spikes" can be displayed in the "Spur List"? I should get 3 points in the Spur List.

 

Thanks,

hiNi 

0 Kudos
Message 1 of 13
(3,213 Views)

Would it be easier if we compare adjacent y-axis values?  If so, if the adjacent y-axis values are beyond a certain threshold, then that will be a "spike"?

0 Kudos
Message 2 of 13
(3,133 Views)

Try subtracting out a cubic spline fit before you do your thesholding.

Also, your VI has some Rube Goldberg in how you convert your number array to string and then back to number.

0 Kudos
Message 3 of 13
(3,122 Views)

Hello,

 

I have looked at the examples but not found anything for the Cubic Spline Fit.  Can you assist me in getting your idea to work?

 

Thanks,

hiNi

0 Kudos
Message 4 of 13
(3,087 Views)

Hello,

 

I have included the Cubic Spline in the attached VI but not sure how to implement it.  Any help will be greatly appreciated!

 

Thanks,

hiNi

0 Kudos
Message 5 of 13
(3,069 Views)

You're nearly there.

Subtract the Cubic Spline Fit from your actual data. You'll be left with a mostly flat dataset with just your spurs sticking out.

With that flattened dataset, you can perform a simple threshold to extract your peaks.

 

(i.e. don't worry about taking the threshold of your cubic spline fit. That doesn't tell you anything. Do take the threshold of [Your Data Minus Cubic Spline] to get your spurs. I have no idea why you're deleting your first spur.)

 

EDIT: Also you can expand out your Index Array to pull both the first and second columns. No need to have 2 Index Array functions.

Message 6 of 13
(3,056 Views)

In this updated data set, is it possible to "smooth out" the data from x = 1000 to x = ~30000 a little more?

 

The peaks and troughs are a bit much and may skew some of the data catpured from other runs that may result in errenous spike numbers?

Download All
0 Kudos
Message 7 of 13
(3,033 Views)

It's possible.

You'll need to experiment a bit with the fit parameters.

 

What is the source of your actual data? Do you expect it to follow a theoretical model of some sort? If so, you could fit to the theoretical model and probably end up with a much better initial background fit.

 

EDIT: You could always brute force it and run it through another pass of background substitution.

Message 8 of 13
(3,025 Views)

The source of the data is from an insturment that measures phase noise.  The noise plot will vary depending on the circuit being tested.  The data does generally follow the plot like that shown though.

 

Please clarify your statement of "another pass"...I am not sure what you mean.

 

Thanks.

0 Kudos
Message 9 of 13
(3,021 Views)

By "another pass", I mean do another spline fit of your original data - your original spline. Subtract that spline out again to flatten out your data.

Message 10 of 13
(2,980 Views)