Metadata-Version: 2.4
Name: opticalglass
Version: 2.0.2
Summary: Tools for reading optical material catalogs and libraries
Author-email: Michael J Hayford <mjhoptics@gmail.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/mjhoptics/opticalglass
Project-URL: Changelog, https://opticalglass.readthedocs.io/en/stable/changelog.html
Project-URL: Documentation, https://opticalglass.readthedocs.io/en/stable/
Project-URL: Bug Tracker, https://github.com/mjhoptics/opticalglass/issues
Project-URL: Source Code, https://github.com/mjhoptics/opticalglass
Keywords: glass,optical glass,refractive index,optics,glass catalog
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.12
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy>=2.5.1
Requires-Dist: scipy>=1.18.0
Requires-Dist: matplotlib>=3.11.1
Requires-Dist: pandas>=3.0.5
Requires-Dist: xlrd>=2.0.2
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: zemaxglass>=2.0.1
Requires-Dist: requests>=2.34.2
Requires-Dist: json_tricks>=3.17.3
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: pyside6>=6.11.1
Provides-Extra: testing
Requires-Dist: setuptools; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Provides-Extra: rtd
Requires-Dist: sphinx; extra == "rtd"
Requires-Dist: sphinx_rtd_theme; extra == "rtd"
Provides-Extra: dev
Requires-Dist: opticalglass[rtd,testing]; extra == "dev"
Dynamic: license-file


.. image:: https://app.readthedocs.org/projects/opticalglass/badge/?version=latest
    :alt: ReadTheDocs
    :target: https://opticalglass.readthedocs.io/en/stable/
.. image:: https://img.shields.io/pypi/v/opticalglass.svg
    :alt: PyPI-Server
    :target: https://pypi.org/project/opticalglass/
.. image:: https://img.shields.io/conda/vn/conda-forge/opticalglass.svg
    :alt: Conda-Forge

OpticalGlass
============

Tools for reading optical material catalogs and libraries
---------------------------------------------------------

Common interface for sources of optical material data
-----------------------------------------------------

OpticalGlass provides a common API for querying refractive index data and other properties to a number of different optical material data sources. These include:

    * Excel spreadsheets published by optical glass manufacturers
    * Zemax ANSI Glass Format (.agf) files
    * The `RefractiveIndex.INFO <https://refractiveindex.info>`_ database

The global function `create_glass <https://opticalglass.readthedocs.io/en/latest/opticalglass.html#opticalglass.glassfactory.create_glass>`_ returns a `glass object <https://opticalglass.readthedocs.io/en/stable/opticalglass.html#opticalglass.opticalmedium.OpticalMedium>`_ given a glass name and, optionally, a catalog name. This glass instance can be queried for refractive index and transmittance values.

Interface to optical glass manufacturer glass data spreadsheets
---------------------------------------------------------------

The excel spreadsheets published by optical glass manufacturers are imported using `pandas`. The imported data is read into a dataframe and then mapped to the final glass catalog dataframe, with a common set of headings for different data categories.

The package currently supports the following manufacturers:

    * CDGM
    * Hikari
    * Hoya
    * Ohara
    * Schott
    * Sumita

.. note::

   All rights and ownership of the data is retained by the original owners, i.e the respective manufacturers.

Interface to .AGF files
-----------------------

OpticalGlass provides a wrapper around the .agf file importer in the ZemaxGlass package. Each .agf file is mapped to a Glass Catalog.


Interface to RefractiveIndex.INFO database
------------------------------------------

An interface to the RefractiveIndex.INFO database, using both the InterpolatedMedium and RIIMedium classes, is available.

Glass Map Application
---------------------

A desktop application is installed as part of OpticalGlass. It is invoked by running ``glassmap`` at the command line.

Documentation
-------------

The documentation for OpticalGlass is hosted at `Read the Docs <https://opticalglass.readthedocs.io>`_
