API Reference
Exported API
FFTLoggin.AbstractKernel — Type
AbstractKernelBase type for Mellin transform kernels.
A concrete kernel K must implement:
(k::K)(s)— evaluate the Mellin transform ats(scalar or array).domain(k::K)— return(lo, hi)bounds of the strip of convergence, with bounds broadcast-compatible withreal.(s).
It may override isindomain(k, s). Default isindomain checks that the real part of s lies in [lo, hi] and reduces to a scalar Bool.
FFTLoggin.BesselJKernel — Type
BesselJKernel(μ)Mellin transform kernel of the Bessel function $J_μ$.
\[M[J_μ](s) = 2^{s-1}\,\frac{Γ((μ+s)/2)}{Γ((μ+2-s)/2)}\]
μ may be a real scalar or an AbstractArray.
Array-valued μ is first-class API. It is useful when evaluating many orders at once, for example line-of-sight integrals vectorized across multipoles ℓ. Kernel evaluation follows Julia broadcasting rules across μ and s.
FFTLoggin.DerivativeKernel — Type
DerivativeKernel(base, order::Int)Kernel representing the order-th derivative of base via the Mellin property
\[M[d^n f / dr^n](s) = (-1)^n\,\frac{Γ(s)}{Γ(s-n)}\,M[f](s-n).\]
FFTLoggin.FFTLog — Type
FFTLog(kernel; n, dlog, bias=0.0, kr=1.0, lowring=true)
FFTLog(kernel, r::AbstractVector; bias=0.0, kr=1.0, lowring=true)Pure FFTLog transform. Immutable. Coefficients are precomputed in the constructor; coordinate management is handled separately via loggrid.
Sample/transform axis is the first axis (column-major, opposite to the Python package).
For array-valued kernels, the sample/transform axis remains first and kernel batch axes are trailing.
FFTLoggin.FFTLogWorkspace — Type
FFTLogWorkspace(fftlog, a; kwargs...)Shape-specific FFT workspace for repeated transforms with fftlog.
The representative input a must be valid for forward(fftlog, a). Keyword arguments are forwarded to FFTW planning. The workspace caches plans for the representative input shape and for the transform output shape, which may differ when kernel batch axes broadcast with the input.
A workspace is tied to one FFTLog and one representative shape pattern. Inputs passed later must match either the representative input shape or the cached output shape, and out passed to forward! or inverse! must match the cached output shape. out and the input may alias.
FFTLoggin.ShiftedKernel — Type
ShiftedKernel(base, ν)Wrapper representing s -> base(s + ν). Use shift to construct.
FFTLoggin.SphericalBesselJKernel — Type
SphericalBesselJKernel(ℓ)Mellin transform of the spherical Bessel function j_ℓ. Implemented as √(π/2) · BesselJKernel(ℓ + 1/2)(s - 1/2) internally; defined as its own struct so that downstream operations (derive, shift, etc.) dispatch on the spherical type when needed.
FFTLoggin.convergence_strip — Method
convergence_strip(k::AbstractKernel)Return (lo, hi), the strip of convergence of the kernel k.
This is a descriptive alias for domain(k).
FFTLoggin.derive — Function
derive(k::AbstractKernel, order::Integer = 1)Return a new kernel representing the order-th derivative of k. order = 0 returns k unchanged. Negative orders raise ArgumentError.
FFTLoggin.forward! — Method
forward!(out, fftlog, a, workspace) -> outMutating forward FFTLog transform. Uses the pre-allocated buffers in workspace to perform the transform without allocations. out and a can alias.
FFTLoggin.forward — Method
forward(fftlog, a; workspace=nothing) -> A
forward(fftlog, a, workspace) -> AForward FFTLog transform. a may be an AbstractVector of length fftlog.n or an array whose first axis has length fftlog.n. Trailing axes broadcast with the kernel batch axes. Pass an FFTLogWorkspace created from a compatible representative input to reuse FFT plans.
FFTLoggin.infer_dlog — Method
infer_dlog(x::AbstractVector; rtol=1e-5) -> FloatInfer the uniform logarithmic spacing of x = log-spaced grid. Throws ArgumentError if the array is not (approximately) uniformly log-spaced.
FFTLoggin.inverse! — Method
inverse!(out, fftlog, A, workspace) -> outMutating inverse FFTLog transform. Uses the pre-allocated buffers in workspace to perform the transform without allocations. out and A can alias.
FFTLoggin.inverse — Method
inverse(fftlog, A; workspace=nothing) -> a
inverse(fftlog, A, workspace) -> aInverse FFTLog transform. A may be an AbstractVector of length fftlog.n or an array whose first axis has length fftlog.n. Trailing axes broadcast with the kernel batch axes. Pass an FFTLogWorkspace created from a compatible representative input to reuse FFT plans.
FFTLoggin.loggrid — Method
loggrid(fftlog::FFTLog; r=nothing, k=nothing) -> NamedTuple{(:r,:k)}Given one log-spaced coordinate array (r or k), return both arrays related by y = exp(logc) ./ reverse(x; dims=1) where logc = log(fftlog.kr). The first axis is the sample axis; all remaining axes broadcast with the batch axes of fftlog.kr.
FFTLoggin.shift — Method
shift(k::AbstractKernel, ν)Return a kernel representing s -> k(s + ν). ν == 0 returns k unchanged. For ShiftedKernels, the shifts are combined.