
Wave scaling & timeseries: Calculations on two waves of different scales

jcor
I have two instruments, one reporting in 7s intervals, the other reporting in 10s intervals.
I want take the ratio of the two signals.
I want to graph the result point-by-point.
In the past (Python/SciPy) I've achieved this by interpolating each signal to 1s, performing my calculations, then graphing every seventh point of the result. (By passing a list of 7-spaced integers as an "index".)
Is there a nice way to use the Scaling feature of igor to avoid this interpolation? I've gotten halfway with
// [...] load 7s data as w7, load 10s data as w10 [...] Make/N=(numpnts(w7)) new_wave = w7[p] / w10(w7[p])
Which I think is a great way to be able to do it, but unfortunately, it's terrible for graphically comparing new_wave and w10 (which I do something else to later). Abandon and interpolate?
Well, hopefully you mean abandon the idea of only considering every 70 s point, not abandon Igor Pro :-)
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
November 16, 2009 at 01:57 pm - Permalink
The spikes are where the denominator is close to zero.
The command:
waveRatio = wave1000(x) / wave700(x)
calculates 1000 ratios, one for each point in the destination wave. During each calculation, the function x returns the value of the point in the destination being evaluated. The use of (x) syntax makes Igor interpolate in the source waves.
The range of x is determined by the X scaling of the destination wave.
November 16, 2009 at 04:16 pm - Permalink
DisplayHelpTopic "Waveform Arithmetic and Assignment"
November 16, 2009 at 04:18 pm - Permalink
In my understanding, the following should then work:
This doesn't work because the resulting x axis starts at 0, when it should start at 5.
It does, however, only plot 10 points (since w2 has 10), which is nice. Am I missing a detail, or must the axis be set manually?
(up to this point, Igor does a good job simplifying my data analysis - so no, I'm not about to abandon it ;)
November 19, 2009 at 06:38 am - Permalink
By doing this:
Display w1 vs w2
You are telling Igor to plot values from w1 using corresponding values from w2 as the X values. You are telling Igor to ignore the X scaling on w1 when making the graph.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
November 19, 2009 at 01:04 pm - Permalink
November 20, 2009 at 02:38 pm - Permalink