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 = "JP2014-048488 Example 3 (Sigma 35mm F1.4 DG HSM Art)"
columns = "type distance roc diameter material"
# number of surfaces = 25
lensdata = """
O 0.0 0.0 66.456 AIR
S 20 51.6928 51.12 1.58913/61.25
S 2.5 23.1387 40.45 AIR
S 13.8467 -108.959 40.96 1.437/95.1
S 1.5 47.6787 37.2 AIR
S 3.5755 196.1242 39.16 2.001/29.13
S 4.5045 -94.0062 39.16 AIR
S 3.8127 -37.6685 37.86 1.72825/28.32
S 1.3 606.2428 39.34 AIR
S 0.15 79.8753 39.82 1.59282/68.62
S 8.9087 -46.6701 39.82 AIR
S 7.0345 61.2667 42.44 2.001/29.13
S 5.7369 -336.7562 42.44 AIR
S 0.15 74.1753 39.66 1.59282/68.62
S 8.8511 -45.397 39.66 1.60342/38.01
S 1.5 35.4664 31.3 AIR
A 7.0624 0 29.102 AIR
S 5.5151 -30 29.82 1.80518/25.46
S 1.25 119.7609 32.78 1.437/95.1
S 4.996 -68.8075 32.78 AIR
S 0.15 70.0035 34.26 1.56883/56.04
S 6.265 -57.8073 34.26 AIR
S 0.15 86.6673 33.6 1.48749/70.44
S 1.1 41.4963 31.96 AIR
S 1.6662 83.8165 31.96 1.7725/49.47
S 5.2749 -56.3959 34.26 AIR
I 39.2 0 43.26 AIR
"""
s = ro.system_from_text(lensdata, columns.split(),
    description=description)
s.fields = 0, .7, 1.
s.object.angle = np.deg2rad(32.745000)
s[1].conic = 0
s[1].aspherics = [0, 1.65056e-06, 1.96288e-09, -3.8208e-12, 7.44465e-15, -5.09935e-18, 0]
s[25].conic = 0
s[25].aspherics = [0, 4.3716e-06, -2.8629e-10, -4.07099e-13, 7.96087e-15, -7.28754e-18, 0]
s.update()
print(s)
ro.Analysis(s)
Populating the interactive namespace from numpy and matplotlib
System: JP2014-048488 Example 3 (Sigma 35mm F1.4 DG HSM Art)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 32.7 deg
 Pupil:
   Pupil Distance: 54.9227
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.1148
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -74.4549
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 26.5175
Stop: 16
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     66.456         basic/air   1.000   1.000   89.30
 1 S         20      51.69      51.12                 -   1.589   1.589   61.25
 2 S        2.5      23.14      40.45         basic/air   1.000   1.000   89.30
 3 S     13.847       -109      40.96                 -   1.437   1.437   95.10
 4 S        1.5      47.68       37.2         basic/air   1.000   1.000   89.30
 5 S     3.5755      196.1      39.16                 -   2.001   2.001   29.13
 6 S     4.5045     -94.01      39.16         basic/air   1.000   1.000   89.30
 7 S     3.8127     -37.67      37.86                 -   1.728   1.728   28.32
 8 S        1.3      606.2      39.34         basic/air   1.000   1.000   89.30
 9 S       0.15      79.88      39.82                 -   1.593   1.593   68.62
10 S     8.9087     -46.67      39.82         basic/air   1.000   1.000   89.30
11 S     7.0345      61.27      42.44                 -   2.001   2.001   29.13
12 S     5.7369     -336.8      42.44         basic/air   1.000   1.000   89.30
13 S       0.15      74.18      39.66                 -   1.593   1.593   68.62
14 S     8.8511      -45.4      39.66                 -   1.603   1.603   38.01
15 S        1.5      35.47       31.3         basic/air   1.000   1.000   89.30
16 S     7.0624        inf     29.102         basic/air   1.000   1.000   89.30
17 S     5.5151        -30      29.82                 -   1.805   1.805   25.46
18 S       1.25      119.8      32.78                 -   1.437   1.437   95.10
19 S      4.996     -68.81      32.78         basic/air   1.000   1.000   89.30
20 S       0.15         70      34.26                 -   1.569   1.569   56.04
21 S      6.265     -57.81      34.26         basic/air   1.000   1.000   89.30
22 S       0.15      86.67       33.6                 -   1.487   1.487   70.44
23 S        1.1       41.5      31.96         basic/air   1.000   1.000   89.30
24 S     1.6662      83.82      31.96                 -   1.772   1.772   49.47
25 S     5.2749      -56.4      34.26         basic/air   1.000   1.000   89.30
26 S       39.2        inf      43.26         basic/air   1.000   1.000   89.30

