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 = "JP1994-029897 Example 4 (Nikon 105mm f/4.5 UV-Micro-Nikkor)"
columns = "type distance roc diameter material"
# number of surfaces = 13
lensdata = """
O 0.0 0.0 34.32 AIR
S 20 -32.904 26.4 1.45851/67.93
S 1.331 50.597 26.4 AIR
S 3.613 121.007 29.64 1.43388/95.57
S 7.415 -35.246 29.64 AIR
S 0.19 31.157 30.18 1.43388/95.57
S 7.605 -70.598 30.18 AIR
A 13 0 19.602 AIR
S 2.924 -31.157 20.94 1.45851/67.93
S 1.426 43.241 20.94 AIR
S 5.989 179.247 23.14 1.43388/95.57
S 8.936 -18.63 23.14 AIR
S 0.111 -18.224 23.88 1.45851/67.93
S 1.901 -33.891 23.88 AIR
I 82.765 0 41.143 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(11.700000)
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: JP1994-029897 Example 4 (Nikon 105mm f/4.5 UV-Micro-Nikkor)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 11.7 deg
 Pupil:
   Pupil Distance: 45.1697
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 11.1009
Image:
 Radius: 20.6
 Update Radius: True
 Pupil:
   Pupil Distance: -104.774
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 11.6322
Stop: 7
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf      34.32         basic/air   1.000   1.000   89.30
 1 S         20      -32.9       26.4                 -   1.459   1.459   67.93
 2 S      1.331       50.6       26.4         basic/air   1.000   1.000   89.30
 3 S      3.613        121      29.64                 -   1.434   1.434   95.57
 4 S      7.415     -35.25      29.64         basic/air   1.000   1.000   89.30
 5 S       0.19      31.16      30.18                 -   1.434   1.434   95.57
 6 S      7.605      -70.6      30.18         basic/air   1.000   1.000   89.30
 7 S         13        inf     19.602         basic/air   1.000   1.000   89.30
 8 S      2.924     -31.16      20.94                 -   1.459   1.459   67.93
 9 S      1.426      43.24      20.94         basic/air   1.000   1.000   89.30
10 S      5.989      179.2      23.14                 -   1.434   1.434   95.57
11 S      8.936     -18.63      23.14         basic/air   1.000   1.000   89.30
12 S      0.111     -18.22      23.88                 -   1.459   1.459   67.93
13 S      1.901     -33.89      23.88         basic/air   1.000   1.000   89.30
14 S     82.765        inf     41.143         basic/air   1.000   1.000   89.30

System: JP1994-029897 Example 4 (Nikon 105mm f/4.5 UV-Micro-Nikkor)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 11.7 deg
 Pupil:
   Pupil Distance: 45.1697
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 11.1009
Image:
 Radius: 20.6
 Update Radius: True
 Pupil:
   Pupil Distance: -104.774
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 11.6322
Stop: 7
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf      34.32         basic/air   1.000   1.000   89.30
 1 S         20      -32.9       26.4                 -   1.459   1.459   67.93
 2 S      1.331       50.6       26.4         basic/air   1.000   1.000   89.30
 3 S      3.613        121      29.64                 -   1.434   1.434   95.57
 4 S      7.415     -35.25      29.64         basic/air   1.000   1.000   89.30
 5 S       0.19      31.16      30.18                 -   1.434   1.434   95.57
 6 S      7.605      -70.6      30.18         basic/air   1.000   1.000   89.30
 7 S         13        inf     19.602         basic/air   1.000   1.000   89.30
 8 S      2.924     -31.16      20.94                 -   1.459   1.459   67.93
 9 S      1.426      43.24      20.94         basic/air   1.000   1.000   89.30
10 S      5.989      179.2      23.14                 -   1.434   1.434   95.57
11 S      8.936     -18.63      23.14         basic/air   1.000   1.000   89.30
12 S      0.111     -18.22      23.88                 -   1.459   1.459   67.93
13 S      1.901     -33.89      23.88         basic/air   1.000   1.000   89.30
14 S     82.755        inf     41.143         basic/air   1.000   1.000   89.30

lagrange: -2.3163
track length: 54.441
object, image height: [ 9.4224 20.8577]
front, back focal length (from PP): [-100.1614  100.1614]
entry, exit pupil height: [11.1009 11.6322]
entry, exit pupil distance: [ 25.1697 -22.0093]
front, back focal distance: [-70.3978  82.9225]
front, back principal distance: [ 29.7636 -17.239 ]
front, back nodal distance: [ 29.7636 -17.239 ]
front, back numerical aperture: [0.     0.1102]
front, back f number: [4.5114 4.3054]
front, back working f number: [  inf 4.539]
front, back airy radius: [   inf 0.0033]
transverse, angular magnification: [-0.      0.9543]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1      11.1         0    -9.422    0.2087
 1 S        20     1.459      11.1    0.1546     -5.25    0.1355
 2 S     21.33         1     11.24    0.2564    -5.127   0.08911
 3 S     24.94     1.434     12.17    0.2128    -4.805    0.1063
 4 S     32.36         1     13.27   0.04957    -4.255    0.1587
 5 S     32.55     1.434     13.28   -0.1352    -4.225    0.2175
 6 S     40.15         1     12.56   -0.2124    -3.071    0.2363
 7 S     53.15         1     9.801   -0.2124 2.037e-15    0.2363
 8 S     56.08     1.459      9.18  -0.07734    0.6908    0.2465
 9 S      57.5         1     9.105   0.01914    0.9318    0.2564
10 S     63.49     1.434     9.219 -0.003163     2.467    0.2504
11 S     72.43         1     9.199   -0.2173     4.027    0.1567
12 S     72.54     1.459     9.175   0.01343     4.045    0.2584
13 S     74.44         1     9.193   -0.1109     4.381    0.1991
14 S     157.2         1      0.02   -0.1109     20.86    0.1991

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S    0.4137   -0.4514    0.4926    0.2306   -0.7892    0.1561   -0.1704
 2 S     2.129  -0.05446  0.001393      0.15 -0.003871    0.2241 -0.005732
 3 S    -1.067   -0.1476  -0.02042  -0.06035  -0.01117   -0.1237  -0.01712
 4 S   -0.3447    0.2945   -0.2517   -0.2072    0.3921   -0.1236    0.1056
 5 S    -1.561  -0.07556 -0.003658   -0.2344  -0.01152     -0.18 -0.008712
 6 S    -1.262    0.9049   -0.6488   -0.1034    0.5393   -0.1396    0.1001
 7 S         0        -0         0         0         0        -0         0
 8 S     1.869   -0.7895    0.3334    0.2435   -0.2436    0.1939  -0.08187
 9 S    0.1201    0.1452    0.1757    0.1755    0.4248   0.08711    0.1054
10 S -0.004274  -0.01636   -0.0626  -0.04074   -0.3955  -0.01853  -0.07093
11 S    -4.517   -0.3783  -0.03169    -0.392  -0.03548   -0.1864  -0.01561
12 S     4.798    0.4348   0.03941    0.4163   0.04131    0.2755   0.02497
13 S    -0.708    0.1293  -0.02362   -0.2239   0.04521   -0.1463   0.02673
14 S         0        -0         0         0         0        -0         0
       -0.1343 -0.004337 7.129e-05  -0.04612  -0.04766   0.01851 -0.007544

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