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 4"
columns = "type distance roc diameter material"
# number of surfaces = 11
lensdata = """
O 0.0 0.0 47.762 AIR
S 20 55.012 36.74 1.50032/81.9
S 6.389 -78.244 36.74 AIR
S 1.167 -76.698 36.4 1.7495/35
S 2.056 207.222 36.4 AIR
S 3.5 43.208 34.14 1.65844/50.8
S 5.111 133.333 34.14 AIR
A 27.339 0 19.854 AIR
S 23.161 -19.722 17.06 1.51454/54.6
S 1 -305.556 17.06 AIR
S 0.278 122.222 17.16 1.79668/45.4
S 2.778 -90.107 17.16 AIR
I 0 0 24 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(6.800000)
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: 6.8 deg
 Pupil:
   Pupil Distance: 93.148
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 18.5271
Image:
 Radius: 12
 Update Radius: True
 Pupil:
   Pupil Distance: -23.0168
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 8.51813
Stop: 7
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     47.762         basic/air   1.000   1.000   89.30
 1 S         20      55.01      36.74                 -   1.500   1.500   81.90
 2 S      6.389     -78.24      36.74         basic/air   1.000   1.000   89.30
 3 S      1.167      -76.7       36.4                 -   1.750   1.750   35.00
 4 S      2.056      207.2       36.4         basic/air   1.000   1.000   89.30
 5 S        3.5      43.21      34.14                 -   1.658   1.658   50.80
 6 S      5.111      133.3      34.14         basic/air   1.000   1.000   89.30
 7 S     27.339        inf     19.854         basic/air   1.000   1.000   89.30
 8 S     23.161     -19.72      17.06                 -   1.515   1.515   54.60
 9 S          1     -305.6      17.06         basic/air   1.000   1.000   89.30
10 S      0.278      122.2      17.16                 -   1.797   1.797   45.40
11 S      2.778     -90.11      17.16         basic/air   1.000   1.000   89.30
12 S          0        inf         24         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: 6.8 deg
 Pupil:
   Pupil Distance: 93.148
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 18.5271
Image:
 Radius: 12
 Update Radius: True
 Pupil:
   Pupil Distance: -23.0168
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 8.51813
Stop: 7
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     47.762         basic/air   1.000   1.000   89.30
 1 S         20      55.01      36.74                 -   1.500   1.500   81.90
 2 S      6.389     -78.24      36.74         basic/air   1.000   1.000   89.30
 3 S      1.167      -76.7       36.4                 -   1.750   1.750   35.00
 4 S      2.056      207.2       36.4         basic/air   1.000   1.000   89.30
 5 S        3.5      43.21      34.14                 -   1.658   1.658   50.80
 6 S      5.111      133.3      34.14         basic/air   1.000   1.000   89.30
 7 S     27.339        inf     19.854         basic/air   1.000   1.000   89.30
 8 S     23.161     -19.72      17.06                 -   1.515   1.515   54.60
 9 S          1     -305.6      17.06         basic/air   1.000   1.000   89.30
10 S      0.278      122.2      17.16                 -   1.797   1.797   45.40
11 S      2.778     -90.11      17.16         basic/air   1.000   1.000   89.30
12 S     22.995        inf         24         basic/air   1.000   1.000   89.30

lagrange: -2.2151
track length: 72.779
object, image height: [11.1337  5.9838]
front, back focal length (from PP): [-100.1418  100.1418]
entry, exit pupil height: [18.5271  8.5181]
entry, exit pupil distance: [ 73.148  -23.0168]
front, back focal distance: [-144.6223   23.0186]
front, back principal distance: [-44.4806 -77.1232]
front, back nodal distance: [-44.4806 -77.1232]
front, back numerical aperture: [0.    0.182]
front, back f number: [2.7026 5.8782]
front, back working f number: [   inf 2.7484]
front, back airy radius: [  inf 0.002]
transverse, angular magnification: [-0.     2.175]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     18.53         0    -11.13    0.1196
 1 S        20       1.5     18.53   -0.1684    -8.743     0.199
 2 S     26.39         1     17.81   -0.2822    -7.896    0.2495
 3 S     27.56      1.75     17.48   -0.1115    -7.605    0.1752
 4 S     29.61         1     17.35  -0.04874    -7.399    0.1485
 5 S     33.11     1.658     17.18   -0.3104    -6.879    0.2532
 6 S     38.22         1     16.22   -0.2303    -6.099    0.2231
 7 S     65.56         1     9.927   -0.2303-3.293e-15    0.2231
 8 S     88.72     1.515     4.594   -0.1106     5.167    0.3579
 9 S     89.72         1     4.521   -0.1182     5.403    0.3488
10 S        90     1.797     4.488   -0.1474       5.5    0.3129
11 S     92.78         1      4.26   -0.1851     5.984      0.26
12 S     92.78         1      4.26   -0.1851     5.984      0.26

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S   -0.2125   0.02486 -0.002909  -0.04014  0.005037  -0.06865  0.008032
 2 S    -1.296    0.8909   -0.6122  -0.02822    0.4402  -0.09981    0.0686
 3 S      1.51    -1.032    0.7051   0.03699   -0.5071    0.2948   -0.2015
 4 S-0.0003531 -0.001137 -0.003662   0.01369    0.0323   0.02008   0.06466
 5 S   -0.1813  0.005608-0.0001735  -0.06085  0.001888   -0.1265  0.003914
 6 S  -0.03035   0.04955  -0.08091   0.01972   0.09991  -0.03719   0.06073
 7 S         0         0         0         0         0        -0         0
 8 S    0.2424   0.02036   0.00171    0.1141  0.009723   0.03576  0.003003
 9 S -0.007546   0.01879  -0.04679 -0.007363    0.1348   -0.0101   0.02514
10 S  0.002912  -0.01408   0.06809  -0.02403    -0.213   0.00964  -0.04661
11 S  -0.04327   0.03605  -0.03004  -0.03259    0.0522  -0.02611   0.02175
12 S         0        -0         0         0         0        -0         0
      -0.01641-0.0009096  -0.00182 -0.008724   0.05587 -0.008075  0.007743

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