System: JP2014-048488 Example 3 (Sigma 35mm F1.4 DG HSM Art)
Scale: 1.0 mm
Wavelengths: 588, 656, 486 nm
Fields: 0, 0.7, 1
Object:
 Semi-Angle: 32.7 deg
 Pupil:
   Pupil Distance: 54.9227
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 12.1148
Image:
 Radius: 21.6
 Update Radius: True
 Pupil:
   Pupil Distance: -74.4549
   Refractive Index: 1.00028
   Update Radius: True
   Radius: 26.5175
Stop: 16
Elements:
 # T   Distance   Rad Curv   Diameter          Material       n      nd      Vd
 0 S          0        inf     66.456         basic/air   1.000   1.000   89.30
 1 S         20      51.69      51.12                 -   1.589   1.589   61.25
 2 S        2.5      23.14      40.45         basic/air   1.000   1.000   89.30
 3 S     13.847       -109      40.96                 -   1.437   1.437   95.10
 4 S        1.5      47.68       37.2         basic/air   1.000   1.000   89.30
 5 S     3.5755      196.1      39.16                 -   2.001   2.001   29.13
 6 S     4.5045     -94.01      39.16         basic/air   1.000   1.000   89.30
 7 S     3.8127     -37.67      37.86                 -   1.728   1.728   28.32
 8 S        1.3      606.2      39.34         basic/air   1.000   1.000   89.30
 9 S       0.15      79.88      39.82                 -   1.593   1.593   68.62
10 S     8.9087     -46.67      39.82         basic/air   1.000   1.000   89.30
11 S     7.0345      61.27      42.44                 -   2.001   2.001   29.13
12 S     5.7369     -336.8      42.44         basic/air   1.000   1.000   89.30
13 S       0.15      74.18      39.66                 -   1.593   1.593   68.62
14 S     8.8511      -45.4      39.66                 -   1.603   1.603   38.01
15 S        1.5      35.47       31.3         basic/air   1.000   1.000   89.30
16 S     7.0624        inf     29.102         basic/air   1.000   1.000   89.30
17 S     5.5151        -30      29.82                 -   1.805   1.805   25.46
18 S       1.25      119.8      32.78                 -   1.437   1.437   95.10
19 S      4.996     -68.81      32.78         basic/air   1.000   1.000   89.30
20 S       0.15         70      34.26                 -   1.569   1.569   56.04
21 S      6.265     -57.81      34.26         basic/air   1.000   1.000   89.30
22 S       0.15      86.67       33.6                 -   1.487   1.487   70.44
23 S        1.1       41.5      31.96         basic/air   1.000   1.000   89.30
24 S     1.6662      83.82      31.96                 -   1.772   1.772   49.47
25 S     5.2749      -56.4      34.26         basic/air   1.000   1.000   89.30
26 S     39.265        inf      43.26         basic/air   1.000   1.000   89.30

lagrange: -8.4398
track length: 96.8
object, image height: [38.2512 23.6903]
front, back focal length (from PP): [-34.0321  34.0321]
entry, exit pupil height: [12.1148 26.5175]
entry, exit pupil distance: [ 34.9227 -35.2549]
front, back focal distance: [19.3694 39.2253]
front, back principal distance: [53.4015  5.1932]
front, back nodal distance: [53.4015  5.1932]
front, back numerical aperture: [0.     0.3355]
front, back f number: [1.4046 0.6417]
front, back working f number: [   inf 1.4909]
front, back airy radius: [   inf 0.0011]
transverse, angular magnification: [-0.      0.4569]

 # T      path         n   axial y  axial nu   chief y  chief nu
 0 S         0         1     12.11         0    -38.25    0.6966
 1 S        20     1.589     12.11    -0.138    -24.32    0.9737
 2 S      22.5         1      11.9    0.1648    -22.79    0.3937
 3 S     36.35     1.437     14.18    0.2216    -17.34    0.3242
 4 S     37.85         1     14.41    0.3536       -17    0.1685
 5 S     41.42     2.001     15.67    0.2736     -16.4    0.2522
 6 S     45.93         1     16.29    0.1002    -15.83    0.4207
 7 S     49.74     1.728     16.67    0.4224    -14.23    0.1457
 8 S     51.04         1     16.99    0.4428    -14.12    0.1288
 9 S     51.19     1.593     17.06    0.3163     -14.1    0.2334
