Thanks for replying, Yuki.
quote:
Originally posted by yuki_wu
Could you show me your data? It will help me to understand your question fully.
I'll demonstrate:
1) Fill the first column with 1 to 100. Set the second as Gauss(Col(1),0,43.5,15,1)
2) Use
pkFind iy:=col(2) smooth:=5 method:=first ocenter:=Col(3) ocenter_x:=Col(4)
The reported center index is 44 as is the center in this case.
The problem is that the Savitzky-Golay method is supposed to interpolate to get the zero-crossings. If instead of the above X-function, I use
differentiate iy:=Col(2) order:=1 smooth:=1 poly:=2 npts:=5 oy:=Col(3);
dataset xset=Col(1)[30:60], dyset=Col(3)[30:60];
xset(0,dyset)=
Then I get 43.5, which is what's specified. The problem is that I had to artificially limit the dataset to avoid the ends. Also, if there were more than one peak, this code wouldn't return all the zero-crossings (peak locations).
I was hoping pkFind would include some kind of algorithm to address these issues. However, the pkFind function seems to operate in a non-standard manner. Is there some easy way to make Origin interpolate the peak locations?