bug-gsl
[Top][All Lists]

## Re: [Bug-gsl] Bug in dht

 From: Benno Rem Subject: Re: [Bug-gsl] Bug in dht Date: Thu, 23 Dec 2010 16:58:33 +0100

```Dear Brian,

Actually, it should also be correct for functions which are non-zero at the
center. I don't know about the discrete algorithm used in dht, but for instance
doing the same calculations using Mathematica and implementing a numerical
integration works. This is not an option though, because it is too slow.

Something else I thought of is that, maybe the steps in space are too big.

I'll send some code.

Regards,

Benno

Ps. about the code. It calculates the 0^th order Hankel transform and commented
out is a part that multiplies the function in Hankel space by k^2, such that
when you transform back you get the second derivative.

On 23 Dec 2010, at 15:04, Brian Gough wrote:

> At Wed, 22 Dec 2010 15:23:34 +0100, Benno Rem wrote:
>> I noticed that, as soon as I try to do a Hankel Transform (nu = 0)
>> on a gaussian of the form exp( - pi * r^2 ), transform it back and
>> multiply by the factor Jzero0(0,N)^2, that I don't get the exactly
>> same function back.  Actually, the function that is returned is
>> scaled by a factor 1.00391 with respect to the original function.
>>
>> For just one transform it can be considered as just a numerical
>> error, but as soon as I try to do some more complicated stuff I get
>> strong abbreviations from the real result.
>>
>> I'm not sure if this is a bug, or just a misunderstanding of the
>> concept, but it would help me a lot if someone could give me an
>> idea.
>
> Hello,
>
> I think the transform is only exact for functions that are zero at the
> boundaries.  If this does not explain the discrepancy could you send
> an example program and output which demonstrates the problem.  Thanks.
>
> --
> Brian Gough
>

Benno REM
------------------------------------------