Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / doc / dht.texi
1 @cindex discrete Hankel transforms
2 @cindex Hankel transforms, discrete
3 @cindex transforms, Hankel
4 This chapter describes functions for performing Discrete Hankel
5 Transforms (DHTs).  The functions are declared in the header file
6 @file{gsl_dht.h}.
7
8 @menu
9 * Discrete Hankel Transform Definition::  
10 * Discrete Hankel Transform Functions::  
11 * Discrete Hankel Transform References::  
12 @end menu
13
14 @node Discrete Hankel Transform Definition
15 @section Definitions
16
17 The discrete Hankel transform acts on a vector of sampled data, where
18 the samples are assumed to have been taken at points related to the
19 zeroes of a Bessel function of fixed order; compare this to the case of
20 the discrete Fourier transform, where samples are taken at points
21 related to the zeroes of the sine or cosine function.
22
23 Specifically, let @math{f(t)} be a function on the unit interval.
24 Then the finite @math{\nu}-Hankel transform of @math{f(t)} is defined
25 to be the set of numbers @math{g_m} given by,
26 @tex
27 \beforedisplay
28 $$
29 g_m = \int_0^1 t dt\, J_\nu(j_{\nu,m}t) f(t),
30 $$
31 \afterdisplay
32 @end tex
33 @ifinfo
34 @example
35 g_m = \int_0^1 t dt J_\nu(j_(\nu,m)t) f(t),
36 @end example
37
38 @end ifinfo
39 @noindent
40 so that,
41 @tex
42 \beforedisplay
43 $$
44 f(t) = \sum_{m=1}^\infty {{2 J_\nu(j_{\nu,m}x)}\over{J_{\nu+1}(j_{\nu,m})^2}} g_m.
45 $$
46 \afterdisplay
47 @end tex
48 @ifinfo
49 @example
50 f(t) = \sum_@{m=1@}^\infty (2 J_\nu(j_(\nu,m)x) / J_(\nu+1)(j_(\nu,m))^2) g_m.
51 @end example
52
53 @end ifinfo
54 @noindent
55 Suppose that @math{f} is band-limited in the sense that
56 @math{g_m=0} for @math{m > M}. Then we have the following
57 fundamental sampling theorem.
58 @tex
59 \beforedisplay
60 $$
61 g_m = {{2}\over{j_{\nu,M}^2}}
62       \sum_{k=1}^{M-1} f\left({{j_{\nu,k}}\over{j_{\nu,M}}}\right)
63           {{J_\nu(j_{\nu,m} j_{\nu,k} / j_{\nu,M})}\over{J_{\nu+1}(j_{\nu,k})^2}}.
64 $$
65 \afterdisplay
66 @end tex
67 @ifinfo
68 @example
69 g_m = (2 / j_(\nu,M)^2)
70       \sum_@{k=1@}^@{M-1@} f(j_(\nu,k)/j_(\nu,M))
71           (J_\nu(j_(\nu,m) j_(\nu,k) / j_(\nu,M)) / J_(\nu+1)(j_(\nu,k))^2).
72 @end example
73
74 @end ifinfo
75 @noindent
76 It is this discrete expression which defines the discrete Hankel
77 transform. The kernel in the summation above defines the matrix of the
78 @math{\nu}-Hankel transform of size @math{M-1}.  The coefficients of
79 this matrix, being dependent on @math{\nu} and @math{M}, must be
80 precomputed and stored; the @code{gsl_dht} object encapsulates this
81 data.  The allocation function @code{gsl_dht_alloc} returns a
82 @code{gsl_dht} object which must be properly initialized with
83 @code{gsl_dht_init} before it can be used to perform transforms on data
84 sample vectors, for fixed @math{\nu} and @math{M}, using the
85 @code{gsl_dht_apply} function. The implementation allows a scaling of
86 the fundamental interval, for convenience, so that one can assume the
87 function is defined on the interval @math{[0,X]}, rather than the unit
88 interval.
89
90 Notice that by assumption @math{f(t)} vanishes at the endpoints
91 of the interval, consistent with the inversion formula
92 and the sampling formula given above. Therefore, this transform
93 corresponds to an orthogonal expansion in eigenfunctions
94 of the Dirichlet problem for the Bessel differential equation.
95
96
97 @node Discrete Hankel Transform Functions
98 @section Functions
99
100 @deftypefun {gsl_dht *} gsl_dht_alloc (size_t @var{size})
101 This function allocates a Discrete Hankel transform object of size
102 @var{size}.
103 @end deftypefun
104
105 @deftypefun int gsl_dht_init (gsl_dht * @var{t}, double @var{nu}, double @var{xmax})
106 This function initializes the transform @var{t} for the given values of
107 @var{nu} and @var{x}.
108 @end deftypefun
109
110 @deftypefun {gsl_dht *} gsl_dht_new (size_t @var{size}, double @var{nu}, double @var{xmax})
111 This function allocates a Discrete Hankel transform object of size
112 @var{size} and initializes it for the given values of @var{nu} and
113 @var{x}.
114 @end deftypefun
115
116 @deftypefun void gsl_dht_free (gsl_dht * @var{t})
117 This function frees the transform @var{t}.
118 @end deftypefun
119
120 @deftypefun int gsl_dht_apply (const gsl_dht * @var{t}, double * @var{f_in}, double * @var{f_out})
121 This function applies the transform @var{t} to the array @var{f_in}
122 whose size is equal to the size of the transform.  The result is stored
123 in the array @var{f_out} which must be of the same length.
124 @end deftypefun
125
126 @deftypefun double gsl_dht_x_sample (const gsl_dht * @var{t}, int @var{n})
127 This function returns the value of the @var{n}-th sample point in the unit interval,
128 @c{${({j_{\nu,n+1}} / {j_{\nu,M}}}) X$}
129 @math{(j_@{\nu,n+1@}/j_@{\nu,M@}) X}. These are the
130 points where the function @math{f(t)} is assumed to be sampled.
131 @end deftypefun
132
133 @deftypefun double gsl_dht_k_sample (const gsl_dht * @var{t}, int @var{n})
134 This function returns the value of the @var{n}-th sample point in ``k-space'',
135 @c{${{j_{\nu,n+1}} / X}$}
136 @math{j_@{\nu,n+1@}/X}.
137 @end deftypefun
138
139 @node Discrete Hankel Transform References
140 @section References and Further Reading
141
142 The algorithms used by these functions are described in the following papers,
143
144 @itemize @asis
145 @item
146 H. Fisk Johnson, Comp.@: Phys.@: Comm.@: 43, 181 (1987).
147 @end itemize
148
149 @itemize @asis
150 @item
151 D. Lemoine, J. Chem.@: Phys.@: 101, 3936 (1994).
152 @end itemize