10 S      60.1         1     18.83   0.07727    -12.79    0.3958
11 S     67.13     2.001     19.37   -0.2391    -10.01    0.5593
12 S     72.87         1     18.68   -0.2946    -8.407    0.5843
13 S     73.02     1.593     18.64   -0.4435    -8.319    0.6508
14 S     81.87     1.603     16.17   -0.4397    -4.703    0.6497
15 S     83.37         1     15.76   -0.1717    -4.095      0.58
16 S     90.43         1     14.55   -0.1717-8.145e-16      0.58
17 S     95.95     1.805      13.6    0.1933     3.198    0.6658
18 S      97.2     1.437     13.74    0.2356     3.659    0.6771
19 S     102.2         1     14.56    0.1432     6.013    0.6389
20 S     102.3     1.569     14.58   0.02478     6.109    0.5893
21 S     108.6         1     14.68   -0.1196     8.462    0.5061
22 S     108.8     1.487     14.66    -0.202     8.538    0.4581
23 S     109.9         1     14.51  -0.03162     8.877    0.5623
24 S     111.5     1.772     14.46   -0.1648     9.813    0.4719
25 S     116.8         1     13.97   -0.3561     11.22    0.3183
26 S       156         1   0.01288   -0.3561     23.69    0.3183

 # T       SA3      CMA3      AST3      PTZ3      DIS3     TACHC      TCHC
 0 S         0         0         0         0         0         0         0
 1 S   -0.2861    0.4227    -0.995   -0.7164     1.166  -0.04825  -0.04652
 2 S     1.689    -1.471     1.281     1.601     -2.51    0.1372   -0.1195
 3 S -0.001368  -0.02185    -0.349    0.2788    -1.122 -0.004401   -0.0703
 4 S     2.141   -0.6143    0.1763    0.6371   -0.2333   0.08476  -0.02432
 5 S    -1.179   -0.2307  -0.04515   -0.2549  -0.05872   -0.3275   -0.0641
 6 S   0.00389  -0.03134    0.2525   -0.5317     2.249  -0.05741    0.4626
 7 S    0.1133   -0.2641    0.6157     1.118    -4.041    0.2384   -0.5559
 8 S     1.592    0.3567    0.0799   0.06944   0.03346     0.334   0.07484
 9 S    -3.279    0.2387  -0.01737   -0.4655   0.03515   -0.1704    0.0124
10 S   -0.1334    0.2739   -0.5626   -0.7966     2.792  -0.09344    0.1919
11 S   -0.5764   -0.3404    -0.201   -0.8158   -0.6005   -0.3673   -0.2169
12 S   -0.7544     1.313    -2.285   -0.1484     4.234   -0.3152    0.5486
13 S  0.005856  -0.06392    0.6976   -0.5012    -2.143   0.01227   -0.1339
14 S   0.08754  -0.07063   0.05699   0.00914  -0.05336    0.2055   -0.1658
15 S-0.0008729 -0.001486 -0.002529      1.06       1.8    0.1195    0.2034
16 S         0         0         0         0         0        -0         0
17 S     1.724    -1.305     0.988     1.485    -1.873    0.4182   -0.3166
18 S    0.1693    0.3048    0.5488    0.1185     1.201    0.2212    0.3982
19 S  0.002777  -0.02238    0.1803   -0.4414     2.104 -0.008934   0.07199
20 S   -0.3363   -0.6949    -1.436   -0.5174    -4.035  -0.09302   -0.1922
21 S   -0.3725    0.3586   -0.3453   -0.6266    0.9356  -0.09953   0.09582
22 S   0.00143   0.01742    0.2123   -0.3777    -2.016 -0.009493   -0.1157
23 S     0.123    0.3002    0.7325    0.7889     3.712   0.06025     0.147
24 S -0.008405  -0.04052   -0.1954   -0.5195    -3.446  -0.05037   -0.2428
25 S    -0.726     1.587    0.8458   -0.7721    0.9166   -0.2085    0.0412
26 S         0        -0         0         0         0        -0         0
    -0.0003872 0.0003186    0.2343     -0.32   -0.9521  -0.02238  -0.01666

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