PyOptik 1.1.3.post0__tar.gz → 1.1.4.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.1.3.post0 → pyoptik-1.1.4.post0}/.gitignore +1 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PKG-INFO +1 -1
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/_version.py +2 -2
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/material.py +19 -1
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/tabulated_class.py +1 -1
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik.egg-info/PKG-INFO +1 -1
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik.egg-info/SOURCES.txt +0 -1
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/tests/test_usual_material.py +10 -2
- pyoptik-1.1.3.post0/.coverage +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/.github/dependabot.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/.github/workflows/coverage.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/.github/workflows/deploy_workflow.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/.readthedocs.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/LICENSE +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/__init__.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/base_class.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/__init__.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/BAK1.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/BK7.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/SF5.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/ZBLAN.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/__init__.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/argon.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/crown.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/default.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/flint.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_1%.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_2%.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/fused_silica.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/germanium.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/lithium_niobate.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/polystyren.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/silica.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/silicon.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/soda_lime_glass.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/test.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/water.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/__init__.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/aluminium.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/calcium.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/copper.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/default.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/gold.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/iron.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/nickel.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/silver.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/sodium.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/test.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/tabulated/zinc.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/test.yml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/directories.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/download.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/sellmeier_class.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/utils.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik.egg-info/dependency_links.txt +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik.egg-info/requires.txt +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik.egg-info/top_level.txt +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/README.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/developments/testing.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/Makefile +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/deprecated/experiment_material.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/README.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/measurements_tio2.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/measurements_water.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/sellmeier_bk7.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/sellmeier_sf5.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/examples/sellmeier_silica.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/images/logo.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/make.bat +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/_static/default.css +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/code.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/conf.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/add_material.ipynb +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/add_material.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/add_material.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/add_material_codeobj.pickle +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/get_values.ipynb +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/get_values.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/get_values.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/get_values_codeobj.pickle +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/sphx_glr_plot_sellmeier_0_001.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/sphx_glr_plot_sellmeier_1_001.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/thumb/sphx_glr_add_material_thumb.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/thumb/sphx_glr_get_values_thumb.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_sellmeier_0_thumb.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/images/thumb/sphx_glr_plot_sellmeier_1_thumb.png +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/index.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_0.ipynb +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_0.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_0.py.md5 +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_0.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_0_codeobj.pickle +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_1.ipynb +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_1.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_1.py.md5 +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_1.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/plot_sellmeier_1_codeobj.pickle +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/gallery/sg_execution_times.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/index.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/docs/source/references.rst +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/pyproject.toml +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/setup.cfg +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/tests/__init__.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/tests/test_extra.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/tests/test_sellmeier.py +0 -0
- {pyoptik-1.1.3.post0 → pyoptik-1.1.4.post0}/tests/test_tabulated.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.1.
|
|
16
|
-
__version_tuple__ = version_tuple = (1, 1,
|
|
15
|
+
__version__ = version = '1.1.4.post0'
|
|
16
|
+
__version_tuple__ = version_tuple = (1, 1, 4)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
from typing import Union
|
|
1
2
|
from PyOptik.sellmeier_class import SellmeierMaterial
|
|
2
3
|
from PyOptik.tabulated_class import TabulatedMaterial
|
|
4
|
+
from PyOptik import data
|
|
3
5
|
|
|
4
6
|
class staticproperty(property):
|
|
5
7
|
def __get__(self, owner_self, owner_cls):
|
|
@@ -19,8 +21,20 @@ class UsualMaterial:
|
|
|
19
21
|
'BK7',
|
|
20
22
|
'fused_silica',
|
|
21
23
|
'germanium',
|
|
24
|
+
'polystyren'
|
|
22
25
|
]
|
|
23
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
|
+
|
|
24
38
|
@staticproperty
|
|
25
39
|
def silver():
|
|
26
40
|
return TabulatedMaterial('silver')
|
|
@@ -45,6 +59,10 @@ class UsualMaterial:
|
|
|
45
59
|
def iron():
|
|
46
60
|
return TabulatedMaterial('iron')
|
|
47
61
|
|
|
62
|
+
@staticproperty
|
|
63
|
+
def polystyren():
|
|
64
|
+
return SellmeierMaterial('polystyren')
|
|
65
|
+
|
|
48
66
|
@staticproperty
|
|
49
67
|
def argon():
|
|
50
68
|
return SellmeierMaterial('argon')
|
|
@@ -67,4 +85,4 @@ class UsualMaterial:
|
|
|
67
85
|
|
|
68
86
|
@staticproperty
|
|
69
87
|
def germanium():
|
|
70
|
-
return SellmeierMaterial('germanium')
|
|
88
|
+
return SellmeierMaterial('germanium')
|
|
@@ -63,7 +63,7 @@ class TabulatedMaterial(Material):
|
|
|
63
63
|
n_interp = interp1d(self.wavelength, self.n_values, kind='cubic', fill_value='extrapolate')
|
|
64
64
|
k_interp = interp1d(self.wavelength, self.k_values, kind='cubic', fill_value='extrapolate')
|
|
65
65
|
|
|
66
|
-
return n_interp(wavelength)
|
|
66
|
+
return n_interp(wavelength) + 1j * k_interp(wavelength)
|
|
67
67
|
|
|
68
68
|
def plot(self) -> None:
|
|
69
69
|
"""
|
|
@@ -9,9 +9,17 @@ def test_usual_material(material_name):
|
|
|
9
9
|
"""
|
|
10
10
|
material_instance = getattr(UsualMaterial, material_name)
|
|
11
11
|
|
|
12
|
-
print(material_instance.__class__)
|
|
13
|
-
|
|
14
12
|
assert isinstance(material_instance, (SellmeierMaterial, TabulatedMaterial)), f"{material_name} instantiation failed."
|
|
15
13
|
|
|
14
|
+
@pytest.mark.parametrize('material_name', UsualMaterial.all, ids=lambda name: f'Test {name}')
|
|
15
|
+
def test_get_material(material_name):
|
|
16
|
+
"""
|
|
17
|
+
Test each usual material defined in UsualMaterial to ensure that it can be instantiated without errors.
|
|
18
|
+
"""
|
|
19
|
+
material_instance = UsualMaterial.get('silver')
|
|
20
|
+
|
|
21
|
+
assert isinstance(material_instance, TabulatedMaterial), f"{material_name} instantiation failed."
|
|
22
|
+
|
|
23
|
+
|
|
16
24
|
if __name__ == "__main__":
|
|
17
25
|
pytest.main([__file__])
|
pyoptik-1.1.3.post0/.coverage
DELETED
|
Binary file
|
|
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.1.3.post0 → pyoptik-1.1.4.post0}/PyOptik/data/sellmeier/fluorine_doped_silica_1%.yml
RENAMED
|
File without changes
|
{pyoptik-1.1.3.post0 → pyoptik-1.1.4.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
|
|
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.1.3.post0 → pyoptik-1.1.4.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.1.3.post0 → pyoptik-1.1.4.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
|