Skip to content

Commit

Permalink
zernikeplot!: improve high_order logarithmic transform calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagnac committed Oct 11, 2024
1 parent 7b77eaf commit f3856e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ZernikePlot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function zernikeplot!(axis, Z; m = 10, n = 10, finesse = finesse,
ρᵪ, ρᵧ = polar_mat(ρ, θ)
z = @lift($Z.(ρ', θ))
if high_order
@. z[] = sign(z[]) * log10(abs(z[] * log(10)) + 1)
zv = z[]
ln10 = log(10.0)
@. z[] = sign(zv) * log10(abs(zv * ln10) + 1.0)
end
surface!(axis, ρᵪ, ρᵧ, z; shading = NoShading, colormap)
end
Expand Down

0 comments on commit f3856e7

Please sign in to comment.