06-25-2012 08:40 PM - edited 06-25-2012 08:44 PM
I have a dataset, and I need it to have a specific number of data points (for comparison purposes, with other datasets). Naturally, I think to use interpolation. 1D linear interpolation works ok, but it isn't as smooth as I'd like, so I thought I'd try spline interpolation.
But see the attached VI (my dataset, the Raman spectra of Paracetemol [counts vs. wavelength in wavenumbers] should be initialized - just hit play to see what I mean). Why does it introduce so much noise? Is there some silly thing I'm doing? Been banging my head agaqinst the keyboard all day, I don't see the problem. Thank you so much for any help...
06-25-2012 08:42 PM
Here's the 2010 version for those who may not have 2011. Also, a picture of the VI
06-26-2012 04:20 AM
why do you interleave the original and interpolated array? If you feed your "Interpolates" array into a graph you will see it looks alright.
Looking at the graphical representation of the original and interpolated array will also show you why piecing them together the way you do leads to the noisy look in "after"
Just create the array of interpolates with the number of elements you desire an use that.
Best regards Florian
06-26-2012 11:16 AM - edited 06-26-2012 11:18 AM
I see what you're saying. But the whole point isn't to have a graph of interpolates, it's to have a graph with more points than the original. I'll look into integrating them more intelligently; or perhaps just build a bigger plot of interpolates (maybe easier?).
edit: hah, yes, I just increased the number of interpolates to Y_array_size+length difference. I don't have to bother with integrating the two which is complicated and error prone.
Thanks for helping me see the solution.