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 = "JP2020-012952 Example 1"
columns = "type distance roc diameter material"
# number of surfaces = 29
lensdata = """
O 0.0 0.0 90.831 AIR
S 20 111.7037 69.87 1.7725/49.62
S 5.5478 514.0093 69.87 AIR
S 0.15 191.8963 65.47 1.437/95.1
S 1.5 30.2492 49 AIR
S 12.0599 423.9805 51.84 1.437/95.1
S 1.5 50.8216 45.9 AIR
S 13.2984 -38.1791 45.9 1.64769/33.84
S 1.5 172.544 53.69 1.83481/42.72
S 9.3857 -56.304 53.69 AIR
S 0.15 -1641.6822 51.59 1.55032/75.5
S 12.4672 -32.7021 51.59 1.60342/38.01
S 1.5 246.8799 52.48 AIR
S 0.15 83.2754 51.07 1.7725/49.62
S 5.882 -377.0503 51.07 AIR
S 8.7665 90.4416 51.07 1.92286/20.88
S 5.3037 -527.4885 51.07 AIR
S 0.15 55.6364 46.89 1.59282/68.63
S 11.866 -44.6058 46.89 1.58144/40.89
S 2.482 39.3845 36.5 AIR
A 7.3907 0 33.213 AIR
S 1.5 84.0231 34.22 1.437/95.1
S 6.8887 -32.202 34.22 1.64769/33.84
S 1.5 66.2242 29.25 AIR
S 7.8613 -26.9856 29.25 1.62588/35.74
S 1.5 -121.029 32.74 AIR
S 0.15 64.6922 34.35 1.59282/68.63
S 6.7685 -40.8255 34.35 AIR
S 0.15 -430.037 34.08 1.85135/40.1
S 4.6315 -54.9865 34.08 AIR
I 39.0002 0 43.26 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(27.935000)
s[28].conic = 0
s[28].aspherics = [0, -2.73662e-06, 3.07519e-09, 3.90515e-11, -1.94154e-14, 0, 0]
s[29].conic = 0
s[29].aspherics = [0, 3.26804e-06, 3.98767e-09, 3.58258e-11, 0, 0, 0]
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: JP2020-012952 Example 1
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 27.9 deg
 Pupil:
   Pupil Distance: 70.7633
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 14.6921
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -84.6264
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 30.1627
Stop: 20
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     90.831         basic/air   1.000   1.000   89.30
 1 S         20      111.7      69.87                 -   1.772   1.772   49.62
 2 S     5.5478        514      69.87         basic/air   1.000   1.000   89.30
 3 S       0.15      191.9      65.47                 -   1.437   1.437   95.10
 4 S        1.5      30.25         49         basic/air   1.000   1.000   89.30
 5 S      12.06        424      51.84                 -   1.437   1.437   95.10
 6 S        1.5      50.82       45.9         basic/air   1.000   1.000   89.30
 7 S     13.298     -38.18       45.9                 -   1.648   1.648   33.84
 8 S        1.5      172.5      53.69                 -   1.835   1.835   42.72
 9 S     9.3857      -56.3      53.69         basic/air   1.000   1.000   89.30
10 S       0.15      -1642      51.59                 -   1.550   1.550   75.50
11 S     12.467      -32.7      51.59                 -   1.603   1.603   38.01
12 S        1.5      246.9      52.48         basic/air   1.000   1.000   89.30
13 S       0.15      83.28      51.07                 -   1.772   1.772   49.62
14 S      5.882     -377.1      51.07         basic/air   1.000   1.000   89.30
15 S     8.7665      90.44      51.07                 -   1.923   1.923   20.88
16 S     5.3037     -527.5      51.07         basic/air   1.000   1.000   89.30
17 S       0.15      55.64      46.89                 -   1.593   1.593   68.63
18 S     11.866     -44.61      46.89                 -   1.581   1.581   40.89
19 S      2.482      39.38       36.5         basic/air   1.000   1.000   89.30
20 S     7.3907        inf     33.213         basic/air   1.000   1.000   89.30
21 S        1.5      84.02      34.22                 -   1.437   1.437   95.10
22 S     6.8887      -32.2      34.22                 -   1.648   1.648   33.84
23 S        1.5      66.22      29.25         basic/air   1.000   1.000   89.30
24 S     7.8613     -26.99      29.25                 -   1.626   1.626   35.74
25 S        1.5       -121      32.74         basic/air   1.000   1.000   89.30
26 S       0.15      64.69      34.35                 -   1.593   1.593   68.63
27 S     6.7685     -40.83      34.35         basic/air   1.000   1.000   89.30
28 S       0.15       -430      34.08                 -   1.851   1.851   40.10
29 S     4.6315     -54.99      34.08         basic/air   1.000   1.000   89.30
30 S         39        inf      43.26         basic/air   1.000   1.000   89.30

System: JP2020-012952 Example 1
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 27.9 deg
 Pupil:
   Pupil Distance: 70.7633
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 14.6921
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -84.6264
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 30.1627
Stop: 20
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     90.831         basic/air   1.000   1.000   89.30
 1 S         20      111.7      69.87                 -   1.772   1.772   49.62
 2 S     5.5478        514      69.87         basic/air   1.000   1.000   89.30
 3 S       0.15      191.9      65.47                 -   1.437   1.437   95.10
 4 S        1.5      30.25         49         basic/air   1.000   1.000   89.30
 5 S      12.06        424      51.84                 -   1.437   1.437   95.10
 6 S        1.5      50.82       45.9         basic/air   1.000   1.000   89.30
 7 S     13.298     -38.18       45.9                 -   1.648   1.648   33.84
 8 S        1.5      172.5      53.69                 -   1.835   1.835   42.72
 9 S     9.3857      -56.3      53.69         basic/air   1.000   1.000   89.30
10 S       0.15      -1642      51.59                 -   1.550   1.550   75.50
11 S     12.467      -32.7      51.59                 -   1.603   1.603   38.01
12 S        1.5      246.9      52.48         basic/air   1.000   1.000   89.30
13 S       0.15      83.28      51.07                 -   1.772   1.772   49.62
14 S      5.882     -377.1      51.07         basic/air   1.000   1.000   89.30
15 S     8.7665      90.44      51.07                 -   1.923   1.923   20.88
16 S     5.3037     -527.5      51.07         basic/air   1.000   1.000   89.30
17 S       0.15      55.64      46.89                 -   1.593   1.593   68.63
18 S     11.866     -44.61      46.89                 -   1.581   1.581   40.89
19 S      2.482      39.38       36.5         basic/air   1.000   1.000   89.30
20 S     7.3907        inf     33.213         basic/air   1.000   1.000   89.30
21 S        1.5      84.02      34.22                 -   1.437   1.437   95.10
22 S     6.8887      -32.2      34.22                 -   1.648   1.648   33.84
23 S        1.5      66.22      29.25         basic/air   1.000   1.000   89.30
24 S     7.8613     -26.99      29.25                 -   1.626   1.626   35.74
25 S        1.5       -121      32.74         basic/air   1.000   1.000   89.30
26 S       0.15      64.69      34.35                 -   1.593   1.593   68.63
27 S     6.7685     -40.83      34.35         basic/air   1.000   1.000   89.30
28 S       0.15       -430      34.08                 -   1.851   1.851   40.10
29 S     4.6315     -54.99      34.08         basic/air   1.000   1.000   89.30
30 S     39.053        inf      43.26         basic/air   1.000   1.000   89.30

lagrange: -8.2067
track length: 132
object, image height: [39.5162 23.0189]
front, back focal length (from PP): [-41.2387  41.2387]
entry, exit pupil height: [14.6921 30.1627]
entry, exit pupil distance: [ 50.7633 -45.6262]
front, back focal distance: [30.6678 39.0259]
front, back principal distance: [71.9064 -2.2128]
front, back nodal distance: [71.9064 -2.2128]
front, back numerical aperture: [0.     0.3357]
front, back f number: [1.4034 0.6836]
front, back working f number: [   inf 1.4898]
front, back airy radius: [   inf 0.0011]
transverse, angular magnification: [-0.      0.4871]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     14.69         0    -39.52    0.5586
 1 S        20     1.772     14.69   -0.1016    -28.35    0.7546
 2 S     25.55         1     14.37  -0.07997    -25.99    0.7155
 3 S      25.7     1.437     14.36   -0.1127    -25.88    0.7744
 4 S      27.2         1     14.24     0.093    -25.07    0.4125
 5 S     39.26     1.437     15.37   0.07717     -20.1    0.4332
 6 S     40.76         1     15.45    0.2099    -19.65    0.2643
 7 S     54.06     1.648     18.24    0.5192    -16.13 -0.009196
 8 S     55.56     1.835     18.71    0.4989    -16.14  0.008306
 9 S     64.94         1     21.26    0.1837     -16.1    0.2469
10 S     65.09      1.55     21.29    0.1909    -16.06    0.2415
11 S     77.56     1.603     22.82    0.2279    -14.12    0.2186
12 S     79.06         1     23.04    0.2842    -13.91    0.1846
13 S     79.21     1.772     23.08   0.07018    -13.89    0.3134
14 S     85.09         1     23.31   0.02244    -12.85    0.3397
15 S     93.86     1.923     23.51   -0.2174    -9.869    0.4403
16 S     99.16         1     22.91   -0.2574    -8.654    0.4555
17 S     99.31     1.593     22.87    -0.501    -8.586    0.5469
18 S     111.2     1.581     19.14   -0.5059    -4.512    0.5481
19 S     113.7         1     18.34   -0.2352    -3.651    0.4942
20 S       121         1     16.61   -0.2352 7.053e-15    0.4942
21 S     122.5     1.437     16.25   -0.3197    0.7411    0.4903
22 S     129.4     1.648     14.72   -0.2234     3.092    0.5106
23 S     130.9         1     14.52  -0.08146     3.556    0.5453
24 S     138.8     1.626     13.88    0.2403     7.842    0.7271
25 S     140.3         1      14.1    0.1674     8.513    0.6831
26 S     140.4     1.593     14.12   0.03802     8.616    0.6042
27 S     147.2         1     14.29   -0.1693     11.18    0.4419
28 S     147.4     1.851     14.26   -0.1411     11.25    0.4642
29 S       152         1     13.91   -0.3564     12.41    0.2721
30 S       191         1     0.013   -0.3564     23.02    0.2721

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S  -0.01153  -0.02671  -0.06186   -0.3683   -0.9963  -0.04762   -0.1103
 2 S -0.002595   0.03318   -0.4243   0.08004     4.402  -0.01841    0.2354
 3 S 1.334e-05 -0.001516    0.1723   -0.1495    -2.583 0.0006575  -0.07472
 4 S    0.9374   -0.6923    0.5113    0.9487    -1.078   0.07199  -0.05317
 5 S  -0.02001   -0.0565   -0.1596  -0.06769   -0.6419   -0.0178  -0.05026
 6 S    0.9865   -0.2348   0.05588    0.5647   -0.1477   0.07113  -0.01693
 7 S  -0.03407   0.08737   -0.2241    0.9718    -1.917    0.1591   -0.4081
 8 S   -0.5499    0.1287  -0.03012  -0.03388   0.01498   0.03537 -0.008277
 9 S   0.03977   -0.1092    0.3001   -0.7628     1.271   -0.1232    0.3383
10 S  -0.09072   -0.1364    -0.205   0.02041   -0.2775  -0.04791  -0.07201
11 S    0.2349   -0.2401    0.2454    0.0617   -0.3139    0.2966   -0.3032
12 S    0.8998    0.3056    0.1038    0.1439   0.08412    0.2415   0.08201
13 S     -2.67   -0.0847 -0.002687    -0.494  -0.01576   -0.3191  -0.01012
14 S 4.302e-06-4.079e-05 0.0003869   -0.1091     1.031  -0.02263    0.2146
15 S   -0.2136   -0.1743   -0.1423   -0.5009    -0.525    -0.428   -0.3493
16 S   -0.5774    0.9056     -1.42  -0.08589     2.362   -0.4444    0.6969
17 S   0.04536   0.08883     0.174   -0.6314   -0.8958  -0.05346   -0.1047
18 S   -0.1809    0.1081  -0.06465 -0.009567   0.04436    0.2269   -0.1356
19 S  -0.04491  -0.07815    -0.136    0.8811     1.297    0.1067    0.1857
20 S         0        -0         0         0         0        -0         0
21 S  0.003185   -0.0384    0.4629   -0.3415    -1.464  0.006076  -0.07326
22 S     1.428   -0.5154     0.186     0.261   -0.1613    0.3395   -0.1225
23 S 0.0003365  0.001463  0.006357    0.5603     2.463   0.06518    0.2833
24 S     1.191   -0.5088    0.2174     1.346   -0.6683    0.2497   -0.1067
25 S  0.003908   0.04708    0.5673   -0.3002     3.218   0.02166    0.2609
26 S    -0.449   -0.9502    -2.011    -0.543    -5.404  -0.08284   -0.1753
27 S   -0.9956    0.3219   -0.1041   -0.8604    0.3118   -0.1128   0.03647
28 S     1.186    0.6369     1.115    0.1009   -0.5856   0.09286   -0.1906
29 S    -1.114     1.215    0.9165   -0.7895    0.8906   -0.2725   0.02071
30 S         0        -0         0         0         0        -0         0
      0.001721   0.03228   0.04931   -0.1068   -0.2864 -0.005707  -0.01084

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