massimo sandal | 1 Jun 12:55
Picon
Favicon

Re: SciPy Journal

Robert Kern ha scritto:
> massimo sandal wrote:
> 
>> Same here. The problem is, will someone publish it? Will it gain
>> academic respectability? An academic journal revolving around a single
>> software library seems very odd to me -is there a, let's say, "GLIBC
>> Journal" somewhere? Maybe that's just me being ignorant.
> 
> Look at the "Journal of Statistical Software". Its name might as well be the
> "Journal of R".
> 
>   http://www.jstatsoft.org/

LOL.
Still, I don't feel convinced it's a worthwile idea (J.Stat.Softw. 
doesn't look like one, either). However, if you want to do it, well, do 
it. :) It can also be possible I'll contribute to it in the future, if 
you take into consideration entries about software that uses SciPy. I'd 
also broaden the scope to take into account NumPy, Matplotlib and in 
general all science things doing Python. Another interesting requirement 
could be that algorithms, software etc. presented must show at least one 
open-source (as defined by OSI) implementation.

The only thing I am really worried is the requirement of an article 
along with documentation for inclusion of code into SciPy. This can have 
drawbacks.

m.

--

-- 
(Continue reading)

Anne Archibald | 1 Jun 22:57
Picon

hyp2f1 - bad performance for some values of the argument

On 30/05/07, Anne Archibald <peridot.faceted <at> gmail.com> wrote:

> So this is not generally useful, but I have cured my problem through
> an application of one of the "quadratic transformations" (equation
> 15.3.32 in Abramowitz & Stegun - which is online!). It gives me
> accuracies on the order of one part in 10^13, not as good as I was
> hoping but better than the 1 in 10^8 I was getting from the averaging
> shortcut. Good enough to get positive definite matrices out of it
> anyway.

Perhaps I spoke too soon.

It appears that scipy evaluates hyp2f1 very slowly for certain values
of the argument:

