Dispersion Database¶
- class elli.db.RII¶
Helper class to load tabulated dielectric functions from the https://refractiveindex.info database.
The database object has to be initialized to load the entire catalog:
RII = elli.db.RII()
After initialization the Class provides a dataframe with all entries at RII.catalog, it follows the naming schema used on the website: Entries are categorized by Shelf, Book and Page.
Shelfs are broad categories (inorganics, organics, glasses, other), and ignored in the following.
Book and Page are used to access entries with this helper: For inorganic and organic materials Book uses the sum formula of the compound and Page is an identifier of the author of the publication. In the case of glasses, book is the manufacturer and page the name of the glass.
Both field can be searched by the methods search_book and search_page. They return a dataframe with results ordered by likelihood of matching the search term.
Additionally search_book has a longname option which allows to search for full names (e.g. ‘Gold’) instead of the chemical symbol.
Dispersions or respective materials can be loaded by calling these methods:
gold_material = RII.get_mat("Au", "Johnson") gold_dispersion = RII.load_dispersion("Au", "Johnson")
- get_comment(book, page)¶
Reads the measurement/calculation information of the selected dispersion.
- get_mat(book, page)¶
Load a dispersion from the refractive index database and generates an isotropic material. Selection by material and source identifiers.
- Parameters:
- Returns:
A material object build from the tabulated dispersion data.
- Return type:
- get_reference(book, page)¶
Reads the reference information from the selected dispersion.
- load_dispersion(book, page)¶
Load a dispersion from the refractive index database. Selection by material and source identifiers.
- Parameters:
- Returns:
A dispersion object containing the tabulated data.
- Return type:
- search_book(query, longname=False, fuzzy=True)¶
Search the catalog by the query string in the book field. Optionally able to search approximate entries and the book_longname field.
- search_page(query, fuzzy=True)¶
Search the catalog by the query string in the page field. Optionally able to search approximate entries.