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 = "JP2019-144477 Example 1 (Sigma 105mm F1.4 DG HSM Art)"
columns = "type distance roc diameter material"
# number of surfaces = 32
lensdata = """
O 0.0 0.0 118.638 AIR
S 20 115.7436 91.26 1.65844/50.85
S 5.4407 180.1804 91.26 AIR
S 0.3 74.5 85.59 1.437/95.1
S 6.0183 100.3863 84.1 AIR
S 0.3 63.431 79.12 1.437/95.1
S 12.3856 249.4535 76.32 AIR
S 2.9002 216.1665 73.86 1.6131/44.36
S 2.2 49.5173 63.85 AIR
S 15.8891 -248.4001 63.23 1.437/95.1
S 4.613 -95.8446 61.35 1.6134/44.27
S 1.8 -500 61.35 AIR
S 1 67.9843 58.84 1.83481/42.72
S 10.4346 -211.9683 56.23 1.6134/44.27
S 1.8 67.2983 54.22 AIR
S 15.8705 53.7906 49.84 1.92286/20.88
S 4.5962 94.6373 47.29 AIR
S 0.3 46.5373 47.16 1.61997/63.88
S 4.1734 66.7867 44.82 AIR
S 0.3 40.7185 43.58 1.59282/68.63
S 6.9541 275 43.58 1.85478/24.8
S 1.3 28.4253 34.83 AIR
A 7.5444 0 32.862 AIR
S 5.4041 -50.8188 33.34 1.65412/39.68
S 0.9 29.516 33.43 1.87071/40.73
S 7.5115 -196.5287 33.43 AIR
S 2.267 -76.2095 33.47 1.91082/35.25
S 3.5767 -35.1809 33.47 1.64769/33.84
S 0.9 124.7179 33.84 AIR
S 0.3 68.8532 32.18 1.84915/40
S 4.9326 -92.2688 32.18 AIR
S 37.5626 0 45.82 1.52301/58.59
S 1.45 0 45.82 AIR
I 1 0 43.26 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(11.925000)
s[29].conic = 0
s[29].aspherics = [0, -1.27386e-06, -1.15209e-10, 0, 0, 0, 0]
s[30].conic = 0
s[30].aspherics = [0, 1.98113e-06, 1.20129e-10, 1.65076e-12, 0, 0, 0]
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: JP2019-144477 Example 1 (Sigma 105mm F1.4 DG HSM Art)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 11.9 deg
 Pupil:
   Pupil Distance: 180.936
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 35.4167
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -63.3208
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 22.0325
Stop: 22
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     118.64         basic/air   1.000   1.000   89.30
 1 S         20      115.7      91.26                 -   1.658   1.658   50.85
 2 S     5.4407      180.2      91.26         basic/air   1.000   1.000   89.30
 3 S        0.3       74.5      85.59                 -   1.437   1.437   95.10
 4 S     6.0183      100.4       84.1         basic/air   1.000   1.000   89.30
 5 S        0.3      63.43      79.12                 -   1.437   1.437   95.10
 6 S     12.386      249.5      76.32         basic/air   1.000   1.000   89.30
 7 S     2.9002      216.2      73.86                 -   1.613   1.613   44.36
 8 S        2.2      49.52      63.85         basic/air   1.000   1.000   89.30
 9 S     15.889     -248.4      63.23                 -   1.437   1.437   95.10
10 S      4.613     -95.84      61.35                 -   1.613   1.613   44.27
11 S        1.8       -500      61.35         basic/air   1.000   1.000   89.30
12 S          1      67.98      58.84                 -   1.835   1.835   42.72
13 S     10.435       -212      56.23                 -   1.613   1.613   44.27
14 S        1.8       67.3      54.22         basic/air   1.000   1.000   89.30
15 S      15.87      53.79      49.84                 -   1.923   1.923   20.88
16 S     4.5962      94.64      47.29         basic/air   1.000   1.000   89.30
17 S        0.3      46.54      47.16                 -   1.620   1.620   63.88
18 S     4.1734      66.79      44.82         basic/air   1.000   1.000   89.30
19 S        0.3      40.72      43.58                 -   1.593   1.593   68.63
20 S     6.9541        275      43.58                 -   1.855   1.855   24.80
21 S        1.3      28.43      34.83         basic/air   1.000   1.000   89.30
22 S     7.5444        inf     32.862         basic/air   1.000   1.000   89.30
23 S     5.4041     -50.82      33.34                 -   1.654   1.654   39.68
24 S        0.9      29.52      33.43                 -   1.871   1.871   40.73
25 S     7.5115     -196.5      33.43         basic/air   1.000   1.000   89.30
26 S      2.267     -76.21      33.47                 -   1.911   1.911   35.25
27 S     3.5767     -35.18      33.47                 -   1.648   1.648   33.84
28 S        0.9      124.7      33.84         basic/air   1.000   1.000   89.30
29 S        0.3      68.85      32.18                 -   1.849   1.849   40.00
30 S     4.9326     -92.27      32.18         basic/air   1.000   1.000   89.30
31 S     37.563        inf      45.82                 -   1.523   1.523   58.59
32 S       1.45        inf      45.82         basic/air   1.000   1.000   89.30
33 S          1        inf      43.26         basic/air   1.000   1.000   89.30

System: JP2019-144477 Example 1 (Sigma 105mm F1.4 DG HSM Art)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 11.9 deg
 Pupil:
   Pupil Distance: 180.936
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 35.4167
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -63.3208
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 22.0325
Stop: 22
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     118.64         basic/air   1.000   1.000   89.30
 1 S         20      115.7      91.26                 -   1.658   1.658   50.85
 2 S     5.4407      180.2      91.26         basic/air   1.000   1.000   89.30
 3 S        0.3       74.5      85.59                 -   1.437   1.437   95.10
 4 S     6.0183      100.4       84.1         basic/air   1.000   1.000   89.30
 5 S        0.3      63.43      79.12                 -   1.437   1.437   95.10
 6 S     12.386      249.5      76.32         basic/air   1.000   1.000   89.30
 7 S     2.9002      216.2      73.86                 -   1.613   1.613   44.36
 8 S        2.2      49.52      63.85         basic/air   1.000   1.000   89.30
 9 S     15.889     -248.4      63.23                 -   1.437   1.437   95.10
10 S      4.613     -95.84      61.35                 -   1.613   1.613   44.27
11 S        1.8       -500      61.35         basic/air   1.000   1.000   89.30
12 S          1      67.98      58.84                 -   1.835   1.835   42.72
13 S     10.435       -212      56.23                 -   1.613   1.613   44.27
14 S        1.8       67.3      54.22         basic/air   1.000   1.000   89.30
15 S      15.87      53.79      49.84                 -   1.923   1.923   20.88
16 S     4.5962      94.64      47.29         basic/air   1.000   1.000   89.30
17 S        0.3      46.54      47.16                 -   1.620   1.620   63.88
18 S     4.1734      66.79      44.82         basic/air   1.000   1.000   89.30
19 S        0.3      40.72      43.58                 -   1.593   1.593   68.63
20 S     6.9541        275      43.58                 -   1.855   1.855   24.80
21 S        1.3      28.43      34.83         basic/air   1.000   1.000   89.30
22 S     7.5444        inf     32.862         basic/air   1.000   1.000   89.30
23 S     5.4041     -50.82      33.34                 -   1.654   1.654   39.68
24 S        0.9      29.52      33.43                 -   1.871   1.871   40.73
25 S     7.5115     -196.5      33.43         basic/air   1.000   1.000   89.30
26 S      2.267     -76.21      33.47                 -   1.911   1.911   35.25
27 S     3.5767     -35.18      33.47                 -   1.648   1.648   33.84
28 S        0.9      124.7      33.84         basic/air   1.000   1.000   89.30
29 S        0.3      68.85      32.18                 -   1.849   1.849   40.00
30 S     4.9326     -92.27      32.18         basic/air   1.000   1.000   89.30
31 S     37.563        inf      45.82                 -   1.523   1.523   58.59
32 S       1.45        inf      45.82         basic/air   1.000   1.000   89.30
33 S     1.0367        inf      43.26         basic/air   1.000   1.000   89.30

lagrange: -7.5384
track length: 170.92
object, image height: [38.5014 21.6592]
front, back focal length (from PP): [-101.8744  101.8744]
entry, exit pupil height: [35.4167 22.0325]
entry, exit pupil distance: [160.9358 -62.3208]
front, back focal distance: [-2.8241  1.0543]
front, back principal distance: [  99.0503 -100.8202]
front, back nodal distance: [  99.0503 -100.8202]
front, back numerical aperture: [0.     0.3285]
front, back f number: [1.4382 2.3119]
front, back working f number: [   inf 1.5227]
front, back airy radius: [   inf 0.0011]
transverse, angular magnification: [-0.      1.6075]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     35.42         0     -38.5    0.2128
 1 S        20     1.658     35.42   -0.2014    -34.25    0.4076
 2 S     25.44         1     34.76  -0.07444    -32.91    0.2874
 3 S     25.74     1.437     34.73    -0.278    -32.82    0.4798
 4 S     31.76         1     33.57    -0.132    -30.81    0.3457
 5 S     32.06     1.437     33.53   -0.3629    -30.71    0.5572
 6 S     44.44         1      30.4   -0.3096    -25.91    0.5118
 7 S     47.34     1.613      29.5   -0.3933    -24.42     0.581
 8 S     49.54         1     28.97  -0.03477    -23.63    0.2886
 9 S     65.43     1.437     28.42   0.01519    -19.05    0.2551
10 S     70.05     1.613     28.46   0.06758    -18.23    0.2216
11 S     71.85         1     28.54   0.03258    -17.98    0.2436
12 S     72.85     1.835     28.57   -0.3182    -17.74    0.4613
13 S     83.28     1.613     26.76   -0.3461    -15.11    0.4771
14 S     85.08         1     26.38   -0.1058    -14.58    0.3443
15 S       101     1.923      24.7   -0.5294    -9.118    0.5007
16 S     105.5         1     23.43    -0.301    -7.922    0.4235
17 S     105.8      1.62     23.34   -0.6118    -7.795    0.5272
18 S       110         1     21.77   -0.4098    -6.436    0.4675
19 S     110.3     1.593     21.64   -0.7248    -6.296    0.5591
20 S     117.3     1.855     18.48   -0.7424    -3.855    0.5628
21 S     118.6         1     17.96   -0.2025     -3.46    0.4588
22 S     126.1         1     16.43   -0.2025 1.517e-14    0.4588
23 S     131.5     1.654     15.34 -0.005218     2.479    0.4907
24 S     132.4     1.871     15.33   -0.1177     2.746    0.4705
25 S     139.9         1     14.86   -0.1836     4.635      0.45
26 S     142.2     1.911     14.45  -0.01097     5.655    0.5176
27 S     145.8     1.648     14.42   -0.1189     6.624     0.468
28 S     146.7         1     14.36  -0.04432     6.879    0.5037
29 S       147     1.849     14.35   -0.2212      7.03    0.4171
30 S     151.9         1     13.76   -0.3477     8.143    0.3422
31 S     189.5     1.523    0.6977   -0.3477     20.99    0.3422
32 S     190.9         1    0.3666   -0.3477     21.32    0.3422
33 S     191.9         1   0.01897   -0.3477     21.66    0.3422

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S    -0.349   0.09477  -0.02573   -0.2798   0.08297   -0.2432   0.06603
 2 S-0.0008223-0.0007263-0.0006415    0.1798    0.1582   0.09237   0.08159
 3 S   -0.4618    0.1807  -0.07067   -0.3329    0.1579   -0.1249   0.04888
 4 S   0.00537  0.001026 0.0001962    0.2471   0.04727   0.06239   0.01193
 5 S    -0.332    0.1159  -0.04048    -0.391    0.1507   -0.1221   0.04264
 6 S   -0.2058    0.4473    -0.972   0.09943     1.896  -0.05239    0.1138
 7 S    0.2011   -0.4633     1.067   -0.1434    -2.128    0.1257   -0.2895
 8 S     1.467   -0.5032    0.1726    0.6262   -0.2739    0.3924   -0.1346
 9 S   0.03826  -0.09368    0.2294   0.09986   -0.8061   0.03891  -0.09528
10 S    0.1289   -0.1655    0.2124   0.06481   -0.3559    0.1814   -0.2329
11 S 0.0001627 -0.001855   0.02116  -0.06203    0.4661  -0.01726    0.1968
12 S     -1.07     0.041 -0.001571    -0.546   0.02098   -0.3959   0.01517
13 S    -0.447    0.4814   -0.5185  -0.02881    0.5894  -0.08719   0.09391
14 S    0.0845   0.03766   0.01678    0.4609    0.2129    0.1862     0.083
15 S    -0.166  -0.08204  -0.04055    -0.728   -0.3799   -0.5765    -0.285
16 S  -0.01508   0.09608   -0.6124    0.4138     1.266  -0.08248    0.5257
17 S   0.09146    0.1166    0.1486   -0.6709   -0.6658  -0.08062   -0.1028
18 S  -0.03879    0.1717   -0.7601    0.4675     1.295   -0.0314     0.139
19 S   0.05721    0.1469    0.3772   -0.7456   -0.9462  -0.04107   -0.1054
20 S     0.708   -0.6152    0.5346  -0.02632   -0.4417    0.4316   -0.3751
21 S   0.06361   0.04992   0.03918     1.323     1.069    0.4117    0.3231
22 S         0        -0         0         0         0        -0         0
23 S     1.124   -0.9137    0.7427    0.6348     -1.12    0.2214     -0.18
24 S     -0.51   -0.3849   -0.2904   -0.1936   -0.3653    -0.055   -0.0415
25 S   -0.2149    0.3535   -0.5816   -0.1932     1.275   -0.1264     0.208
26 S    0.5214   -0.5251    0.5288    0.5103    -1.046    0.2094   -0.2109
27 S   -0.5333    0.1059  -0.02104   -0.1939   0.04271  -0.06276   0.01247
28 S-5.297e-05-0.0004178 -0.003296    0.2571     2.002   0.03395    0.2678
29 S    0.5151    0.2162  -0.02788   -0.5442    -2.517  -0.07764   -0.2866
30 S    -0.688     1.115   -0.1178   -0.4061    0.5351   -0.2254    0.1152
31 S   0.02395  -0.02357   0.02319        -0  -0.02282  0.004084 -0.004018
32 S  -0.01259   0.01238  -0.01219         0   0.01199 -0.002146  0.002111
33 S         0        -0         0         0         0        -0         0
      -0.01485   0.01071    0.0172   -0.1016    0.2108  -0.01288  0.003504

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