In [92]: x=0.1; n=1000; m=100;
timeit.Timer("hyp2f1(1/2.,1.,3.2,x)",setup="from scipy.special import
hyp2f1; from numpy import ones;
x=%f*ones(%d)"%(x,m)).timeit(n)/float(n*m)
Out[92]: 2.2619605064392088e-06

In [93]: x=0.999; n=1000; m=100;
timeit.Timer("hyp2f1(1/2.,1.,3.2,x)",setup="from scipy.special import
hyp2f1; from numpy import ones;
x=%f*ones(%d)"%(x,m)).timeit(n)/float(n*m)
Out[93]: 0.00085240376949310298

(uh, no I don't write real code like this; those numbers are seconds
for a single function evaluation. I use the vectorized version because
for small x the function-call overhead swamps the evaluation time.)
(Continue reading)

Warren Weckesser | 3 Jun 19:55

Announcement: VFGEN

Dear SciPy users:

I would like to let the users of the SciPy ODE solvers know about
a tool that I have developed called VFGEN.  VFGEN is a program
that takes a specification of a vector field (in other words, a
system of differential equations) and generates source code for a
wide variety of ODE solvers and other numerical tools.  VFGEN
includes a command for generating Python code to be used with the
SciPy ODEINT function.

You can find the program here:
   http://math.colgate.edu/~wweckesser/software/vfgen

Comments, corrections, and requests for enhancements would all be
appreciated.

Best regards,

Warren Weckesser
David M. Cooke | 3 Jun 21:38
Picon
Picon

Re: hyp2f1 - bad performance for some values of the argument

On Fri, Jun 01, 2007 at 04:57:15PM -0400, Anne Archibald wrote:
> On 30/05/07, Anne Archibald <peridot.faceted <at> gmail.com> wrote:
> 
> > So this is not generally useful, but I have cured my problem through
> > an application of one of the "quadratic transformations" (equation
> > 15.3.32 in Abramowitz & Stegun - which is online!). It gives me
> > accuracies on the order of one part in 10^13, not as good as I was
> > hoping but better than the 1 in 10^8 I was getting from the averaging
> > shortcut. Good enough to get positive definite matrices out of it
> > anyway.
> 
> Perhaps I spoke too soon.
> 
> It appears that scipy evaluates hyp2f1 very slowly for certain values
> of the argument:
> 
> In [92]: x=0.1; n=1000; m=100;
> timeit.Timer("hyp2f1(1/2.,1.,3.2,x)",setup="from scipy.special import
> hyp2f1; from numpy import ones;
> x=%f*ones(%d)"%(x,m)).timeit(n)/float(n*m)
> Out[92]: 2.2619605064392088e-06
> 
> In [93]: x=0.999; n=1000; m=100;
> timeit.Timer("hyp2f1(1/2.,1.,3.2,x)",setup="from scipy.special import
> hyp2f1; from numpy import ones;
> x=%f*ones(%d)"%(x,m)).timeit(n)/float(n*m)
> Out[93]: 0.00085240376949310298
> 
> (uh, no I don't write real code like this; those numbers are seconds
> for a single function evaluation. I use the vectorized version because
(Continue reading)

Rob Clewley | 4 Jun 04:16
Picon
Favicon

Re: Announcement: VFGEN

Hi Warren,

This is nice. I will endeavour to provide an export from PyDSTool to
your XML format in the future, as portability is a big issue! I would
like to make it easier for the XPP and Matlab community to use SciPy
and PyDSTool, for one thing :)

I have made a couple of additions to the Scipy wiki pages to reflect
this utility for conversion from Matlab.

Cheers,
Rob

On 03/06/07, Warren Weckesser <wweckesser <at> mail.colgate.edu> wrote:
> Dear SciPy users:
>
> I would like to let the users of the SciPy ODE solvers know about
> a tool that I have developed called VFGEN.  VFGEN is a program
> that takes a specification of a vector field (in other words, a
> system of differential equations) and generates source code for a
> wide variety of ODE solvers and other numerical tools.  VFGEN
> includes a command for generating Python code to be used with the
> SciPy ODEINT function.
>
> You can find the program here:
>    http://math.colgate.edu/~wweckesser/software/vfgen
>
> Comments, corrections, and requests for enhancements would all be
> appreciated.
>
(Continue reading)

Giorgio Luciano | 4 Jun 10:59
Picon

signal processing chapter for book

first of all sorry for cross posting
As I wrote some time ago we are trying to write a book proposal about 
the use of python/scipy/numpy in chemometrics and analytical chemistry. 
Since now I've received positive answer from eight authors and the only 
"missing" chapter is one about the use of python in digital signal 
processing (I've contacted some possible authors but since now they are 
busy).
The schedule will not too tight and the chapter doesnt' need to be too long.
Hope to hear from you soon
Giorgio
Ryan Krauss | 4 Jun 17:24
Picon

odeint with digital data

I have a vector of experimental data that I need to use as part of a
system of ode's.  I would like to solve this system using
integrate.odeint.  Can odeint be forced to solve only at the discrete
points in time where the experimentally measured signal is available?
Or do I need to set up some interpolation function to find the
measured signal at any time?  If that signal is the only thing that
explictly depends on time and I set up a digital look-up table that
returns the same constant value for the range from t to t+dt, would I
effectively force odeint to do what I want?  Am I making any sense?
Is there a better way?

Thanks,

Ryan
Rob Clewley | 4 Jun 17:50
Picon
Favicon

Re: odeint with digital data

Hi Ryan,

To my knowledge you cannot do this with odeint unless you change a
constant value on the RHS (i.e. technically change your system) to
reflect the changing input value after every time-step, but it is very
easy to do in PyDSTool. There you can also force integration to be
only at the discrete mesh points of your input signal (and would
linearly interpolate in-between otherwise). I am certainly happy to
help you set up your script to do this if you wish to try it in
PyDSTool.

HTH!
Rob

On 04/06/07, Ryan Krauss <ryanlists <at> gmail.com> wrote:
> I have a vector of experimental data that I need to use as part of a
> system of ode's.  I would like to solve this system using
> integrate.odeint.  Can odeint be forced to solve only at the discrete
> points in time where the experimentally measured signal is available?
> Or do I need to set up some interpolation function to find the
> measured signal at any time?  If that signal is the only thing that
> explictly depends on time and I set up a digital look-up table that
> returns the same constant value for the range from t to t+dt, would I
> effectively force odeint to do what I want?  Am I making any sense?
> Is there a better way?
>
> Thanks,
>
> Ryan
> _______________________________________________
(Continue reading)

Ryan Krauss | 4 Jun 19:04
Picon

Re: odeint with digital data

Thanks Rob.  Perhaps the time has finally come.  Yes, please help me
set this up in PyDSTool.  I will send a schematic description of the
system in a few minutes.

On 6/4/07, Rob Clewley <rhc28 <at> cornell.edu> wrote:
> Hi Ryan,
>
> To my knowledge you cannot do this with odeint unless you change a
> constant value on the RHS (i.e. technically change your system) to
> reflect the changing input value after every time-step, but it is very
> easy to do in PyDSTool. There you can also force integration to be
> only at the discrete mesh points of your input signal (and would
> linearly interpolate in-between otherwise). I am certainly happy to
> help you set up your script to do this if you wish to try it in
> PyDSTool.
>
> HTH!
> Rob
>
> On 04/06/07, Ryan Krauss <ryanlists <at> gmail.com> wrote:
> > I have a vector of experimental data that I need to use as part of a
> > system of ode's.  I would like to solve this system using
> > integrate.odeint.  Can odeint be forced to solve only at the discrete
> > points in time where the experimentally measured signal is available?
> > Or do I need to set up some interpolation function to find the
> > measured signal at any time?  If that signal is the only thing that
> > explictly depends on time and I set up a digital look-up table that
> > returns the same constant value for the range from t to t+dt, would I
> > effectively force odeint to do what I want?  Am I making any sense?
> > Is there a better way?
(Continue reading)

Ryan Krauss | 4 Jun 19:23
Picon

Re: odeint with digital data

So, my system is an impact test machine that is being used for
something slightly different than it was designed for and we are
having to do some calculations to get the information we really want.

There is a foam sample which I am trying to verify a stress-strain
curve for.  The problem is that the mass of the impactor and the
compliance of the load cell lead to ringing in the data.  m_1, m_2,
and the load cell all initially are moving downward together with the
same velocity, which is measured just before impacting the foam.  Once
the impact occurs, there is some relative motion between m_1 and m_2.
F_measure (or F_meas) is the load cell force measured at constant
sampling frequency (I think it is 10kHz).  The force from the foam
specimen should be a (theoretically known) function of the
displacement x_1.

Sorry, my arrows are showing a bad sign convention for x_1 and x_2.
The displacement will be downward at least for the first half of the
impact event because the initial velocity is downward.  The
accelerations are shown in the right direction, but are in the
opposite direction of the initial velocity and the displacement.

So, I think the states are
y1 = x1
y2 = x2
y3 = x1dot
y4 = x2dot

and I was planning to set it up like this

Fmeasured = Fmeasured(t) #but only known at discrete time intervals of 10kHz
(Continue reading)


Gmane