In [1]:
%pylab inline
import warnings
import numpy as np
import matplotlib.pyplot as plt
import rayopt as ro
warnings.simplefilter("ignore", FutureWarning)
np.seterr(divide="ignore", invalid="ignore")
np.set_printoptions(precision=4)
description = "JP2015-215560 Example 1 (AF-S Nikkor 500mm f/4E FL ED VR)"
columns = "type distance roc diameter material"
# number of surfaces = 31
lensdata = """
O 0.0 0.0 160.004 AIR
S 20 1200.37 123.08 1.5168/63.88
S 5 1199.79 123.08 AIR
S 1 199.154 121.48 1.43385/95.25
S 13.2 0 121.48 AIR
S 80.9 121.532 95.74 1.43385/95.25
S 15.5 -467.239 95.74 AIR
S 2 -468.078 92.4 1.61266/44.46
S 5.2 374.421 92.4 AIR
S 56.52 78.9162 62.52 1.6968/55.52
S 3.5 45.502 58.64 1.49782/82.57
S 11 253.274 58.64 AIR
S 14.505 0 48.4 1.834/37.18
S 2.5 82.2217 48.4 AIR
S 3.94 -408.755 46.34 1.80809/22.74
S 3.9 -94.719 46.34 1.55298/55.07
S 2.5 0 46.34 AIR
A 36.105 0 37.683 AIR
S 25.55 96.5675 35.26 1.80809/22.74
S 1.8 47.002 34.6 1.49782/82.57
S 5.5 -244.386 34.6 AIR
S 4.5 -634.042 33.28 1.62299/58.12
S 1.8 142.839 33.28 AIR
S 1.65 -256.019 33.62 1.61266/44.46
S 4.7 -42.182 33.62 1.49782/82.57
S 1.8 69.591 33.62 AIR
S 4.5 45.6956 35.42 1.61266/44.46
S 6.7 -114.282 35.42 AIR
S 12.908 -62.3322 33.28 1.83481/42.73
S 1.8 50.3097 33.28 AIR
S 1.654 63.8316 33.94 1.801/34.92
S 4.9 -136.04 33.94 AIR
I 87.772 0 43.26 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(2.517500)
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: JP2015-215560 Example 1 (AF-S Nikkor 500mm f/4E FL ED VR)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 2.52 deg
 Pupil:
   Pupil Distance: 813.548
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 59.8954
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -151.922
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 18.6143
Stop: 17
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf        160         basic/air   1.000   1.000   89.30
 1 S         20       1200     123.08                 -   1.517   1.517   63.88
 2 S          5       1200     123.08         basic/air   1.000   1.000   89.30
 3 S          1      199.2     121.48                 -   1.434   1.434   95.25
 4 S       13.2        inf     121.48         basic/air   1.000   1.000   89.30
 5 S       80.9      121.5      95.74                 -   1.434   1.434   95.25
 6 S       15.5     -467.2      95.74         basic/air   1.000   1.000   89.30
 7 S          2     -468.1       92.4                 -   1.613   1.613   44.46
 8 S        5.2      374.4       92.4         basic/air   1.000   1.000   89.30
 9 S      56.52      78.92      62.52                 -   1.697   1.697   55.52
10 S        3.5       45.5      58.64                 -   1.498   1.498   82.57
11 S         11      253.3      58.64         basic/air   1.000   1.000   89.30
12 S     14.505        inf       48.4                 -   1.834   1.834   37.18
13 S        2.5      82.22       48.4         basic/air   1.000   1.000   89.30
14 S       3.94     -408.8      46.34                 -   1.808   1.808   22.74
15 S        3.9     -94.72      46.34                 -   1.553   1.553   55.07
16 S        2.5        inf      46.34         basic/air   1.000   1.000   89.30
17 S     36.105        inf     37.683         basic/air   1.000   1.000   89.30
18 S      25.55      96.57      35.26                 -   1.808   1.808   22.74
19 S        1.8         47       34.6                 -   1.498   1.498   82.57
20 S        5.5     -244.4       34.6         basic/air   1.000   1.000   89.30
21 S        4.5       -634      33.28                 -   1.623   1.623   58.12
22 S        1.8      142.8      33.28         basic/air   1.000   1.000   89.30
23 S       1.65       -256      33.62                 -   1.613   1.613   44.46
24 S        4.7     -42.18      33.62                 -   1.498   1.498   82.57
25 S        1.8      69.59      33.62         basic/air   1.000   1.000   89.30
26 S        4.5       45.7      35.42                 -   1.613   1.613   44.46
27 S        6.7     -114.3      35.42         basic/air   1.000   1.000   89.30
28 S     12.908     -62.33      33.28                 -   1.835   1.835   42.73
29 S        1.8      50.31      33.28         basic/air   1.000   1.000   89.30
30 S      1.654      63.83      33.94                 -   1.801   1.801   34.92
31 S        4.9       -136      33.94         basic/air   1.000   1.000   89.30
32 S     87.772        inf      43.26         basic/air   1.000   1.000   89.30

System: JP2015-215560 Example 1 (AF-S Nikkor 500mm f/4E FL ED VR)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 2.52 deg
 Pupil:
   Pupil Distance: 813.548
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 59.8954
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -151.922
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 18.6143
Stop: 17
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf        160         basic/air   1.000   1.000   89.30
 1 S         20       1200     123.08                 -   1.517   1.517   63.88
 2 S          5       1200     123.08         basic/air   1.000   1.000   89.30
 3 S          1      199.2     121.48                 -   1.434   1.434   95.25
 4 S       13.2        inf     121.48         basic/air   1.000   1.000   89.30
 5 S       80.9      121.5      95.74                 -   1.434   1.434   95.25
 6 S       15.5     -467.2      95.74         basic/air   1.000   1.000   89.30
 7 S          2     -468.1       92.4                 -   1.613   1.613   44.46
 8 S        5.2      374.4       92.4         basic/air   1.000   1.000   89.30
 9 S      56.52      78.92      62.52                 -   1.697   1.697   55.52
10 S        3.5       45.5      58.64                 -   1.498   1.498   82.57
11 S         11      253.3      58.64         basic/air   1.000   1.000   89.30
12 S     14.505        inf       48.4                 -   1.834   1.834   37.18
13 S        2.5      82.22       48.4         basic/air   1.000   1.000   89.30
14 S       3.94     -408.8      46.34                 -   1.808   1.808   22.74
15 S        3.9     -94.72      46.34                 -   1.553   1.553   55.07
16 S        2.5        inf      46.34         basic/air   1.000   1.000   89.30
17 S     36.105        inf     37.683         basic/air   1.000   1.000   89.30
18 S      25.55      96.57      35.26                 -   1.808   1.808   22.74
19 S        1.8         47       34.6                 -   1.498   1.498   82.57
20 S        5.5     -244.4       34.6         basic/air   1.000   1.000   89.30
21 S        4.5       -634      33.28                 -   1.623   1.623   58.12
22 S        1.8      142.8      33.28         basic/air   1.000   1.000   89.30
23 S       1.65       -256      33.62                 -   1.613   1.613   44.46
24 S        4.7     -42.18      33.62                 -   1.498   1.498   82.57
25 S        1.8      69.59      33.62         basic/air   1.000   1.000   89.30
26 S        4.5       45.7      35.42                 -   1.613   1.613   44.46
27 S        6.7     -114.3      35.42         basic/air   1.000   1.000   89.30
28 S     12.908     -62.33      33.28                 -   1.835   1.835   42.73
29 S        1.8      50.31      33.28         basic/air   1.000   1.000   89.30
30 S      1.654      63.83      33.94                 -   1.801   1.801   34.92
31 S        4.9       -136      33.94         basic/air   1.000   1.000   89.30
32 S     88.657        inf      43.26         basic/air   1.000   1.000   89.30

lagrange: -2.635
track length: 337.03
object, image height: [35.7808 21.4999]
front, back focal length (from PP): [-491.5492  491.5492]
entry, exit pupil height: [59.8954 18.6143]
entry, exit pupil distance: [793.5476 -64.1505]
front, back focal distance: [-787.9001   88.5883]
front, back principal distance: [-296.3508 -402.9609]
front, back nodal distance: [-296.3508 -402.9609]
front, back numerical aperture: [0.    0.121]
front, back f number: [ 4.1034 13.2036]
front, back working f number: [   inf 4.1337]
front, back airy radius: [  inf 0.003]
transverse, angular magnification: [-0.      3.2177]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1      59.9         0    -35.78   0.04399
 1 S        20     1.517      59.9  -0.02577     -34.9   0.05901
 2 S        25         1     59.81-2.412e-05    -34.71   0.04407
 3 S        26     1.434     59.81   -0.1302    -34.66    0.1195
 4 S      39.2         1     58.61   -0.1302    -33.56    0.1195
 5 S     120.1     1.434     48.08   -0.3018    -23.89    0.2048
 6 S     135.6         1     44.82   -0.3433    -21.68    0.2249
 7 S     137.6     1.613     44.13   -0.2856    -21.23    0.1971
 8 S     142.8         1     43.21   -0.2149     -20.6    0.1634
 9 S     199.3     1.697     31.06   -0.4891    -11.36    0.2637
10 S     202.8     1.498     30.05   -0.3577    -10.82    0.2164
11 S     213.8         1     27.43   -0.3038    -9.228    0.1983
12 S     228.3     1.834     23.02   -0.3038    -6.352    0.1983
13 S     230.8         1     22.61  -0.07455    -6.082    0.1366
14 S     234.8     1.808     22.31  -0.03045    -5.544    0.1256
15 S     238.7     1.553     22.25  -0.09038    -5.273    0.1399
16 S     241.2         1      22.1  -0.09038    -5.048    0.1399
17 S     277.3         1     18.84  -0.09038 1.146e-14    0.1399
18 S     302.8     1.808     16.53   -0.2287     3.572      0.11
19 S     304.6     1.498     16.31    -0.121     3.682    0.1343
20 S     310.1         1     15.86   -0.1533     4.175    0.1258
21 S     314.6     1.623     15.17   -0.1384     4.741    0.1304
22 S     316.4         1     15.02  -0.07297     4.885    0.1517
23 S     318.1     1.613      14.9  -0.03733     5.135     0.164
24 S     322.8     1.498     14.79  -0.07759     5.613    0.1487
25 S     324.6         1      14.7   0.02747     5.792    0.1901
26 S     329.1     1.613     14.82   -0.1711     6.648    0.1011
27 S     335.8         1     14.11   -0.2467     7.067   0.06318
28 S     348.7     1.835     10.92   -0.1005     7.883    0.1687
29 S     350.5         1     10.83   0.07911     8.048    0.3022
30 S     352.1     1.801     10.96  -0.05833     8.548     0.195
31 S       357         1      10.8   -0.1219     9.079    0.1416
32 S     444.8         1    0.1025   -0.1219      21.5    0.1416

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S -0.006819 -0.002037-0.0006085 -0.008034 -0.002582   -0.1301  -0.03886
 2 S  0.006776  0.002057 0.0006248  0.008038   0.00263    0.1297   0.03937
 3 S    -1.394    0.6035   -0.2612    -0.043    0.1317   -0.4652    0.2014
 4 S    -0.271    0.2487   -0.2283         0    0.2095   -0.1977    0.1814
 5 S   -0.2296   0.06672  -0.01938  -0.07046    0.0261   -0.3305   0.09603
 6 S    -6.929     4.279    -2.643  -0.01833     1.644   -0.5098    0.3149
 7 S     8.046    -4.969     3.068   0.02297    -1.909     1.346   -0.8313
 8 S   -0.1833    0.1997   -0.2175   0.02872    0.2057   -0.2997    0.3265
 9 S    0.1821   0.01979  0.002151   -0.1473  -0.01578   -0.3351  -0.03642
10 S    0.5112    -0.113   0.02499   0.04874   -0.0163    0.5222   -0.1155
11 S   -0.6166    0.5105   -0.4226   0.03714    0.3191    -0.176    0.1457
12 S     1.849    -1.207    0.7877        -0   -0.5141    0.6978   -0.4554
13 S   0.05862   0.01831  0.005717    0.1566   0.05068    0.4522    0.1412
14 S   0.09902   -0.1151    0.1339   0.03095   -0.1916    0.4621   -0.5373
15 S   -0.5295    0.2633   -0.1309  -0.02717   0.07859     -1.09    0.5418
16 S  -0.03893   0.06024  -0.09322         0    0.1442   -0.1053     0.163
17 S         0        -0         0         0         0        -0         0
18 S   0.00899   0.01966   0.04299    -0.131   -0.1925   -0.2144   -0.4688
19 S     0.169    0.1067   0.06735   0.06904    0.0861    0.8287    0.5231
20 S   -0.3061    0.1524   -0.0759  -0.03849   0.05696   -0.1136   0.05657
21 S    0.1959   -0.1307   0.08721   0.01714  -0.06963    0.1449  -0.09666
22 S -0.001294 -0.007472  -0.04315   0.07607    0.1901   0.02604    0.1504
23 S   0.06125  -0.06148   0.06171     0.042   -0.1041    0.1362   -0.1367
24 S   -0.4434  -0.03722 -0.003125  -0.03193 -0.002943   -0.3287  -0.02759
25 S    0.2119    0.2427     0.278    0.1352    0.4732    0.1151    0.1318
26 S   -0.6979   -0.6658   -0.6352   -0.2353   -0.8304   -0.3634   -0.3467
27 S    -1.426  0.005091-1.818e-05   -0.0941  0.000336    -0.364    0.0013
28 S      1.72    0.2581   0.03873    0.2066   0.03681    0.4004   0.06008
29 S    0.4167    0.6544     1.028     0.256     2.016    0.2768    0.4346
30 S   -0.2728   -0.4745   -0.8253   -0.1972    -1.778   -0.2855   -0.4965
31 S   -0.1853   0.06887  -0.02559  -0.09255   0.04391   -0.2258   0.08392
32 S         0        -0         0         0         0        -0         0
      0.005515 -0.003049  0.002183   0.00027   0.08807   0.00384  0.005437

Out[1]:
<rayopt.analysis.Analysis at 0x2910e0685f8>
In [ ]: