opticspy / lightpipes

LightPipes for Python, "Pure Python version"
https://opticspy.github.io/lightpipes/
BSD 3-Clause "New" or "Revised" License
227 stars 52 forks source link

A doc example of D4sigma seems to call Centroid instead of D4sigma #74

Open gimli2 opened 1 year ago

gimli2 commented 1 year ago

It seems that there is a typo on this line: https://github.com/opticspy/lightpipes/blob/master/LightPipes/core.py#L115C9-L115C29 There is Centroid(F) instead of Sigma(F).

Probably it should look something like this:

from LightPipes import *
wavelength = 500*nm
size = 25*mm
N = 500
F = Begin(size, wavelength, N)
F = CircAperture(F, 2*mm, x_shift=5*mm, y_shift=3*mm)
F = Fresnel(F, 10*m)
sx, sy = D4sigma(F)
FredvanGoor commented 1 year ago

Yes, you are right! I will change it. Thanks.