LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to load correction factor onto raw data trace

Solved!
Go to solution

Hi Guys I am struggling putting a correction factor onto current raw data trace when developing RF test software. I was using Agilent E4440 PSA, PSA screenshot.gif was the screen that I was working as a example. so right now I can get this raw data trace from instrument displaying in my graph successfully with some other returning parameters such as start and stop frequency, frequency increment rate etc. (see output1.png). at the same time I have second trace representing correction factor that I want to add onto the raw data trace. (see output2.png). my question is how can I add them together to get a final corrected plot in graph within 30-300MHz ? because they are different in size and frequency so I can't simply add them up. 

any ideas are welcome, no need specific code, thanks!

output1.png is from 30MHz to 300MHz, 601 elements

output2.png is from 10MHz to 6GHz, 16 elementsPSA screenshot.gif

PSA Screenshot

 


output1.png

Output1

 

 

 

output2.png

Output2

0 Kudos
Message 1 of 3
(2,677 Views)
Solution
Accepted by topic author choudad

Here are my thoughts off the bat:

 

1. Take your raw waveform data and determine the number of samples in that array

2. Take your 1D correction factor array and resample it (with interpolation) such that it has the same number of samples as your waveform data

3. Take your equal-sized arrays and use LabVIEW math primitives to multiply / add them. If the raw data is waveform data, just pull the Y component for this operation before rebundling at the end.

 

Note: make sure you're converting between a multiplicative factor and the dB scale on step 3 if you haven't already

 

For the resampleingpart, I'd look at a function like this:

 

Resample Waveforms (continuous) VI

 
I don't think it'll do exactly what you're looking for out of the box, but you might be able to get something to work if you massage the datatypes. 
 
Hope this helps
 
Sam R.
Message 2 of 3
(2,632 Views)

Hi Sam thank you very much for you reply. I thought I would got no reply until NI sent me a notification. your thought are exactly how I fix this problem after I get to know from one of youtube tutorials that there are bunch of interpolation VI that I can use in mathematics pallete, what I was struggling before is just I was trying to do interpolation algorithm myself and ended up out of my capability. I used interpolation 1D arry VI resampled correction factor 1D array, so I have equal sized two arrays to be sum up now. good to know there is a resample VI as well in signal process pallete maybe I will need to use it in the future. cheers

0 Kudos
Message 3 of 3
(2,615 Views)