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.

Parameters:
  • book (str) – Name of the Material, named ‘Book’ on the website and the database. E.g. ‘Au’

  • page (str) – Name of the Source, named ‘Page’ on the website and the database. E.g. ‘Johnson’

Returns:

Dispersion information.

Return type:

str

get_mat(book, page)

Load a dispersion from the refractive index database and generates an isotropic material. Selection by material and source identifiers.

Parameters:
  • book (str) – Name of the Material, named ‘Book’ on the website and the database. E.g. ‘Au’

  • page (str) – Name of the Source, named ‘Page’ on the website and the database. E.g. ‘Johnson’

Returns:

A material object build from the tabulated dispersion data.

Return type:

IsotropicMaterial

get_reference(book, page)

Reads the reference information from the selected dispersion.

Parameters:
  • book (str) – Name of the Material, named ‘Book’ on the website and the database. E.g. ‘Au’

  • page (str) – Name of the Source, named ‘Page’ on the website and the database. E.g. ‘Johnson’

Returns:

Reference information.

Return type:

str

load_dispersion(book, page)

Load a dispersion from the refractive index database. Selection by material and source identifiers.

Parameters:
  • book (str) – Name of the Material, named ‘Book’ on the website and the database. E.g. ‘Au’

  • page (str) – Name of the Source, named ‘Page’ on the website and the database. E.g. ‘Johnson’

Returns:

A dispersion object containing the tabulated data.

Return type:

Dispersion

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.

Parameters:
  • query (str) – String to search.

  • longname (bool, optional) – Search book_longname instead. Defaults to False.

  • fuzzy (bool, optional) – Search approximate entries. Defaults to True.

Returns:

Filtered Catalog dataframe.

Return type:

pd.DataFrame

search_page(query, fuzzy=True)

Search the catalog by the query string in the page field. Optionally able to search approximate entries.

Parameters:
  • query (str) – String to search.

  • fuzzy (bool, optional) – Search approximate entries. Defaults to True.

Returns:

Filtered Catalog dataframe.

Return type:

pd.DataFrame