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 4396256 Example 1"
columns = "type distance roc diameter material"
# number of surfaces = 13
lensdata = """
O 0.0 0.0 79.027 AIR
S 20 66.436 60.79 1.77279/49.4
S 7.497 346.596 60.79 AIR
S 1.496 37.128 52.91 1.6968/55.6
S 9.6985 96.5005 51.06 AIR
S 1.496 167.28 51.06 1.7847/26.1
S 6.5025 -120.003 51.06 1.7552/27.5
S 2.7965 23.6385 36.26 AIR
A 11.799 0 34.244 AIR
S 7.7 -31.4075 35.14 1.58144/40.8
S 1.496 79.8065 38.8 1.74443/49.4
S 8.704 -39.8055 38.8 AIR
S 0.3995 106.004 34.04 1.74443/49.4
S 4.8025 -322.405 32.9 AIR
I 42.6275 0 43.2 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(14.250000)
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: 14.3 deg
 Pupil:
   Pupil Distance: 82.0841
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 30.8103
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -66.1885
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 24.0035
Stop: 8
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     79.027         basic/air   1.000   1.000   89.30
 1 S         20      66.44      60.79                 -   1.773   1.773   49.40
 2 S      7.497      346.6      60.79         basic/air   1.000   1.000   89.30
 3 S      1.496      37.13      52.91                 -   1.697   1.697   55.60
 4 S     9.6985       96.5      51.06         basic/air   1.000   1.000   89.30
 5 S      1.496      167.3      51.06                 -   1.785   1.785   26.10
 6 S     6.5025       -120      51.06                 -   1.755   1.755   27.50
 7 S     2.7965      23.64      36.26         basic/air   1.000   1.000   89.30
 8 S     11.799        inf     34.244         basic/air   1.000   1.000   89.30
 9 S        7.7     -31.41      35.14                 -   1.581   1.581   40.80
10 S      1.496      79.81       38.8                 -   1.744   1.744   49.40
11 S      8.704     -39.81       38.8         basic/air   1.000   1.000   89.30
12 S     0.3995        106      34.04                 -   1.744   1.744   49.40
13 S     4.8025     -322.4       32.9         basic/air   1.000   1.000   89.30
14 S     42.627        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: 14.3 deg
 Pupil:
   Pupil Distance: 82.0841
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 30.8103
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -66.1885
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 24.0035
Stop: 8
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     79.027         basic/air   1.000   1.000   89.30
 1 S         20      66.44      60.79                 -   1.773   1.773   49.40
 2 S      7.497      346.6      60.79         basic/air   1.000   1.000   89.30
 3 S      1.496      37.13      52.91                 -   1.697   1.697   55.60
 4 S     9.6985       96.5      51.06         basic/air   1.000   1.000   89.30
 5 S      1.496      167.3      51.06                 -   1.785   1.785   26.10
 6 S     6.5025       -120      51.06                 -   1.755   1.755   27.50
 7 S     2.7965      23.64      36.26         basic/air   1.000   1.000   89.30
 8 S     11.799        inf     34.244         basic/air   1.000   1.000   89.30
 9 S        7.7     -31.41      35.14                 -   1.581   1.581   40.80
10 S      1.496      79.81       38.8                 -   1.744   1.744   49.40
11 S      8.704     -39.81       38.8         basic/air   1.000   1.000   89.30
12 S     0.3995        106      34.04                 -   1.744   1.744   49.40
13 S     4.8025     -322.4       32.9         basic/air   1.000   1.000   89.30
14 S      42.65        inf       43.2         basic/air   1.000   1.000   89.30

lagrange: -7.9136
track length: 64.387
object, image height: [21.0774 21.8153]
front, back focal length (from PP): [-85.0567  85.0567]
entry, exit pupil height: [30.8103 24.0035]
entry, exit pupil distance: [ 62.0841 -23.561 ]
front, back focal distance: [-47.0795  42.6927]
front, back principal distance: [ 37.9772 -42.364 ]
front, back nodal distance: [ 37.9772 -42.364 ]
front, back numerical aperture: [0.     0.3407]
front, back f number: [1.3803 1.7718]
front, back working f number: [   inf 1.4681]
front, back airy radius: [   inf 0.0011]
transverse, angular magnification: [-0.      1.2836]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     30.81         0    -21.08    0.2568
 1 S        20     1.773     30.81   -0.3583    -15.94    0.4422
 2 S      27.5         1      29.3    -0.293    -14.07    0.4109
 3 S     28.99     1.697     28.86   -0.8343    -13.46    0.6633
 4 S     38.69         1     24.09   -0.6605    -9.666    0.5935
 5 S     40.19     1.785      23.1   -0.7688    -8.778    0.6347
 6 S     46.69     1.755      20.3   -0.7738    -6.466    0.6363
 7 S     49.49         1     19.07   -0.1649    -5.452    0.4622
 8 S     61.29         1     17.12   -0.1649  -4.3e-15    0.4622
 9 S     68.99     1.581     15.85    0.1285     3.558     0.528
10 S     70.48     1.744     15.97   0.09586     4.057    0.5197
11 S     79.19         1     16.45   -0.2117     6.651    0.3954
12 S     79.58     1.744     16.37   -0.3266     6.809    0.3476
13 S     84.39         1     15.47   -0.3623     7.766    0.3297
14 S       127         1   0.02791   -0.3623     21.82    0.3297

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S    -1.042  -0.03778  -0.00137    -0.566  -0.02058   -0.3477  -0.01261
 2 S   -0.3136    0.5571   -0.9897    0.1085     1.565   -0.1485    0.2638
 3 S   0.02818   0.00281 0.0002801   -0.9541  -0.09509   -0.2845  -0.02837
 4 S    -2.075     2.492    -2.993    0.3671     3.153   -0.2014    0.2419
 5 S     3.637    -3.768     3.903   -0.2267    -3.808    0.5602   -0.5803
 6 S   -0.3144    0.2146   -0.1465 -0.006774    0.1046   -0.0719   0.04908
 7 S    0.9357    0.3374    0.1217      1.57    0.6101    0.5278    0.1903
 8 S         0         0         0         0         0        -0         0
 9 S     2.119    -1.104    0.5748      1.01   -0.8254    0.2637   -0.1373
10 S  -0.08666   -0.1185    -0.162   -0.0639   -0.3088  0.007306  0.009988
11 S    -2.155    0.7868   -0.2873   -0.9248    0.4426   -0.2449   0.08941
12 S  0.007715  -0.06192     0.497   -0.3473    -1.202   0.02231   -0.1791
13 S   -0.9147    0.6812   -0.5073   -0.1142    0.4629   -0.1511    0.1125
14 S         0        -0         0         0         0        -0         0
       -0.1728  -0.01798   0.01001   -0.1483   0.07916  -0.06858   0.01921

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