comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Minimum and location of minimum through interpolation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Minimum and location of minimum through interpolation [message #79150 is a reply to message #79066] Mon, 30 January 2012 13:18 Go to previous message
Russell[1] is currently offline  Russell[1]
Messages: 101
Registered: August 2011
Senior Member
On Jan 30, 10:26 am, Craig Markwardt <craig.markwa...@gmail.com>
wrote:
> On Jan 30, 3:33 am, Els <elias.rous...@gmail.com> wrote:
>
>> Here is where the problem are:
>
>> Due to undersampling, the actual minimum standard deviation may occur between two x-values, so I want to determine this through interpolation. That is not so difficult, but one additional problem is that "x" is an angle, so I can have jumps from 360 deg to 0 deg. If the mimimum is around eg. 358 deg and I have undersampling, interpolation may give me a result of ~180 deg, which is obviously wrong.
>
> You could try unwrapping your series first, for example by using
> PHUNWRAP, and then doing your minimum-finding procedure with the
> modified series.
>
> Craig
>
> http://www.physics.wisc.edu/~craigm/idl/math.html#PHUNWRAP

You could take the derivative of the std.dev. with respect to x and
find the points where ds/dx = 0. Obviously, that'll never happen (for
the undersampling issue you said), so instead interpolate that:

dsdx = deriv(x,std)
minx = interpol(x,dsdx,0.0)

Now, the catch is since there might be multiple extrema, you'll need
to be careful with this, but shouldn't be too hard. You just need to
find the points where the sign goes from negative to positive. If
your sample is smallish (say <10000), then you can probably do this by
a brute force search, and compare the sign of successive elements.
Every time you find a sign flip (in the right sense to avoid local
maxima), then log it. Next loop over the minima and do the above 2
lines.

Russell
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Fill the under of a x-y plot
Next Topic: NG Window Size

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:05:24 PDT 2025

Total time taken to generate the page: 0.01365 seconds