brandondube / prysm

physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing...
https://prysm.readthedocs.io/en/stable/
MIT License
268 stars 46 forks source link

Possible incorrect equation in jitter calculation #101

Closed nora-anne closed 1 year ago

nora-anne commented 1 year ago

The calculation of the jitter in jitter_ft in degredations uses scale / 2 in the exponential equation. However, this give results in conflict with other methods I have used to calculate jitter. For example, Genberg, Michels, Doyle (sect 2.3) and Pittelkau & McKinley 2012 (eqn 29c) both use a scale without a factor of 1/2. I am not an expert in this field, so it's possible I'm misunderstanding either the scale parameter used in the code or the literature, but it seems the factor of 1/2 in the code is in error.

brandondube commented 1 year ago

Thank you for this bug report, and #100. The jitter normalization used in the revision of the code that you are using is from Auelmann. Auelmann's choice of "units" (whether there is a factor of 2 in the gaussian in space, or in frequency) is older than Genberg et al, and was dominant in industry years ago. As you surmise, the industry has changed to the notation used by Genberg et al, because it uses standard form gaussians as you would find in e.g. Abramowitz and Stegun.

About two months ago, I changed the jitter ft function to use the more modern form, and also changed the smear ft from a polar coordinate for the input the Cartesian, where the smear is given as x and y magnitudes.

If you find an issue with the current implementation on master, please do comment. If there is no issue on master, perhaps we could close this issue? I expect that by the end of the calendar year ~v1~ v0.22 will be released.

nora-anne commented 1 year ago

Ah, that makes sense, thanks for the clarification!