bug-gsl
[Top][All Lists]

## Re: [Bug-gsl] Discrete Hankel Transform (possible bug)

 From: Alexey Balakin Subject: Re: [Bug-gsl] Discrete Hankel Transform (possible bug) Date: Wed, 10 Feb 2010 05:07:49 +0300

Dear Brian,

> At Tue, 2 Feb 2010 08:12:53 +0300,
> Alexey Balakin wrote:
>> I think a formula for discrete Hankel transform (DHT) contain a bug.
>> The following code should give the same arrays b[i]=a[i] (at least
>> with accuracy of numeric error). But it is possible only if one
>> introduce additional multiplier f=j_{\nu, M} (in notation of GSL
>> documentation). Note, here I use f*f because I do 2 transforms (like
>> forward and backward).
>>
>> So, I suggest to note this in documentation (as GSL "feature"), or
>> change the formula and the code of gsl_dht_apply() function to
>> additional multiplication by j_{\nu, M}.
>
> Thanks for the email.  I agree this is a bit confusing, I've added an
> extra note to the documentation about the overall scaling factor.  The
> choice of factors in the transform is intentional because the test
> code mentions it explicitly.  I think the convention may come from one
> of the original papers.

Good.

>> One more comment. I think that it will be nice if gsl_dht_apply()
>> can handle the same arrays for input and output :) .
>
> Unfortunately I don't think it's possible to do the transform
> in-place.

It's a pity but I can write my own wrapper function (what I really do now).

--
All the best,
Alexey Balakin