| |
- Material
- MaterialData
class Material |
|
Class to hold a meging type being name, formula and coefficents in the form held in
RefractiveIndex.org |
|
Methods defined here:
- __init__(self, name, formula, wrange, coef)
- Constructor to for a material
param name string name of material, usually glass key
param formula int formula type, only 1 and 2 suppoted at the moment
param coef list of coefficeint is same syntax ar RefrativeIndex.info
- __repr__(self)
- Implement repr() to return string of informatiom
- getIndex(self)
- Method to get the RefrativeIndex for the current Material.
Suppoted: Air as special case of formula 6
Sellmeir formula 1 and 2
Polynomial formula 3
Cauchy formula 5
GasIndex formula 6
|
class MaterialData |
|
Class to hold the MaterialData file |
|
Methods defined here:
- __init__(self, filename='$LENS/materials.data')
- Constructor to open the materials definition file and read in the
data to self.data as a list of lines. The database is only loaded once.
param filename the database (defaults to package default)
- getIndex(self, key=None)
- Method to get the index of glass specified by name key name
glass in MaterialData, if None it will be prompted for via tio.getOption()
param key the glass key name
return RefrativeIndex, None of key not found.
- getList(self)
- Method to a list of the materials keys in the database as a list of strings.
- getMaterial(self, key=None)
- Method to get a material from the loaded database.
parm key name, (usually glass name) if None, then it will be prompted for
via tio.getOption()
| |