Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagated complex parameter (Qpinv) mistakenly used to calculate amplitude instead of Source complex parameter (Qinv) #108

Open
DavidLanders95 opened this issue Jul 25, 2024 · 1 comment

Comments

@DavidLanders95
Copy link

DavidLanders95 commented Jul 25, 2024

Equation (8) of Hybrid propagation physics for the design and modeling of
astronomical observatories: a coronagraphic example

image

shows the the source complex parameter $Q_1 ^{-1}$ is used to calculate the change in amplitude, but this line in beamlets.py uses Qpinv instead.

Amplitude = 1/(np.sqrt(det_2x2(A + B @ Qpinv)))

Which value of $Q^{-1}$ should it be? I think $Q_1 ^{-1}$ is the correct value when I have compared to the analytic result of gaussian amplitude propagation as described by Goodman.

By the way, really glad somebody made gaussian beam propagation open source, your papers and work make it much easier to implement.

@Jashcraf
Copy link
Owner

Hi there thanks for opening this issue!

I think you're right on the money with this, the literature certainly suggests that this should be Qinv instead of Qpinv like Poke does on line 763. I suppose this is a great example of why variable names are important, I must have written the wrong one by accident and not noticed when I went to double-check!

Interestingly, despite this bug I haven't noticed any errors in the fields I've been simulating. Let me try play around with it a bit and I'll get back to you.

Honestly this is a great motivator to finally add tests to the poke.beamlets module! Happy to hear that my work makes these physics a little easier to implement :) I had some difficulty getting started and I wanted to try to make it easier for everyone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants