cihologramas / pyoptools

Python tools for optical design
GNU General Public License v3.0
137 stars 46 forks source link

Tutorial not running, glass type keys changed #105

Closed rdgraham closed 2 years ago

rdgraham commented 3 years ago

I noticed that out of the box, I was not able to run the Tutorial.1 without error.

This seemed to be due to:

  1. It seems all the keys for the glass types have changed since the tutorial was written, to use the full prefix, i.e. N-BK7 instead of BK7. I needed to go through and change all the glass types to include the prefix N-.
  2. There seems to be a reference to BK8 glass which was not found, I changed to a different type
  3. pi is not available. Suggest move the from math import * to the top of the worksheet.

Regarding the glass names, I think using the full names is better, but perhaps it would be good to be able to fall back to the shorter ones, (perhaps with a depreciation warning), to support legacy code.