Real Ray Tracing Example: F/5 Double Gauss

In [1]:
%matplotlib inline
from opticspy.ray_tracing import *
In [2]:
New_Lens = lens.Lens(lens_name='Doublegauss',creator='XF')
New_Lens.FNO = 5
New_Lens.lens_info()
Doublegauss
XF
In [3]:
New_Lens.add_wavelength(wl = 656.30)
New_Lens.add_wavelength(wl = 587.60)
New_Lens.add_wavelength(wl = 486.10)
Add wavelength 656.3nm done
Add wavelength 587.6nm done
Add wavelength 486.1nm done
In [4]:
New_Lens.add_field_YAN(angle=0)
New_Lens.add_field_YAN(angle=10)
New_Lens.add_field_YAN(angle=14)
Add field angle:0 degree done
Add field angle:10 degree done
Add field angle:14 degree done
In [5]:
New_Lens.add_surface(number=1,radius=10000000,thickness=10000000,glass='air')
New_Lens.add_surface(number=2,radius=56.20238,thickness=8.75 ,glass='N-SSK2_schott')
New_Lens.add_surface(number=3,radius=152.28580,thickness=0.5,glass='air')
New_Lens.add_surface(number=4,radius=37.68262,thickness=12.5,glass='N-SK2_schott')
New_Lens.add_surface(number=5,radius=10000000 ,thickness=3.8 ,glass='F5_schott')
New_Lens.add_surface(number=6,radius=24.23130,thickness=16.369445,glass='air')
New_Lens.add_surface(number=7,radius=10000000,thickness=13.747957,glass='air',STO=True)
New_Lens.add_surface(number=8,radius=-28.37731,thickness=3.8,glass='F5_schott')
New_Lens.add_surface(number=9,radius=100000000,thickness=11,glass='N-SK16_schott')
New_Lens.add_surface(number=10,radius=-37.92546,thickness=0.5,glass='air')
New_Lens.add_surface(number=11,radius=177.41176,thickness=7,glass='N-SK16_schott')
New_Lens.add_surface(number=12,radius=-79.41143,thickness=61.487536,glass='air')
New_Lens.add_surface(number=13,radius=100000000,thickness=0,glass='air')
Add surface:  1
Add surface:  2
Add surface:  3
Add surface:  4
Add surface:  5
Add surface:  6
Add surface:  7
Add surface:  8
Add surface:  9
Add surface:  10
Add surface:  11
Add surface:  12
Add surface:  13
In [6]:
New_Lens.refresh_paraxial()
New_Lens.solve_imageposition()
trace.trace_draw_ray(New_Lens)
draw.draw_system(New_Lens)
------------Calculating EFL---------------
start surface: 2
end surface: 12
Rear Focal Length f': 100.003656236
---------Calculating Entrance Pupil Position-----------
STOP Surface 7
STOP thickness 16.369445
start surface: 2
end surface: 6
entrance pupil position EP: 57.9120286405
------------Calculating OAL---------------
start surface: 2
end surface: 13
Overall length: 139.454938
------------Calculating image position---------------
object distance -1000000
start surface: 2
end surface: 12
image position: 61.4773892177
------------------start drawing lens system-------------
In [7]:
analysis.spotdiagram(New_Lens,[1,2,3],[1,2,3])
RMS 0.0905316977398
RMS 0.232506537752
RMS 0.378786784297
Out[7]:
0
In [8]:
analysis.Ray_fan(New_Lens,[1,2,3],[1,2,3])
Out[8]:
0