gds_fdtd.materials.rii

refractiveindex.info database support.

Reads material pages from a LOCAL copy of the refractiveindex.info database (https://github.com/polyanskiy/refractiveindex.info-database) — the DB is plain YAML, so a small reader avoids a wrapper dependency. Offline-first by design: nothing here ever downloads; CI and docs use a committed page fixture.

Database directory resolution order:

  1. explicit db_dir argument,

  2. GDS_FDTD_RII_DB environment variable,

  3. ~/.cache/gds_fdtd/rii (where a user may clone/copy the database’s data folder).

Page path convention: <db_dir>/<shelf>/<book>/<page>.yml.

Supported data blocks (the overwhelmingly common ones):

  • tabulated nk / tabulated n / tabulated k

  • formula 1 (Sellmeier) and formula 2 (Sellmeier-2)

Other formula types raise a clear error naming the page.

Functions

load_rii_material(shelf, book, page[, db_dir])

Load one refractiveindex.info page from the local database copy.

Classes

RiiMaterial(shelf, book, page, wavelength_um, n)

Tabulated optical constants for one refractiveindex.info page.