Replies: 1 comment
-
Hi @malekmok, Thanks for opening this! I confirmed that I get the same behavior. I can see that the issue arises when there is only a single on-axis field. As a workaround, you can add a small field: singlet.add_field(y=1e-10) Then, you will recover the expected spherical aberration (although I see -0.059 instead of +0.059). This appears to be a bug. I will open an issue to track this. I expect it's a relatively simple fix. Thanks again! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I've started running some initial tests using Optiland.
In my first test, I encountered an issue related to the computation of third-order aberrations. I'm sharing here a simple example involving a singlet lens :
#======================== CODE ==================
import numpy as np
from optiland import optic, materials
singlet = optic.Optic()
thic = 13.81
radius = 224.69890346935105
EPD = 80
silica = materials.IdealMaterial(n=1.458)
add surfaces
singlet.add_surface(index=0, thickness=np.inf)
singlet.add_surface(index=1,
thickness = thic,
radius=radius,
is_stop=True,
material= silica)
singlet.add_surface(index=2, thickness=222)
singlet.add_surface(index=3)
singlet.set_aperture(aperture_type="EPD", value=EPD)
add field
singlet.set_field_type(field_type="angle")
singlet.add_field(y=0)
add wavelength
singlet.add_wavelength(value=0.601, is_primary=True)
singlet.image_solve()
singlet.draw(num_rays=11)
singlet.info()
print("Seidel Aberrations:")
for k, seidel in enumerate(singlet.aberrations.seidels()):
print(f"\tS{k + 1}: {seidel:.3e}")
print("Third-order transverse spherical aberration:")
for k, value in enumerate(singlet.aberrations.TSC()):
print(f"\tSurface {k + 1}: {value:.3e}")
print("Third-order longitudinal spherical aberration:")
for k, value in enumerate(singlet.aberrations.SC()):
print(f"\tSurface {k + 1}: {value:.3e}")
#======================== END OF CODE ==================
With Optiland, all the returned coefficients are zero!
With Zemax, I obtain : S1 = 0.059 and W040=12.45 wave.
It’s possible that I missed something while using Optiland. Could you help me obtain results similar to those from Zemax?
Thank you in advance for your help.
my_singlet.zip
Beta Was this translation helpful? Give feedback.
All reactions