예제 #1
0
import lens, trace, glass


New_Lens = lens.Lens(lens_name='triplet',creator='XF')
New_Lens.lens_info()

New_Lens.add_wavelength(wl = 656.30)
New_Lens.add_wavelength(wl = 546.10)
New_Lens.add_wavelength(wl = 486.10)
New_Lens.list_wavelengths()

New_Lens.add_field(angle=0)
New_Lens.add_field(angle=7)
New_Lens.add_field(angle=10)
New_Lens.list_fields()

New_Lens.add_surface(number=1,radius=10000000,thickness=5,glass='air')
New_Lens.add_surface(number=2,radius=16.87831,thickness=3.250000 ,glass='NSK16_SCHOTT')
New_Lens.add_surface(number=3,radius=247.02634,thickness=4.984142,glass='air')
New_Lens.add_surface(number=4,radius=-35.95718,thickness=1.250000,glass='NF2_SCHOTT',STO=True)
New_Lens.add_surface(number=5,radius=15.88615 ,thickness=6.099225 ,glass='air')
New_Lens.add_surface(number=6,radius=49.08083,thickness=3.250000,glass='NSK16_SCHOTT')
New_Lens.add_surface(number=7,radius=-27.62109,thickness=38.898042,glass='air')
New_Lens.add_surface(number=8,radius=100000000,thickness=0,glass='air')

trace.trace_sys(New_Lens)

New_Lens.spotdiagram()
예제 #2
0
New_Lens.add_surface(number=2,
                     radius=16.87831,
                     thickness=3.250000,
                     glass='NSK16_SCHOTT')
New_Lens.add_surface(number=3,
                     radius=247.02634,
                     thickness=4.984142,
                     glass='air')
New_Lens.add_surface(number=4,
                     radius=-35.95718,
                     thickness=1.250000,
                     glass='NF2_SCHOTT',
                     STO=True)
New_Lens.add_surface(number=5,
                     radius=15.88615,
                     thickness=6.099225,
                     glass='air')
New_Lens.add_surface(number=6,
                     radius=49.08083,
                     thickness=3.250000,
                     glass='NSK16_SCHOTT')
New_Lens.add_surface(number=7,
                     radius=-27.62109,
                     thickness=38.898042,
                     glass='air')
New_Lens.add_surface(number=8, radius=100000000, thickness=0, glass='air')

trace.trace_sys(New_Lens)

New_Lens.spotdiagram()
예제 #3
0
import lens, trace, cal_tools
import matplotlib.pyplot as __plt__
New_Lens = lens.Lens(lens_name='singlet',creator='XF')
New_Lens.add_surface(number=1,radius=10000000,thickness=10,glass='air')
New_Lens.add_surface(number=2,radius=50,thickness=5,glass='BK7_SCHOTT',STO=True)
New_Lens.add_surface(number=3,radius=1175.71,thickness=96.672,s='air')
New_Lens.add_surface(number=4,radius=10000000,thickness=0,s='air')

New_Lens.lens_info()

New_Lens.add_field(angle=0)
print '-------------------------------------------------------'
ray_list = trace.trace_sys(New_Lens)

x2 = []
y2 = []
z2 = []

for ray in ray_list:
	x2.append(ray.Pos[0])
	y2.append(ray.Pos[1])
	z2.append(ray.Pos[2])

fig = __plt__.figure()
__plt__.plot(x2,y2,'bo')
__plt__.show()

rms = cal_tools.rms(ray_list)
print rms