pyoptools.raytrace.mat_lib.material module

The material library provides access to refractive index data for common optical glasses and generic organic and inorganic compounds.

All data is from www.refractiveindex.info. Please follow their guidelines for citation.

raytrace.mat_lib.material instances for optical glasses can be retrieved directly using dictionary-style access. For example:

material[‘N-BK7’]

In some cases, materials from different manufacturer catalogs may share the same identifier, in this case a KeyError will be raised. This can be resolved using attribute access given the name of the manufacturer catalog. For example:

``` m = material[‘SF11’]

KeyError: “Multiple matches for glass type SF11. Use one of: material.hikari[‘SF11’] or material.schott[‘SF11’]”

```

Compounds are also available through the attributes organic and inorganic. Note that in refractiveindex.info, inorganic is named _main_.

Often, multiple data sources are available for a given compound. These can be disambiguated using a trailing : followed by the name of the reference. For example:

` silver = material.inorganic['Ag:Yang'] ` If the reference is omitted then the first available reference will be returned.

Some glasses and compounds have common abbreviations. These can also be used, through the aliases system, which takes precedent in material retrieval. For example:

` m = material['SODA_LIME'] `

the full dictionary of available in the attribute material.aliases.