[SciPy-dev] some interesting routines in Python SOMNEC program
eric
eric at scipy.org
Wed Feb 13 11:44:38 CST 2002
> I've just finished a Python port of the NEC2 SOMNEC routine. I had a
> real headache resolving overlapping GO TO statements, but as far as I
> can tell it works. Please feel free to plagarize any of the routines,
> including the Variable Width Romberg Integration. Its chock full of
> neat stuff, and begs to be rewritten in C. (no not f2c, that becomes
> unintelligible :)
It seems like you should just leverage the scipy.special library, but... I just
checked and there are a few things missing. The first thing is bessel and
hankel functions for complex arguments. The Fortran functions are there in amos
(zbesh,cbesh,etc.), but they aren't exposed from the cephes interface. Is there
a reason for this?
2nd, there isn't a function to compute the derivative of the bessel function.
Rob's somnec.BESSEL(z) returns both the bessel function and its derivative as
results. Do you need a special algorithm to compute the derivative, or is it
possible to compute it analytically by some relationship with the bessel
function (seems like I remember something like this)?
Also, would the functions in integrate work for calculating the integrals? This
is a "real world" problem that SciPy should be able to handle in a few lines,
correct? It is just a matter of making sure we have the correct algorithms
underneath.
see ya,
eric
More information about the Scipy-dev
mailing list