Expand description
A library for performing quasi-discrete Hankel transforms.
This crate provides tools for efficiently computing Hankel transforms
of various orders using a quasi-discrete approximation. It operates seamlessly
on ndarray arrays and natively supports both real (f64) and complex
(num_complex::Complex64) numbers via the HankelScalar trait.
§Compatibility
hankrs 2.xtargetsndarray 0.17.- For projects using
ndarray 0.16, usehankrs 1.x.
§Examples and Guides
Comprehensive examples and theoretical demonstrations can be found in the
online hankrs book.
§Quick Start
use hankrs::HankelTransform;
use ndarray::{Array1, Axis};
// 1. Create a transformer for order 0 up to radius 10.0 with 256 points
let transformer = HankelTransform::new(0, 10.0, 256).unwrap();
// 2. Define a function on the generated radial grid `transformer.radius()`
let r = transformer.radius();
let f = r.mapv(|rad| (-rad * rad).exp()); // Gaussian function
// 3. Compute the quasi-discrete Hankel transform (QDHT)
let ht = transformer.qdht(&f, Axis(0));
// The transformed values are evaluated at `transformer.kr()` (or `transformer.frequency()`)Modules§
- one_
shot - Convenience functions for performing one-off Hankel transforms.
Structs§
- Hankel
Transform - The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. The main struct for performing Hankel Transforms
Enums§
- Hankel
Error - The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. An error that occurs during Hankel transform operations.
- Transform
Type - The primary struct used for computing Hankel transforms.
The primary struct used for computing Hankel transforms.
The primary struct used for computing Hankel transforms.
Indicates the type of Hankel transform that a
HankelTransformobject will perform.
Traits§
- Hankel
Scalar - The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. The primary struct used for computing Hankel transforms. A trait for scalar types that can be processed by the Hankel transform.