#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('pylab', 'inline') import numpy as np import matplotlib.pyplot as plt from rayopt import system_from_text, Analysis np.set_printoptions(precision=3) # In[2]: columns = "type roc distance radius material" text = """ O 0 0 .05 AIR S .55622 .1 .033 SK4 S -.15868 .00632 .033 AIR S .03982 .00061 .028 SK4 S .089438 .01464 .023 AIR S -.07858 .01008 .018 SF5 S .03237 .00254 .016 AIR A 0 .01632 .013 AIR S .1191 .00056 .015 SK4 S -.04214 .00442 .015 AIR I 0 .0735 .05 AIR """ s = system_from_text(text, columns.split(), scale=1., description="four element double gauss, intermediate optical design") s.rescale() s.object.angle = np.deg2rad(15) s.object.pupil.radius = 100/2.8/2 s.fields = 0, .7, 1. s.update() # In[3]: a = Analysis(s) # In[ ]: