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 = "US 7,411,745 Example 3 (Nikkor 200mm F2 AFS)"
columns = "type distance roc diameter material"
# number of surfaces = 23
lensdata = """
O 0.0 0.0 138.788 AIR
S 20 104.204 106.76 1.49782/82.6
S 20 -630.89 106.76 AIR
S 0.3 88.701 95.76 1.49782/82.6
S 21 -270.095 93.7 1.7481/52.3
S 4 128.345 83.98 AIR
S 15.39 71.441 73.74 1.44679/91
S 8 174.32 73.74 AIR
S 1 74.005 67.86 1.7481/52.3
S 3 34.121 58.04 1.49782/82.6
S 15 126.546 58.04 AIR
S 5.5 -957.711 50.24 1.80454/39.6
S 4.8 -100.138 48.64 1.51454/54.6
S 3 55.554 42.24 AIR
S 8 -109.151 41.42 1.80384/33.9
S 6 -51.923 40.82 1.6228/57
S 3 54.98 37.54 AIR
A 15.5239 0 36.68 AIR
S 1.2 111.154 37.94 1.7481/52.3
S 4.5 -121.699 37.94 AIR
S 2.7 -49.128 37.94 1.72825/38.5
S 3 -104.898 37.94 AIR
S 8 413.276 39.74 1.64/60.1
S 5 -69.215 39.74 AIR
I 59.4575 0 43.2 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(6.310000)
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: US 7,411,745 Example 3 (Nikkor 200mm F2 AFS)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 6.31 deg
 Pupil:
   Pupil Distance: 422.588
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 53.2491
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -83.4366
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 22.8361
Stop: 17
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     138.79         basic/air   1.000   1.000   89.30
 1 S         20      104.2     106.76                 -   1.498   1.498   82.60
 2 S         20     -630.9     106.76         basic/air   1.000   1.000   89.30
 3 S        0.3       88.7      95.76                 -   1.498   1.498   82.60
 4 S         21     -270.1       93.7                 -   1.748   1.748   52.30
 5 S          4      128.3      83.98         basic/air   1.000   1.000   89.30
 6 S      15.39      71.44      73.74                 -   1.447   1.447   91.00
 7 S          8      174.3      73.74         basic/air   1.000   1.000   89.30
 8 S          1         74      67.86                 -   1.748   1.748   52.30
 9 S          3      34.12      58.04                 -   1.498   1.498   82.60
10 S         15      126.5      58.04         basic/air   1.000   1.000   89.30
11 S        5.5     -957.7      50.24                 -   1.805   1.805   39.60
12 S        4.8     -100.1      48.64                 -   1.515   1.515   54.60
13 S          3      55.55      42.24         basic/air   1.000   1.000   89.30
14 S          8     -109.2      41.42                 -   1.804   1.804   33.90
15 S          6     -51.92      40.82                 -   1.623   1.623   57.00
16 S          3      54.98      37.54         basic/air   1.000   1.000   89.30
17 S     15.524        inf      36.68         basic/air   1.000   1.000   89.30
18 S        1.2      111.2      37.94                 -   1.748   1.748   52.30
19 S        4.5     -121.7      37.94         basic/air   1.000   1.000   89.30
20 S        2.7     -49.13      37.94                 -   1.728   1.728   38.50
21 S          3     -104.9      37.94         basic/air   1.000   1.000   89.30
22 S          8      413.3      39.74                 -   1.640   1.640   60.10
23 S          5     -69.22      39.74         basic/air   1.000   1.000   89.30
24 S     59.458        inf       43.2         basic/air   1.000   1.000   89.30

System: US 7,411,745 Example 3 (Nikkor 200mm F2 AFS)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 6.31 deg
 Pupil:
   Pupil Distance: 422.588
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 53.2491
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -83.4366
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 22.8361
Stop: 17
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     138.79         basic/air   1.000   1.000   89.30
 1 S         20      104.2     106.76                 -   1.498   1.498   82.60
 2 S         20     -630.9     106.76         basic/air   1.000   1.000   89.30
 3 S        0.3       88.7      95.76                 -   1.498   1.498   82.60
 4 S         21     -270.1       93.7                 -   1.748   1.748   52.30
 5 S          4      128.3      83.98         basic/air   1.000   1.000   89.30
 6 S      15.39      71.44      73.74                 -   1.447   1.447   91.00
 7 S          8      174.3      73.74         basic/air   1.000   1.000   89.30
 8 S          1         74      67.86                 -   1.748   1.748   52.30
 9 S          3      34.12      58.04                 -   1.498   1.498   82.60
10 S         15      126.5      58.04         basic/air   1.000   1.000   89.30
11 S        5.5     -957.7      50.24                 -   1.805   1.805   39.60
12 S        4.8     -100.1      48.64                 -   1.515   1.515   54.60
13 S          3      55.55      42.24         basic/air   1.000   1.000   89.30
14 S          8     -109.2      41.42                 -   1.804   1.804   33.90
15 S          6     -51.92      40.82                 -   1.623   1.623   57.00
16 S          3      54.98      37.54         basic/air   1.000   1.000   89.30
17 S     15.524        inf      36.68         basic/air   1.000   1.000   89.30
18 S        1.2      111.2      37.94                 -   1.748   1.748   52.30
19 S        4.5     -121.7      37.94         basic/air   1.000   1.000   89.30
20 S        2.7     -49.13      37.94                 -   1.728   1.728   38.50
21 S          3     -104.9      37.94         basic/air   1.000   1.000   89.30
22 S          8      413.3      39.74                 -   1.640   1.640   60.10
23 S          5     -69.22      39.74         basic/air   1.000   1.000   89.30
24 S     59.716        inf       43.2         basic/air   1.000   1.000   89.30

lagrange: -5.9019
track length: 157.91
object, image height: [46.8245 21.5577]
front, back focal length (from PP): [-195.1171  195.1171]
entry, exit pupil height: [53.2491 22.8361]
entry, exit pupil distance: [402.5876 -23.9791]
front, back focal distance: [-52.3702  59.6813]
front, back principal distance: [ 142.7469 -135.4358]
front, back nodal distance: [ 142.7469 -135.4358]
front, back numerical aperture: [0.     0.2634]
front, back f number: [1.8321 4.2721]
front, back working f number: [   inf 1.8991]
front, back airy radius: [   inf 0.0014]
transverse, angular magnification: [-0.      2.3318]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     53.25         0    -46.82    0.1108
 1 S        20     1.498     53.25   -0.2542    -44.61    0.3238
 2 S        40         1     49.85   -0.2936    -40.28    0.3556
 3 S      40.3     1.498     49.77   -0.5727    -40.18     0.581
 4 S      61.3     1.748     41.74    -0.534    -32.03    0.5513
 5 S      65.3         1     40.51    -0.298    -30.77     0.372
 6 S     80.69     1.447     35.93   -0.5225    -25.05    0.5285
 7 S     88.69         1     33.04   -0.4379    -22.13    0.4719
 8 S     89.69     1.748      32.6   -0.7674    -21.65    0.6907
 9 S     92.69     1.498     31.29   -0.5379    -20.47    0.5405
10 S     107.7         1      25.9    -0.436    -15.05    0.4813
11 S     113.2     1.805      23.5   -0.4163    -12.41    0.4709
12 S       118     1.515     22.39   -0.4812    -11.16    0.5032
13 S       121         1     21.44   -0.2827    -10.16    0.4092
14 S       129     1.804     19.18   -0.1415    -6.886    0.3585
15 S       135     1.623     18.71   -0.2067    -5.694    0.3784
16 S       138         1     18.33 0.0008017    -4.994    0.3218
17 S     153.5         1     18.34 0.0008017 6.186e-15    0.3218
18 S     154.7     1.748     18.34   -0.1226    0.3861    0.3192
19 S     159.2         1     18.03   -0.2334     1.208    0.3118
20 S     161.9     1.728      17.4   0.02441     2.049    0.3422
21 S     164.9         1     17.44  -0.09661     2.643    0.3238
22 S     172.9      1.64     16.67   -0.1224     5.233    0.3157
23 S     177.9         1     16.29    -0.273     6.196    0.2584
24 S     237.4         1   0.06559    -0.273     21.56    0.2584

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S     -2.88     1.788     -1.11   -0.2027    0.8151      -0.4    0.2484
 2 S    -2.276     2.563    -2.885  -0.03349     3.285   -0.2728    0.3071
 3 S    0.2482   -0.0904   0.03293   -0.2382   0.07476   -0.1956   0.07125
 4 S     3.969    -3.744     3.532   0.02251    -3.353    0.5099    -0.481
 5 S -0.002879   -0.0214    -0.159     0.212    0.3934   0.02152      0.16
 6 S     0.133    0.0138  0.001432   -0.2747  -0.02836  -0.09126  -0.00947
 7 S   -0.6996    0.9718     -1.35    0.1126     1.718   -0.1016    0.1411
 8 S 8.468e-05  0.005496    0.3567   -0.3676   -0.7112  -0.00269   -0.1745
 9 S    0.4531   -0.1941   0.08316    0.1782    -0.112    0.3971   -0.1701
10 S   -0.4963    0.7773    -1.218    0.1669     1.646  -0.08799    0.1378
11 S     2.804    -3.009      3.23    0.0296    -3.498     0.445   -0.4776
12 S    -2.252     1.846    -1.513  -0.06741     1.295   -0.3378    0.2768
13 S  -0.03045  -0.06665   -0.1459    0.3887    0.5315   0.05035    0.1102
14 S      1.76    -1.813     1.868    0.2596    -2.192    0.4221   -0.4349
15 S   -0.7495    0.5268   -0.3703  -0.07577    0.3135   -0.3468    0.2438
16 S    0.2965    0.2049    0.1416    0.4437    0.4044    0.1506     0.104
17 S        -0        -0        -0         0         0         0         0
18 S   -0.0377  -0.07394    -0.145   -0.2448   -0.7645  -0.09088   -0.1782
19 S   -0.9253    0.7321   -0.5793   -0.2236    0.6352   -0.2055    0.1626
20 S     2.647    -1.217    0.5593    0.5453   -0.5077    0.4085   -0.1878
21 S   -0.2305    0.2618   -0.2974   -0.2554    0.6278   -0.1832    0.2081
22 S  0.004919  -0.02942    0.1759  -0.06003   -0.6928   0.02223   -0.1329
23 S    -1.749    0.5809    -0.193   -0.3584    0.1832   -0.1964   0.06524
24 S         0        -0         0         0         0        -0         0
      -0.01215   0.01153   0.01573  -0.04295   0.06423   -0.0853  -0.01003

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