#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('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 2020/0049962 Example 1 (Nikon AF-S Nikkor 80-400mm f/4.5-5.6G ED VR)" columns = "type distance roc diameter material" # number of surfaces = 33 lensdata = """ O 0.0 0.0 97.656 AIR S 20 182.816 75.12 1.90265/35.7 S 2.5 92.566 73.85 1.49782/82.6 S 10 -707.416 73.85 AIR S 0.1 83.365 72.41 1.437/95 S 9.2 1420.361 72.41 AIR S 8.225 117.082 48.15 1.801/34.9 S 6.4 -117.044 46.88 1.49782/82.6 S 2.2 61.183 39.53 AIR S 5.81 -265.081 36.35 1.816/46.6 S 2 30.785 33.47 1.80518/25.5 S 4.6 92.264 33.47 AIR S 6.2 -56.342 31.88 1.83481/42.7 S 2 158.965 33.32 AIR S 27.059 112.252 33.64 1.59319/67.9 S 4.6 -78.685 33.64 AIR S 0.1 67.612 33.64 1.90366/31.3 S 1.8 35.499 33.17 1.59319/67.9 S 6.4 -238.177 33.17 AIR S 5.388 -58.467 27.58 1.72916/54.6 S 1.6 38.999 27.58 1.90265/35.7 S 3.6 146.9 27.58 AIR A 26.684 0 26.399 AIR S 2 124.142 29.04 1.744/44.8 S 3.4 -124.142 29.04 AIR S 0.1 26.615 28.31 1.48749/70.3 S 6.8 0 26.89 1.95/29.4 S 2 26.437 25.66 1.51742/52.2 S 4.8 0 25.66 AIR S 17.6 176.178 24.44 1.64769/33.7 S 6 -19.703 24.44 1.603/65.4 S 1.6 0 24.44 AIR S 11.27 -22.131 24.85 1.83481/42.7 S 1.6 -33.748 25.77 AIR I 52.8 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.800000) s.update() print(s) ro.Analysis(s) # In[2]: description = "US 2020/0049962 Example 1 (Nikon AF-S Nikkor 80-400mm f/4.5-5.6G ED VR)" columns = "type distance roc diameter material" # number of surfaces = 33 lensdata = """ O 0.0 0.0 97.656 AIR S 20 182.816 75.12 1.90265/35.7 S 2.5 92.566 73.85 1.49782/82.6 S 10 -707.416 73.85 AIR S 0.1 83.365 72.41 1.437/95 S 9.2 1420.361 72.41 AIR S 45.191 117.082 48.15 1.801/34.9 S 6.4 -117.044 46.88 1.49782/82.6 S 2.2 61.183 39.53 AIR S 5.81 -265.081 36.35 1.816/46.6 S 2 30.785 33.47 1.80518/25.5 S 4.6 92.264 33.47 AIR S 6.2 -56.342 31.88 1.83481/42.7 S 2 158.965 33.32 AIR S 15.341 112.252 33.64 1.59319/67.9 S 4.6 -78.685 33.64 AIR S 0.1 67.612 33.64 1.90366/31.3 S 1.8 35.499 33.17 1.59319/67.9 S 6.4 -238.177 33.17 AIR S 17.106 -58.467 27.58 1.72916/54.6 S 1.6 38.999 27.58 1.90265/35.7 S 3.6 146.9 27.58 AIR A 11.153 0 26.399 AIR S 2 124.142 29.04 1.744/44.8 S 3.4 -124.142 29.04 AIR S 0.1 26.615 28.31 1.48749/70.3 S 6.8 0 26.89 1.95/29.4 S 2 26.437 25.66 1.51742/52.2 S 4.8 0 25.66 AIR S 17.6 176.178 24.44 1.64769/33.7 S 6 -19.703 24.44 1.603/65.4 S 1.6 0 24.44 AIR S 11.27 -22.131 24.85 1.83481/42.7 S 1.6 -33.748 25.77 AIR I 68.3 0 43.2 AIR """ s = ro.system_from_text(lensdata, columns.split(), description=description) s.fields = 0, .7, 1. s.object.angle = np.deg2rad(6.050000) s.update() print(s) ro.Analysis(s) # In[3]: description = "US 2020/0049962 Example 1 (Nikon AF-S Nikkor 80-400mm f/4.5-5.6G ED VR)" columns = "type distance roc diameter material" # number of surfaces = 33 lensdata = """ O 0.0 0.0 97.656 AIR S 20 182.816 75.12 1.90265/35.7 S 2.5 92.566 73.85 1.49782/82.6 S 10 -707.416 73.85 AIR S 0.1 83.365 72.41 1.437/95 S 9.2 1420.361 72.41 AIR S 64.292 117.082 48.15 1.801/34.9 S 6.4 -117.044 46.88 1.49782/82.6 S 2.2 61.183 39.53 AIR S 5.81 -265.081 36.35 1.816/46.6 S 2 30.785 33.47 1.80518/25.5 S 4.6 92.264 33.47 AIR S 6.2 -56.342 31.88 1.83481/42.7 S 2 158.965 33.32 AIR S 3.056 112.252 33.64 1.59319/67.9 S 4.6 -78.685 33.64 AIR S 0.1 67.612 33.64 1.90366/31.3 S 1.8 35.499 33.17 1.59319/67.9 S 6.4 -238.177 33.17 AIR S 29.391 -58.467 27.58 1.72916/54.6 S 1.6 38.999 27.58 1.90265/35.7 S 3.6 146.9 27.58 AIR A 2.382 0 26.399 AIR S 2 124.142 29.04 1.744/44.8 S 3.4 -124.142 29.04 AIR S 0.1 26.615 28.31 1.48749/70.3 S 6.8 0 26.89 1.95/29.4 S 2 26.437 25.66 1.51742/52.2 S 4.8 0 25.66 AIR S 17.6 176.178 24.44 1.64769/33.7 S 6 -19.703 24.44 1.603/65.4 S 1.6 0 24.44 AIR S 11.27 -22.131 24.85 1.83481/42.7 S 1.6 -33.748 25.77 AIR I 77.1 0 43.2 AIR """ s = ro.system_from_text(lensdata, columns.split(), description=description) s.fields = 0, .7, 1. s.object.angle = np.deg2rad(3.100000) s.update() print(s) ro.Analysis(s) # In[ ]: