Skip to content

Commit

Permalink
confirm correct ratio for obscured airy pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Mar 29, 2024
1 parent ed63fd0 commit 9abf813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/airy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function _airydisk(px, py, x, y, fwhm, ratio, amp, theta, background)
q = AIRY_PRE * r / fwhm
I1 = 2 * besselj1(q) / q
iszero(ratio) && return amp * I1^2 + background
I2 = 2 * ratio^2 * besselj1(q * ratio) / q
I2 = 2 * ratio * besselj1(q * ratio) / q
return amp * (I1 - I2)^2 + background
end

Expand All @@ -67,6 +67,6 @@ function _airydisk(px, py, x, y, fwhm::BivariateLike, ratio, amp, theta, backgro
iszero(q) && return amp + background
I1 = 2 * besselj1(q) / q
iszero(ratio) && return amp * I1^2 + background
I2 = 2 * ratio^2 * besselj1(q * ratio) / q
I2 = 2 * ratio * besselj1(q * ratio) / q
return amp * (I1 - I2)^2+ background
end

0 comments on commit 9abf813

Please sign in to comment.