materials.catalog

MaterialCatalog — read-only view into one catalog within the MaterialRegistry.

Provides discovery and search UX for a specific manufacturer catalog.

Kramer Harrison, 2025

Classes

MaterialCatalog(catalog)

Read-only view into one glass manufacturer catalog.

class MaterialCatalog(catalog: str)[source]

Read-only view into one glass manufacturer catalog.

Usage:

MaterialCatalog.groups()  # ['3d', 'glass', 'main', 'organic', 'other']
MaterialCatalog.available()  # glass manufacturers only
MaterialCatalog("schott").list()  # glass names in catalog
MaterialCatalog("schott").search("bk7")  # substring search
MaterialCatalog("schott").get("N-BK7")  # instantiate material
Parameters:

catalog – Glass manufacturer catalog name (e.g. "schott", "ohara").

classmethod available() list[str][source]

Return sorted list of glass manufacturer catalog names.

The list is derived directly from the subdirectory names under the built-in data-nk/glass/ directory, which is the authoritative source of manufacturer catalogs. To list species in non-glass groups use list_catalogs() directly with group='main', 'organic', or 'other'.

get(name: str, match_policy: MatchPolicy = MatchPolicy.WARN) object[source]

Instantiate a Material from this catalog.

Parameters:
  • name – Exact (or close) material name.

  • match_policy – Controls fuzzy-match behavior.

Returns:

A Material instance.

classmethod groups() list[str][source]

Return sorted list of all group names in the database.

Groups reflect the top-level organisation of the refractiveindex.info database: 'glass' (manufacturer catalogs), 'main' (elements and compounds), 'organic' (organic species), 'other' (miscellaneous), and '3d' (metamaterials/plasmonics).

Non-glass groups are not exposed through MaterialCatalog; use list_catalogs() with a group argument to enumerate them.

list() list[str][source]

Return sorted list of material names in this catalog.

search(query: str, n: int | None = None) list[str][source]

Return material names whose name contains query (case-insensitive).

Parameters:
  • query – Substring to search for within glass names.

  • n – Maximum number of results to return. None returns all matches.

Returns:

Sorted list of matching material names.