Re: [Numpy-discussion] Upper and lower envelopes

2008-09-30 Thread David Huard
On Tue, Sep 30, 2008 at 4:37 PM, Anne Archibald <[EMAIL PROTECTED]>wrote: > 2008/9/30 bevan <[EMAIL PROTECTED]>: > > Hello, > > > > I have some XY data. I would like to generate the equations for an upper > and > > lower envelope that excludes a percentage of the data points. > > > > I would like

Re: [Numpy-discussion] Upper and lower envelopes

2008-09-30 Thread Bevan
Anne Archibald gmail.com> writes: > > 2008/9/30 bevan gmail.com>: > > Hello, > > > > I have some XY data. I would like to generate the equations for an upper and > > lower envelope that excludes a percentage of the data points. > > > > I would like to define the slope of the envelope line (sa

Re: [Numpy-discussion] Upper and lower envelopes

2008-09-30 Thread Anne Archibald
2008/9/30 bevan <[EMAIL PROTECTED]>: > Hello, > > I have some XY data. I would like to generate the equations for an upper and > lower envelope that excludes a percentage of the data points. > > I would like to define the slope of the envelope line (say 3) and then have my > code find the intercep

Re: [Numpy-discussion] Upper and lower envelopes

2008-09-30 Thread David Huard
Bevan, You can estimate the intercept and slope using least-squares (scipy.optimize.leastsq). Make sure though that errors in X are small compared to errors in Y, otherwise, your slope will be underestimated. Using the slope, you can write a function lower(b,a, X,Y) that will compute y=aX+b and r

[Numpy-discussion] Upper and lower envelopes

2008-09-30 Thread bevan
Hello, I have some XY data. I would like to generate the equations for an upper and lower envelope that excludes a percentage of the data points. I would like to define the slope of the envelope line (say 3) and then have my code find the intercept that fits my requirements (say 5% of data below