[SciPy-Dev] Hankel transforms, again

Tom Grydeland tom.grydeland at gmail.com
Fri Feb 14 04:45:40 EST 2014


Hi developers,

This is a repost of a message from December 2008 which gave no useful answers.  Since then, I’ve had 4-5 requests for the code from people who had a need for it.  It’s not a massive demand, but enough that perhaps you’ll consider my offer again.

Since the previous posting, I’ve also included alternative filters thanks to Fan-Nian Kong that are shorter and more accurate when the function makes significant changes in more limited intervals. I’m not including the code (since it is mostly thousands of lines of tables), but I will provide the files to anyone who’s interested.

Cheers,

Tom

—— original message below ——— 

When I recently needed a Hankel transform I was unable to find one in
Scipy.  I found one in MATLAB though[1], written by Prof. Brian
Borchers at New Mexico Tech. The code is based on a previous FORTRAN
implementation by W. L. Anderson [2], and the MATLAB code is not
marked with any copyright statements.  Hankel transforms of the first
and second order can be computed through digital filtering.

I have rewritten the code in Python/numpy, complete with tests and
acknowledgements of the origins, and my employer has agreed that I can
donate the code to Scipy.  I believe this should be of interest.
Hankel transforms arise often in acoustics and other systems with
cylinder symmetry.  If you want it, I would like a suggestion where it
belongs (with other integral transforms, probably) and how I should
shape the tests to make them suitable for inclusion.

The tests I currently have use Hankel transforms of five different
functions with known analytical transforms and compares the
transformed values to the numerically evaluated analytical
expressions.  Currently plots are generated, but for automated testing
I suppose something else would be better.  Pointing me at an example
is sufficient.

[1] 
http://infohost.nmt.edu/~borchers/hankel.html

[2] Anderson, W. L., 1979, Computer Program Numerical Integration of
Related Hankel Transforms of Orders 0 and 1 by Adaptive Digital
Filtering. Geophysics, 44(7):1287-1305.

Best regards,

-- 
Tom Grydeland
  <Tom.Grydeland@(norut.no|gmail.com)>






More information about the SciPy-Dev mailing list