PyOptik 1.4.0.post0__tar.gz → 1.4.1.post0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PKG-INFO +1 -1
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/__init__.py +0 -1
- pyoptik-1.4.0.post0/PyOptik/download.py → pyoptik-1.4.1.post0/PyOptik/__main__.py +1 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/_version.py +2 -2
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/base_class.py +2 -0
- pyoptik-1.4.1.post0/PyOptik/material.py +129 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/sellmeier_class.py +4 -4
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/tabulated_class.py +2 -2
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/utils.py +5 -5
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik.egg-info/PKG-INFO +1 -1
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik.egg-info/SOURCES.txt +1 -1
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/create_sellmeier_file.py +1 -1
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/tests/test_usual_material.py +2 -2
- pyoptik-1.4.0.post0/PyOptik/material.py +0 -88
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/.github/dependabot.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/.github/workflows/coverage.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/.github/workflows/deploy_workflow.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/.gitignore +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/.readthedocs.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/LICENSE +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/__init__.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/BAK1.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/BK7.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/SF5.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/ZBLAN.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/__init__.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/argon.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/crown.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/default.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/flint.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_1%.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_2%.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/fused_silica.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/germanium.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/lithium_niobate.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/polystyren.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/silica.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/silicon.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/soda_lime_glass.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/water.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/__init__.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/aluminium.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/calcium.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/copper.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/default.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/gold.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/iron.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/nickel.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/silver.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/sodium.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/tabulated/zinc.yml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/directories.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik.egg-info/dependency_links.txt +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik.egg-info/requires.txt +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik.egg-info/top_level.txt +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/README.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/Makefile +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/deprecated/experiment_material.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/README.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/create_tabulated_file.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/download_yml_file.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/plot_bk7.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/plot_sf5.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/plot_silica.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/plot_silver.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/examples/plot_water.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/images/example_bk7.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/images/logo.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/make.bat +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/_static/default.css +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/code.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/conf.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/add_material.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/add_material.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/add_material.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/add_material_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/get_values.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/get_values.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/get_values.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/get_values_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_create_sellmeier_file_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_create_tabulated_file_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_download_yml_file_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_bk7_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_sellmeier_0_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_sellmeier_1_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_sf5_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_silica_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_silver_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_water_001.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_add_material_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_create_sellmeier_file_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_create_tabulated_file_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_download_yml_file_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_get_values_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_bk7_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_sellmeier_0_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_sellmeier_1_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_sf5_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_silica_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_silver_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_water_thumb.png +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/index.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_bk7.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_bk7.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_bk7.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_bk7.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_bk7_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sf5.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sf5.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sf5.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sf5.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sf5_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silica.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silica.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silica.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silica.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silica_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silver.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silver.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silver.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silver.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_silver_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_water.ipynb +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_water.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_water.py.md5 +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_water.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_water_codeobj.pickle +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/sg_execution_times.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/index.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/references.rst +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/pyproject.toml +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/setup.cfg +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/tests/__init__.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/tests/test_sellmeier.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/tests/test_tabulated.py +0 -0
- {pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/tests/test_utils.py +0 -0
|
@@ -12,5 +12,5 @@ __version__: str
|
|
|
12
12
|
__version_tuple__: VERSION_TUPLE
|
|
13
13
|
version_tuple: VERSION_TUPLE
|
|
14
14
|
|
|
15
|
-
__version__ = version = '1.4.
|
|
16
|
-
__version_tuple__ = version_tuple = (1, 4,
|
|
15
|
+
__version__ = version = '1.4.1.post0'
|
|
16
|
+
__version_tuple__ = version_tuple = (1, 4, 1)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
from typing import Union
|
|
5
|
+
from PyOptik.sellmeier_class import SellmeierMaterial
|
|
6
|
+
from PyOptik.tabulated_class import TabulatedMaterial
|
|
7
|
+
from PyOptik import data
|
|
8
|
+
|
|
9
|
+
class staticproperty(property):
|
|
10
|
+
"""
|
|
11
|
+
A descriptor that mimics the behavior of a @property but for class-level access.
|
|
12
|
+
|
|
13
|
+
This allows a method to be accessed like a static property without the need to instantiate the class.
|
|
14
|
+
"""
|
|
15
|
+
def __get__(self, owner_self, owner_cls):
|
|
16
|
+
return self.fget()
|
|
17
|
+
|
|
18
|
+
class UsualMaterial:
|
|
19
|
+
"""
|
|
20
|
+
A class representing common materials available in the PyOptik library.
|
|
21
|
+
|
|
22
|
+
This class provides easy access to a predefined list of materials, either through static properties or
|
|
23
|
+
a dynamic getter method. Materials are categorized into Sellmeier and Tabulated materials.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
all_materials = [
|
|
27
|
+
'silver',
|
|
28
|
+
'gold',
|
|
29
|
+
'aluminium',
|
|
30
|
+
'copper',
|
|
31
|
+
'zinc',
|
|
32
|
+
'iron',
|
|
33
|
+
'argon',
|
|
34
|
+
'water',
|
|
35
|
+
'silicon',
|
|
36
|
+
'BK7',
|
|
37
|
+
'fused_silica',
|
|
38
|
+
'germanium',
|
|
39
|
+
'polystyren'
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
@staticmethod
|
|
43
|
+
def get(material_name: str) -> Union[SellmeierMaterial, TabulatedMaterial]:
|
|
44
|
+
"""
|
|
45
|
+
Retrieve a material by name.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
material_name (str): The name of the material to retrieve.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
Union[SellmeierMaterial, TabulatedMaterial]: An instance of the material if found.
|
|
52
|
+
|
|
53
|
+
Raises:
|
|
54
|
+
FileNotFoundError: If the material is not found in either the Sellmeier or Tabulated lists.
|
|
55
|
+
"""
|
|
56
|
+
if material_name in data.sellmeier.material_list:
|
|
57
|
+
return SellmeierMaterial(material_name)
|
|
58
|
+
|
|
59
|
+
if material_name in data.tabulated.material_list:
|
|
60
|
+
return TabulatedMaterial(material_name)
|
|
61
|
+
|
|
62
|
+
raise FileNotFoundError(f'Material: [{material_name}] could not be found.')
|
|
63
|
+
|
|
64
|
+
# Static properties for each material
|
|
65
|
+
|
|
66
|
+
@staticproperty
|
|
67
|
+
def silver() -> TabulatedMaterial:
|
|
68
|
+
"""Get the TabulatedMaterial instance for silver."""
|
|
69
|
+
return TabulatedMaterial('silver')
|
|
70
|
+
|
|
71
|
+
@staticproperty
|
|
72
|
+
def gold() -> TabulatedMaterial:
|
|
73
|
+
"""Get the TabulatedMaterial instance for gold."""
|
|
74
|
+
return TabulatedMaterial('gold')
|
|
75
|
+
|
|
76
|
+
@staticproperty
|
|
77
|
+
def aluminium() -> TabulatedMaterial:
|
|
78
|
+
"""Get the TabulatedMaterial instance for aluminium."""
|
|
79
|
+
return TabulatedMaterial('aluminium')
|
|
80
|
+
|
|
81
|
+
@staticproperty
|
|
82
|
+
def copper() -> TabulatedMaterial:
|
|
83
|
+
"""Get the TabulatedMaterial instance for copper."""
|
|
84
|
+
return TabulatedMaterial('copper')
|
|
85
|
+
|
|
86
|
+
@staticproperty
|
|
87
|
+
def zinc() -> TabulatedMaterial:
|
|
88
|
+
"""Get the TabulatedMaterial instance for zinc."""
|
|
89
|
+
return TabulatedMaterial('zinc')
|
|
90
|
+
|
|
91
|
+
@staticproperty
|
|
92
|
+
def iron() -> TabulatedMaterial:
|
|
93
|
+
"""Get the TabulatedMaterial instance for iron."""
|
|
94
|
+
return TabulatedMaterial('iron')
|
|
95
|
+
|
|
96
|
+
@staticproperty
|
|
97
|
+
def polystyren() -> SellmeierMaterial:
|
|
98
|
+
"""Get the SellmeierMaterial instance for polystyren."""
|
|
99
|
+
return SellmeierMaterial('polystyren')
|
|
100
|
+
|
|
101
|
+
@staticproperty
|
|
102
|
+
def argon() -> SellmeierMaterial:
|
|
103
|
+
"""Get the SellmeierMaterial instance for argon."""
|
|
104
|
+
return SellmeierMaterial('argon')
|
|
105
|
+
|
|
106
|
+
@staticproperty
|
|
107
|
+
def water() -> SellmeierMaterial:
|
|
108
|
+
"""Get the SellmeierMaterial instance for water."""
|
|
109
|
+
return SellmeierMaterial('water')
|
|
110
|
+
|
|
111
|
+
@staticproperty
|
|
112
|
+
def silicon() -> SellmeierMaterial:
|
|
113
|
+
"""Get the SellmeierMaterial instance for silicon."""
|
|
114
|
+
return SellmeierMaterial('silicon')
|
|
115
|
+
|
|
116
|
+
@staticproperty
|
|
117
|
+
def BK7() -> SellmeierMaterial:
|
|
118
|
+
"""Get the SellmeierMaterial instance for BK7."""
|
|
119
|
+
return SellmeierMaterial('BK7')
|
|
120
|
+
|
|
121
|
+
@staticproperty
|
|
122
|
+
def fused_silica() -> SellmeierMaterial:
|
|
123
|
+
"""Get the SellmeierMaterial instance for fused_silica."""
|
|
124
|
+
return SellmeierMaterial('fused_silica')
|
|
125
|
+
|
|
126
|
+
@staticproperty
|
|
127
|
+
def germanium() -> SellmeierMaterial:
|
|
128
|
+
"""Get the SellmeierMaterial instance for germanium."""
|
|
129
|
+
return SellmeierMaterial('germanium')
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
import matplotlib.pyplot as plt
|
|
6
6
|
import numpy
|
|
7
|
-
from typing import Tuple, Optional, Union,
|
|
7
|
+
from typing import Tuple, Optional, Union, List
|
|
8
8
|
import yaml
|
|
9
9
|
from PyOptik.directories import sellmeier_data_path
|
|
10
10
|
import itertools
|
|
@@ -30,9 +30,9 @@ class SellmeierMaterial(Material):
|
|
|
30
30
|
"""
|
|
31
31
|
Loads the Sellmeier coefficients, wavelength range, formula type, and reference from the specified YAML file.
|
|
32
32
|
"""
|
|
33
|
-
file_path = sellmeier_data_path / f'{self.filename}
|
|
33
|
+
file_path = sellmeier_data_path / f'{self.filename}'
|
|
34
34
|
|
|
35
|
-
with open(file_path, 'r') as file:
|
|
35
|
+
with open(file_path.with_suffix('.yml'), 'r') as file:
|
|
36
36
|
parsed_yaml = yaml.safe_load(file)
|
|
37
37
|
|
|
38
38
|
# Extract the formula type
|
|
@@ -129,7 +129,7 @@ class SellmeierMaterial(Material):
|
|
|
129
129
|
return n
|
|
130
130
|
|
|
131
131
|
|
|
132
|
-
def plot(self, wavelength: Optional[List[float]] = None) ->
|
|
132
|
+
def plot(self, wavelength: Optional[List[float]] = None) -> None:
|
|
133
133
|
"""
|
|
134
134
|
Plots the refractive index as a function of wavelength over a specified range.
|
|
135
135
|
|
|
@@ -30,9 +30,9 @@ class TabulatedMaterial(Material):
|
|
|
30
30
|
"""
|
|
31
31
|
Loads the tabulated refractive index and absorption values from the specified YAML file.
|
|
32
32
|
"""
|
|
33
|
-
file_path = tabulated_data_path / f'{self.filename}
|
|
33
|
+
file_path = tabulated_data_path / f'{self.filename}'
|
|
34
34
|
|
|
35
|
-
with open(file_path, 'r') as file:
|
|
35
|
+
with open(file_path.with_suffix('.yml'), 'r') as file:
|
|
36
36
|
parsed_yaml = yaml.safe_load(file)
|
|
37
37
|
|
|
38
38
|
# Extract data points
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import yaml
|
|
3
|
-
from typing import Optional, List, Tuple
|
|
3
|
+
from typing import Optional, List, Tuple
|
|
4
4
|
import requests
|
|
5
5
|
from PyOptik.directories import sellmeier_data_path, tabulated_data_path
|
|
6
6
|
from PyOptik.data.sellmeier.default import default_material as sellmeier_default
|
|
7
7
|
from PyOptik.data.tabulated.default import default_material as tabulated_default
|
|
8
8
|
|
|
9
|
-
def download_yml_file(url: str, filename: str, location: str) ->
|
|
9
|
+
def download_yml_file(url: str, filename: str, location: str) -> None:
|
|
10
10
|
"""
|
|
11
11
|
Downloads a .yml file from a specified URL and saves it locally.
|
|
12
12
|
|
|
@@ -36,7 +36,7 @@ def download_yml_file(url: str, filename: str, location: str) -> NoReturn:
|
|
|
36
36
|
except Exception as err:
|
|
37
37
|
print(f"An error occurred: {err}")
|
|
38
38
|
|
|
39
|
-
def build_default_library() ->
|
|
39
|
+
def build_default_library() -> None:
|
|
40
40
|
"""
|
|
41
41
|
Downloads and saves the default materials from the specified URLs.
|
|
42
42
|
"""
|
|
@@ -83,7 +83,7 @@ def create_sellmeier_file(
|
|
|
83
83
|
wavelength_range: Optional[Tuple[float, float]] = None,
|
|
84
84
|
reference: Optional[str] = None,
|
|
85
85
|
comments: Optional[str] = None,
|
|
86
|
-
specs: Optional[dict] = None) ->
|
|
86
|
+
specs: Optional[dict] = None) -> None:
|
|
87
87
|
"""
|
|
88
88
|
Creates a YAML file with custom Sellmeier coefficients in the correct format.
|
|
89
89
|
|
|
@@ -131,7 +131,7 @@ def create_tabulated_file(
|
|
|
131
131
|
filename: str,
|
|
132
132
|
data: List[Tuple[float, float, float]],
|
|
133
133
|
reference: Optional[str] = None,
|
|
134
|
-
comments: Optional[str] = None) ->
|
|
134
|
+
comments: Optional[str] = None) -> None:
|
|
135
135
|
"""
|
|
136
136
|
Creates a YAML file with tabulated nk data in the correct format.
|
|
137
137
|
|
|
@@ -7,10 +7,10 @@ pyproject.toml
|
|
|
7
7
|
.github/workflows/coverage.yml
|
|
8
8
|
.github/workflows/deploy_workflow.yml
|
|
9
9
|
PyOptik/__init__.py
|
|
10
|
+
PyOptik/__main__.py
|
|
10
11
|
PyOptik/_version.py
|
|
11
12
|
PyOptik/base_class.py
|
|
12
13
|
PyOptik/directories.py
|
|
13
|
-
PyOptik/download.py
|
|
14
14
|
PyOptik/material.py
|
|
15
15
|
PyOptik/sellmeier_class.py
|
|
16
16
|
PyOptik/tabulated_class.py
|
|
@@ -22,7 +22,7 @@ create_sellmeier_file(
|
|
|
22
22
|
formula_type=formula_type,
|
|
23
23
|
wavelength_range=(0.2, 2.0),
|
|
24
24
|
reference="Sample Reference",
|
|
25
|
-
comments="This is a sample Sellmeier file created for demonstration purposes."
|
|
25
|
+
comments="This is a sample Sellmeier file created for demonstration purposes. "
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
print(f"Sellmeier YAML file {filename}.yml has been created in {sellmeier_data_path}")
|
|
@@ -2,7 +2,7 @@ import pytest
|
|
|
2
2
|
from PyOptik import UsualMaterial
|
|
3
3
|
from PyOptik.material import SellmeierMaterial, TabulatedMaterial
|
|
4
4
|
|
|
5
|
-
@pytest.mark.parametrize('material_name', UsualMaterial.
|
|
5
|
+
@pytest.mark.parametrize('material_name', UsualMaterial.all_materials, ids=lambda name: f'Test {name}')
|
|
6
6
|
def test_usual_material(material_name):
|
|
7
7
|
"""
|
|
8
8
|
Test each usual material defined in UsualMaterial to ensure that it can be instantiated without errors.
|
|
@@ -11,7 +11,7 @@ def test_usual_material(material_name):
|
|
|
11
11
|
|
|
12
12
|
assert isinstance(material_instance, (SellmeierMaterial, TabulatedMaterial)), f"{material_name} instantiation failed."
|
|
13
13
|
|
|
14
|
-
@pytest.mark.parametrize('material_name', UsualMaterial.
|
|
14
|
+
@pytest.mark.parametrize('material_name', UsualMaterial.all_materials, ids=lambda name: f'Test {name}')
|
|
15
15
|
def test_get_material(material_name):
|
|
16
16
|
"""
|
|
17
17
|
Test each usual material defined in UsualMaterial to ensure that it can be instantiated without errors.
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
from typing import Union
|
|
2
|
-
from PyOptik.sellmeier_class import SellmeierMaterial
|
|
3
|
-
from PyOptik.tabulated_class import TabulatedMaterial
|
|
4
|
-
from PyOptik import data
|
|
5
|
-
|
|
6
|
-
class staticproperty(property):
|
|
7
|
-
def __get__(self, owner_self, owner_cls):
|
|
8
|
-
return self.fget()
|
|
9
|
-
|
|
10
|
-
class UsualMaterial:
|
|
11
|
-
all = [
|
|
12
|
-
'silver',
|
|
13
|
-
'gold',
|
|
14
|
-
'aluminium',
|
|
15
|
-
'copper',
|
|
16
|
-
'zinc',
|
|
17
|
-
'iron',
|
|
18
|
-
'argon',
|
|
19
|
-
'water',
|
|
20
|
-
'silicon',
|
|
21
|
-
'BK7',
|
|
22
|
-
'fused_silica',
|
|
23
|
-
'germanium',
|
|
24
|
-
'polystyren'
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
@staticmethod
|
|
28
|
-
def get(material_name: str) -> Union[SellmeierMaterial, TabulatedMaterial]:
|
|
29
|
-
if material_name in data.sellmeier.material_list:
|
|
30
|
-
return SellmeierMaterial(material_name)
|
|
31
|
-
|
|
32
|
-
if material_name in data.tabulated.material_list:
|
|
33
|
-
return TabulatedMaterial(material_name)
|
|
34
|
-
|
|
35
|
-
raise FileNotFoundError(f'Material: [{material_name}] could not be found.')
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
@staticproperty
|
|
39
|
-
def silver():
|
|
40
|
-
return TabulatedMaterial('silver')
|
|
41
|
-
|
|
42
|
-
@staticproperty
|
|
43
|
-
def gold():
|
|
44
|
-
return TabulatedMaterial('gold')
|
|
45
|
-
|
|
46
|
-
@staticproperty
|
|
47
|
-
def aluminium():
|
|
48
|
-
return TabulatedMaterial('aluminium')
|
|
49
|
-
|
|
50
|
-
@staticproperty
|
|
51
|
-
def copper():
|
|
52
|
-
return TabulatedMaterial('copper')
|
|
53
|
-
|
|
54
|
-
@staticproperty
|
|
55
|
-
def zinc():
|
|
56
|
-
return TabulatedMaterial('zinc')
|
|
57
|
-
|
|
58
|
-
@staticproperty
|
|
59
|
-
def iron():
|
|
60
|
-
return TabulatedMaterial('iron')
|
|
61
|
-
|
|
62
|
-
@staticproperty
|
|
63
|
-
def polystyren():
|
|
64
|
-
return SellmeierMaterial('polystyren')
|
|
65
|
-
|
|
66
|
-
@staticproperty
|
|
67
|
-
def argon():
|
|
68
|
-
return SellmeierMaterial('argon')
|
|
69
|
-
|
|
70
|
-
@staticproperty
|
|
71
|
-
def water():
|
|
72
|
-
return SellmeierMaterial('water')
|
|
73
|
-
|
|
74
|
-
@staticproperty
|
|
75
|
-
def silicon():
|
|
76
|
-
return SellmeierMaterial('silicon')
|
|
77
|
-
|
|
78
|
-
@staticproperty
|
|
79
|
-
def BK7():
|
|
80
|
-
return SellmeierMaterial('BK7')
|
|
81
|
-
|
|
82
|
-
@staticproperty
|
|
83
|
-
def fused_silica():
|
|
84
|
-
return SellmeierMaterial('fused_silica')
|
|
85
|
-
|
|
86
|
-
@staticproperty
|
|
87
|
-
def germanium():
|
|
88
|
-
return SellmeierMaterial('germanium')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_1%.yml
RENAMED
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_2%.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file.py.md5
RENAMED
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_sellmeier_file_codeobj.pickle
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file.py.md5
RENAMED
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/create_tabulated_file_codeobj.pickle
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/download_yml_file_codeobj.pickle
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_bk7_001.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_sf5_001.png
RENAMED
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_silica_001.png
RENAMED
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_silver_001.png
RENAMED
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/images/sphx_glr_plot_water_001.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_0_codeobj.pickle
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyoptik-1.4.0.post0 → pyoptik-1.4.1.post0}/docs/source/gallery/plot_sellmeier_1_codeobj.pickle
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|