On Sun, 25 Nov 2007, Angus McMorland wrote:
> If you change exp -> nx.exp in your definition of gauss1d, all works okay.
Angus,
Yes, it works just fine. By adjusting the value of the fwhm parameter I
can produce the curves we need for both display and printing.
Now I can spend some time
On Sun, 25 Nov 2007, Angus McMorland wrote:
> As I suspected, this is a parameter issue- in this case caused by your use
> of the ath module routines which require scalar input, rather than numpy's
> (or matplotlib's numerix's) array-friendly versions. If you change exp ->
> nx.exp in your definit
On 25/11/2007, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Sun, 25 Nov 2007, Angus McMorland wrote:
>
> > I'm not completely sure, but I suspect that this is an implementation bug,
> > rather than a version bug, particularly because the line in question isn't
> > involving matplotlib at all. If yo
On Nov 24, 2007 4:17 PM, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Sun, 25 Nov 2007, Angus McMorland wrote:
> > I've found it easiest to solve these sorts of bugs by running the code in
> > an ipython shell, with automatic pdb calling. That way you can inspect the
> > values of the parameters i
On Sun, 25 Nov 2007, Angus McMorland wrote:
> I'm not completely sure, but I suspect that this is an implementation bug,
> rather than a version bug, particularly because the line in question isn't
> involving matplotlib at all. If you post the relevant code
> (normal-curve.py, by the looks of thi
On 25/11/2007, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Sat, 24 Nov 2007, Angus McMorland wrote:
>
> > Great. Hopefully this correction will make things even more clear.
>
>While the functions and equations are now clear, I get an error that was
> present in matplotlib-0.87, but which shoul
On Sat, 24 Nov 2007, Angus McMorland wrote:
> Great. Hopefully this correction will make things even more clear.
While the functions and equations are now clear, I get an error that was
present in matplotlib-0.87, but which should be fixed in -0.90.1:
Traceback (most recent call last):
Fil
On Sat, 24 Nov 2007, Angus McMorland wrote:
> Looking at my reply, I realised this was rubbish - sorry about that. The
> fwhm is the difference between the two values of x that give Y = 0.5.
Now that makes much more sense. Having control over the x values for the
inflection point allows us to
On 24/11/2007, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Sat, 24 Nov 2007, Angus McMorland wrote:
>
> > fwhm is the full-width at half the maximum height, i.e. it's the
> > difference between the two values of x when:
> >
> > |r - c| = 0.5
Looking at my reply, I realised this was rubbish - sorr
On Sat, 24 Nov 2007, Angus McMorland wrote:
> fwhm is the full-width at half the maximum height, i.e. it's the
> difference between the two values of x when:
>
> |r - c| = 0.5
Angus,
The additional explanation helps a lot.
> The fwhm is a shape parameter (like std dev) - it determines the wi
On 24/11/2007, Rich Shepard <[EMAIL PROTECTED]> wrote:
> On Fri, 23 Nov 2007, Angus McMorland wrote:
>
> > For parsimony, I think you're probably best off just using the Gaussian
> > equation:
> >
> > def fwhm2k(fwhm):
> >'''converts fwhm value to k (see above)'''
> >return fwhm/(2 * n.sqrt
On Thu, 22 Nov 2007, Rich Shepard wrote:
>> For parsimony, I think you're probably best off just using the
>> Gaussian equation:
>>
>> def fwhm2k(fwhm):
>>'''converts fwhm value to k (see above)'''
>>return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
>>
>> def gauss1d(r, fwhm, c):
>>'''returns th
On Fri, 23 Nov 2007, Jeff Whitaker wrote:
> Rich: The tails of a Gaussian never reach zero - they just asymptote to zero
> for large x.
Jeff,
For all practical purposes, that's fine. Usually any y value > 0.20 (the
default) is considered functionally equivalent to zero. If the display looks
Rich Shepard wrote:
> On Fri, 23 Nov 2007, Angus McMorland wrote:
>
>
>> For parsimony, I think you're probably best off just using the
>> Gaussian equation:
>>
>> def fwhm2k(fwhm):
>>'''converts fwhm value to k (see above)'''
>>return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
>>
>> def gauss1d(r
On Fri, 23 Nov 2007, Angus McMorland wrote:
> For parsimony, I think you're probably best off just using the
> Gaussian equation:
>
> def fwhm2k(fwhm):
>'''converts fwhm value to k (see above)'''
>return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
>
> def gauss1d(r, fwhm, c):
>'''returns the 1d g
On 23/11/2007, Rich Shepard <[EMAIL PROTECTED]> wrote:
>Now I need to plot normal curves (a.k.a. Gaussian or bell curves,
> depending on the background of the speaker/writer). I see that SciPy has a
> class for the normal curve in its stats package, and that the curve shape is
> defined by the
I see that I've been immortalized on the SciPy MatPlotLib Cookbook web
page for my enquiry on plotting S- and Z-curves. The Boltzman function
serves very well for that purpose, and I've tweaked the example code to
allow me to pass in the two endpoints and the midpoint for each of these
curves.
17 matches
Mail list logo