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 4123144 Example 8 (Leica Summicron R 50mm f/2)"
columns = "type distance roc diameter material"
# number of surfaces = 11
lensdata = """
O 0.0 0.0 37.622 AIR
S 20 42.71 28.94 1.7343/28.19
S 3.99 195.38 27.06 AIR
S 0.2 20.5 24.02 1.67133/41.64
S 7.18 0 21.49 1.7919/25.55
S 1.29 14.94 18.39 AIR
A 5.35 0 18.059 AIR
S 7.61 -14.94 17.5 1.65222/33.6
S 1 0 19.27 1.79227/47.15
S 5.22 -20.5 20.38 AIR
S 0.2 0 22.96 1.79227/47.15
S 3.69 -42.71 23.97 AIR
I 37.32 0 43.2 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(22.500000)
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: US 4
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 22.5 deg
 Pupil:
   Pupil Distance: 40.2071
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.9059
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -61.3149
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 15.2222
Stop: 6
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     37.622         basic/air   1.000   1.000   89.30
 1 S         20      42.71      28.94                 -   1.734   1.734   28.19
 2 S       3.99      195.4      27.06         basic/air   1.000   1.000   89.30
 3 S        0.2       20.5      24.02                 -   1.671   1.671   41.64
 4 S       7.18        inf      21.49                 -   1.792   1.792   25.55
 5 S       1.29      14.94      18.39         basic/air   1.000   1.000   89.30
 6 S       5.35        inf     18.059         basic/air   1.000   1.000   89.30
 7 S       7.61     -14.94       17.5                 -   1.652   1.652   33.60
 8 S          1        inf      19.27                 -   1.792   1.792   47.15
 9 S       5.22      -20.5      20.38         basic/air   1.000   1.000   89.30
10 S        0.2        inf      22.96                 -   1.792   1.792   47.15
11 S       3.69     -42.71      23.97         basic/air   1.000   1.000   89.30
12 S      37.32        inf       43.2         basic/air   1.000   1.000   89.30

System: US 4
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 22.5 deg
 Pupil:
   Pupil Distance: 40.2071
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.9059
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -61.3149
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 15.2222
Stop: 6
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     37.622         basic/air   1.000   1.000   89.30
 1 S         20      42.71      28.94                 -   1.734   1.734   28.19
 2 S       3.99      195.4      27.06         basic/air   1.000   1.000   89.30
 3 S        0.2       20.5      24.02                 -   1.671   1.671   41.64
 4 S       7.18        inf      21.49                 -   1.792   1.792   25.55
 5 S       1.29      14.94      18.39         basic/air   1.000   1.000   89.30
 6 S       5.35        inf     18.059         basic/air   1.000   1.000   89.30
 7 S       7.61     -14.94       17.5                 -   1.652   1.652   33.60
 8 S          1        inf      19.27                 -   1.792   1.792   47.15
 9 S       5.22      -20.5      20.38         basic/air   1.000   1.000   89.30
10 S        0.2        inf      22.96                 -   1.792   1.792   47.15
11 S       3.69     -42.71      23.97         basic/air   1.000   1.000   89.30
12 S     37.304        inf       43.2         basic/air   1.000   1.000   89.30

lagrange: -5.5124
track length: 35.73
object, image height: [17.1685 22.1976]
front, back focal length (from PP): [-52.0483  52.0483]
entry, exit pupil height: [12.9059 15.2222]
entry, exit pupil distance: [ 20.2071 -23.9949]
front, back focal distance: [-23.9146  37.3844]
front, back principal distance: [ 28.1337 -14.6639]
front, back nodal distance: [ 28.1337 -14.6639]
front, back numerical aperture: [0.     0.2407]
front, back f number: [2.0165 1.7096]
front, back working f number: [   inf 2.0775]
front, back airy radius: [   inf 0.0015]
transverse, angular magnification: [-0.      0.8478]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     12.91         0    -17.17    0.4271
 1 S        20     1.734     12.91   -0.2218    -8.628    0.5754
 2 S     23.99         1      12.4   -0.1752    -7.305     0.548
 3 S     24.19     1.671     12.36   -0.5798    -7.195    0.7835
 4 S     31.37     1.792      9.87   -0.5798    -3.829    0.7835
 5 S     32.66         1     9.452  -0.07901    -3.265    0.6105
 6 S     38.01         1      9.03  -0.07901-3.243e-15    0.6105
 7 S     45.62     1.652     8.428    0.2888     4.644    0.8132
 8 S     46.62     1.792     8.603    0.2888     5.137    0.8132
 9 S     51.84         1     9.444  -0.07609     7.505    0.5232
10 S     52.04     1.792     9.429  -0.07609      7.61    0.5232
11 S     55.73         1     9.272    -0.248     8.687    0.3621
12 S     93.05         1   0.01855    -0.248      22.2    0.3621

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S   -0.1751   -0.1303  -0.09704   -0.6061   -0.5235   -0.2359   -0.1757
 2 S  -0.03161    0.1444   -0.6597    0.1325     2.408  -0.08378    0.3827
 3 S   -0.1478  -0.06803   -0.0313    -1.198   -0.5656   -0.2054   -0.0945
 4 S    0.1804   -0.2437    0.3293        -0   -0.4449    0.1763   -0.2382
 5 S    0.5932    0.4197     0.297     1.809      1.49    0.3646    0.2579
 6 S         0         0         0         0         0        -0         0
 7 S     1.298   -0.6041    0.2813     1.615   -0.8831    0.2565   -0.1194
 8 S  -0.02295  -0.06462    -0.182        -0   -0.5124   0.02374   0.06686
 9 S   -0.9096     0.266  -0.07779    -1.318    0.4083   -0.1914   0.05597
10 S  0.005754  -0.03957    0.2721        -0    -1.871   0.02708   -0.1862
11 S   -0.9058     0.309   -0.1054   -0.6328    0.2518   -0.1628   0.05553
12 S         0        -0         0         0         0        -0         0
        -0.116  -0.01126   0.02649   -0.1988   -0.2426  -0.03112  0.005013

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