Repository navigation
Add ComplexZernike - #234
Merged
Merged
Conversation
`ComplexZernike(a, b)` is ordered the same as `Zernike(a, b)` but with
`sin(|m|θ)` replaced by `exp(-im*|m|*θ)` and `cos(|m|θ)` by `exp(im*|m|*θ)`.
It supports evaluation, `Normalized`, transforms/`expand`, Jacobi matrices,
conversion to and from `Zernike`, lowering, the Laplacian, the fractional
Laplacian and `sum`. Operators that act on each Fourier mode are shared with
`Zernike` via a new `AbstractZernike` supertype.
Also fixes `AbstractQuasiArray{T}(::Zernike)` dropping the parameters, which
made `Zernike(0.1,0.2) \ f` hang for complex `f`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #234 +/- ##
==========================================
+ Coverage 96.90% 96.99% +0.08%
==========================================
Files 8 8
Lines 1100 1165 +65
==========================================
+ Hits 1066 1130 +64
- Misses 34 35 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ComplexZernike(a, b): the same ordering and radial parts asZernike(a, b), but withsin(|m|θ)replaced byexp(-im*|m|*θ)andcos(|m|θ)byexp(im*|m|*θ). So the entry of degreeℓand modemisFollowing
Laurent, the first type parameter is the (complex) element type, withaandbstored as reals:ComplexZernike() isa ComplexZernike{ComplexF64,Float64}.Supported: evaluation (
complexzernikez,normalizedcomplexzernikez),Normalized, transforms/expand,x .* Candy .* C, conversion to and fromZernike, conversion between parameters, lowering withWeighted,laplacian(weighted and unweighted),abslaplacianandsum. Plotting is not supported.Implementation
AbstractZernikesupertype. Operators that act on each Fourier mode through the radial part (conversion, lowering, Laplacians,sum) are shared betweenZernikeandComplexZernike. They now buildJacobiwith real parameters even for complex element types.ZernikeandComplexZernikeare related by a block-diagonal matrix that mixes the±|m|entries of each block. Between the normalized bases it is unitary.ZernikeTransformand then mix the Fourier modes of the coefficients.Zernikeones conjugated by the mixing matrix. ForNormalized(ComplexZernike()),Xis real symmetric andYis Hermitian.Fixes to
ZernikeAbstractQuasiArray{T}(::Zernike)dropped the parameters, soZernike(0.1,0.2) \ fhung for complexf.Notes
copyof atransposeof aBlockBroadcastArrayconjugating its entries. That is fixed in Fix transpose copy JuliaLinearAlgebra/LazyBandedMatrices.jl#166, after which the workaround can go.ComplexDerivative.test/test_disk.jlpasses locally, including a newComplexZerniketestset.🤖 Generated with Claude Code