In [10]:
%pylab inline
import warnings
import numpy as np
import matplotlib.pyplot as plt

import rayopt as ro

# ignore matplotlib and numpy warning each other
warnings.simplefilter("ignore", FutureWarning)
# ignore floating point exceptions
np.seterr(divide="ignore", invalid="ignore")
# by default only print 4 significant digits
np.set_printoptions(precision=4)
Populating the interactive namespace from numpy and matplotlib
In [11]:
# f = 100    
# Aperture ratio 1:2.8
# Angle of view 2ω = 13.6° 
# Telephoto ratio: 0.949f.sub.1 = 80.108f.sub.2 = -111.627l = 57.902
description = "Nikkor-180mm-f2.8ED-Matsui-US4338001"
columns = "type roc distance diameter material"
text= """
O       0    0      40.0        AIR
S   54.95    10     35.8        1.50032/81.9
S -78.333    6.667  35.4        AIR  
S -76.698    1.111  34.6        1.7495/35
S 207.222    2.056  34.0        AIR
S  43.208    3.056  33.6        1.65844/50.8
S 134.444    5.111  32.4        AIR
S -19.462    50.667 18.0        1.51823/59
S -305.556   1.111  19.0        AIR
S 122.222    0.056  19.4        1.79668/45.4
S -89.522    2.222  19.6        AIR
I 0          22.86   42         AIR
"""
In [12]:
s = ro.system_from_text(text, columns.split(), description=description, scale=1.8e-3)
s.object.angle = np.deg2rad(6.8)
s.fields = 0, .7, 1.
In [13]:
s.update()
print(s)
System: Nikkor-180mm-f2.8ED-Matsui-US4338001
Scale: 1.7999999999999998 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 6.8 deg
 Pupil:
   Pupil Distance: 10
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 17.9
Image:
 Radius: 21
 Update Radius: True
 Pupil:
   Pupil Distance: -67.2465
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.0399
Stop: 1
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf         40         basic/air   1.000   1.000   89.30
 1 S         10      54.95       35.8                 -   1.500   1.500   81.90
 2 S      6.667     -78.33       35.4         basic/air   1.000   1.000   89.30
 3 S      1.111      -76.7       34.6                 -   1.750   1.750   35.00
 4 S      2.056      207.2         34         basic/air   1.000   1.000   89.30
 5 S      3.056      43.21       33.6                 -   1.658   1.658   50.80
 6 S      5.111      134.4       32.4         basic/air   1.000   1.000   89.30
 7 S     50.667     -19.46         18                 -   1.518   1.518   59.00
 8 S      1.111     -305.6         19         basic/air   1.000   1.000   89.30
 9 S      0.056      122.2       19.4                 -   1.797   1.797   45.40
10 S      2.222     -89.52       19.6         basic/air   1.000   1.000   89.30
11 S      22.86        inf         42         basic/air   1.000   1.000   89.30

In [14]:
ro.Analysis(s)
System: Nikkor-180mm-f2.8ED-Matsui-US4338001
Scale: 1.7999999999999998 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 6.8 deg
 Pupil:
   Pupil Distance: 10
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 17.9
Image:
 Radius: 21
 Update Radius: True
 Pupil:
   Pupil Distance: -67.2465
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.0399
Stop: 1
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf         40         basic/air   1.000   1.000   89.30
 1 S         10      54.95       35.8                 -   1.500   1.500   81.90
 2 S      6.667     -78.33       35.4         basic/air   1.000   1.000   89.30
 3 S      1.111      -76.7       34.6                 -   1.750   1.750   35.00
 4 S      2.056      207.2         34         basic/air   1.000   1.000   89.30
 5 S      3.056      43.21       33.6                 -   1.658   1.658   50.80
 6 S      5.111      134.4       32.4         basic/air   1.000   1.000   89.30
 7 S     50.667     -19.46         18                 -   1.518   1.518   59.00
 8 S      1.111     -305.6         19         basic/air   1.000   1.000   89.30
 9 S      0.056      122.2       19.4                 -   1.797   1.797   45.40
10 S      2.222     -89.52       19.6         basic/air   1.000   1.000   89.30
11 S     22.934        inf         42         basic/air   1.000   1.000   89.30

lagrange: -2.1401
track length: 72.057
object, image height: [ 1.1953 11.95  ]
front, back focal length (from PP): [-100.1456  100.1456]
entry, exit pupil height: [17.9    12.0399]
entry, exit pupil distance: [-4.5160e-16 -4.4387e+01]
front, back focal distance: [-148.8478   22.9669]
front, back principal distance: [-48.7022 -77.1787]
front, back nodal distance: [-48.7022 -77.1787]
front, back numerical aperture: [0.    0.176]
front, back f number: [2.7974 4.1589]
front, back working f number: [   inf 2.8417]
front, back airy radius: [   inf 0.0011]
transverse, angular magnification: [-0.      1.4867]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1      17.9         0    -1.195    0.1196
 1 S        10       1.5      17.9   -0.1629 5.398e-17    0.1196
 2 S     16.67         1     17.18   -0.2725    0.5313    0.1162
 3 S     17.78      1.75     16.87   -0.1077    0.6603    0.1226
 4 S     19.83         1     16.75  -0.04716    0.8044    0.1255
 5 S     22.89     1.658      16.6   -0.3001     1.188    0.1074
 6 S        28         1     15.68   -0.2233     1.519    0.1149
 7 S     78.67     1.518     4.367   -0.1071     7.337    0.3101
 8 S     79.78         1     4.289   -0.1144     7.564    0.2973
 9 S     79.84     1.797     4.282   -0.1423     7.581    0.2479
10 S     82.06         1     4.106   -0.1788     7.888    0.1778
11 S     104.9         1   0.02025   -0.1788     11.95    0.1778

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S    -0.384   -0.1409   -0.0517  -0.07754  -0.04742   -0.1326  -0.04866
 2 S    -2.321    0.5161   -0.1148  -0.05439   0.03762   -0.1919   0.04268
 3 S     2.711    -0.592    0.1293   0.07138  -0.04381    0.5679    -0.124
 4 S-0.0006334 -0.002434  -0.00935   0.02642   0.06558   0.03854    0.1481
 5 S   -0.3266   -0.1482  -0.06726   -0.1174  -0.08381   -0.2442   -0.1108
 6 S  -0.05681    0.0672   -0.0795   0.03774    0.0494  -0.07295   0.08629
 7 S     0.432     0.253    0.1482    0.2241     0.218   0.06313   0.03698
 8 S  -0.01339   0.02842  -0.06034  -0.01427    0.1584  -0.01778   0.03774
 9 S  0.005281  -0.02393    0.1084  -0.04636   -0.2812   0.01852   -0.0839
10 S   -0.0779   0.03107   -0.0124   -0.0633   0.03019   -0.0503   0.02006
11 S         0        -0         0         0         0        -0         0
      -0.03125  -0.01172 -0.009426  -0.01366     0.103  -0.02165  0.004443

Out[14]:
<rayopt.analysis.Analysis at 0x2e25eb877b8>
In [ ]: