PyOptik 1.10.4__tar.gz → 1.10.7__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.10.4 → pyoptik-1.10.7}/.github/workflows/deploy_documentation.yml +0 -1
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PKG-INFO +1 -3
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/_version.py +2 -2
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/directories.py +1 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material/sellmeier_class.py +18 -19
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material/tabulated_class.py +21 -17
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material_bank.py +0 -2
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik.egg-info/PKG-INFO +1 -3
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik.egg-info/SOURCES.txt +2 -3
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik.egg-info/requires.txt +0 -2
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/tabulated/plot_silver.py +0 -1
- {pyoptik-1.10.4 → pyoptik-1.10.7}/meta.yaml +1 -3
- {pyoptik-1.10.4 → pyoptik-1.10.7}/pyproject.toml +3 -3
- {pyoptik-1.10.4 → pyoptik-1.10.7}/tests/test_utils.py +3 -3
- pyoptik-1.10.4/.readthedocs.yml +0 -35
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.flake8 +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.github/dependabot.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.github/workflows/deploy_PyPi.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.github/workflows/deploy_anaconda.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.github/workflows/deploy_coverage.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/.gitignore +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/LICENSE +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/__init__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/__main__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/__init__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/BAF10.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/BAK1.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/FK51A.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/LASF9.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/SF10.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/SF11.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/SF5.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/ZBLAN.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/acetone.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/acetylene.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/air.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/argon.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/cellulose.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/crown.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/ethane.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/ethanol.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/ethylene.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/flint.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/fused_silica.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/germanium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/glycerol.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/lithium_niobate.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/methane.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/methanol.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/polycarbonate.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/polystyren.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/polystyrene.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/propanol.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/pvc.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/soda_lime_glass.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/sellmeier/water.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/BK7.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/aluminium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/bismuth.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/calcium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/chromium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/copper.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/gold.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/iron.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/lead.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/magnesium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/nickel.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/paladium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/polyetylene.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/pva.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/rhodium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/silicon.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/silver.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/sodium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/tantalum.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/titanium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/tungsten.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/vanadium.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/data/tabulated/zinc.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/__init__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/classics.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/dielectrics.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/metals.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/minimal.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/organics.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/others.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/polymers.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/libraries/repertoire.yml +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material/__init__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material/base_class.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/material_type.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/units.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik/utils.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik.egg-info/dependency_links.txt +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/PyOptik.egg-info/top_level.txt +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/README.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/development/dev_0.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/Makefile +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/README.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/sellmeier/README.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/sellmeier/plot_bk7.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/sellmeier/plot_silica.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/sellmeier/plot_water.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/tabulated/README.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/tabulated/plot_sf5.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/utils/README.rst +0 -0
- /pyoptik-1.10.4/docs/examples/utils/build_library.py → /pyoptik-1.10.7/docs/examples/utils/__build_library.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/utils/__download_yml_file.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/utils/create_sellmeier_file.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/examples/utils/create_tabulated_file.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/images/example_bk7.png +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/images/logo.png +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/make.bat +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/_static/default.css +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/_static/thumbnail.png +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/code.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/conf.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/gallery/index.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/index.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/docs/source/references.rst +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/setup.cfg +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/tests/__init__.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/tests/test_sellmeier.py +0 -0
- {pyoptik-1.10.4 → pyoptik-1.10.7}/tests/test_tabulated.py +0 -0
- /pyoptik-1.10.4/tests/test_usual_material.py → /pyoptik-1.10.7/tests/test_usual_materials.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyOptik
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.7
|
|
4
4
|
Summary: A package for refractive index values.
|
|
5
5
|
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -36,9 +36,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
36
36
|
Requires-Python: >=3.10
|
|
37
37
|
Description-Content-Type: text/x-rst
|
|
38
38
|
License-File: LICENSE
|
|
39
|
-
Requires-Dist: flexparser<0.4
|
|
40
39
|
Requires-Dist: pint~=0.24
|
|
41
|
-
Requires-Dist: pydantic~=2.9
|
|
42
40
|
Requires-Dist: numpy
|
|
43
41
|
Requires-Dist: matplotlib~=3.8
|
|
44
42
|
Requires-Dist: requests~=2.31
|
|
@@ -28,6 +28,7 @@ logo_path = doc_path.joinpath('images/logo.png')
|
|
|
28
28
|
examples_path = root_path.joinpath('examples')
|
|
29
29
|
|
|
30
30
|
sellmeier_data_path = root_path.joinpath('data/sellmeier')
|
|
31
|
+
|
|
31
32
|
tabulated_data_path = root_path.joinpath('data/tabulated')
|
|
32
33
|
|
|
33
34
|
data_path = root_path.joinpath('data')
|
|
@@ -6,19 +6,12 @@ import numpy
|
|
|
6
6
|
import itertools
|
|
7
7
|
from MPSPlots.styles import mps
|
|
8
8
|
import matplotlib.pyplot as plt
|
|
9
|
-
from
|
|
10
|
-
from typing import Tuple, Optional, Union
|
|
9
|
+
from typing import Optional, Union
|
|
11
10
|
from PyOptik.units import micrometer, Quantity
|
|
12
11
|
from PyOptik.directories import sellmeier_data_path
|
|
13
12
|
from PyOptik.material.base_class import BaseMaterial
|
|
14
13
|
|
|
15
14
|
|
|
16
|
-
config_dict = ConfigDict(
|
|
17
|
-
arbitrary_types_allowed=True
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@dataclass(config=config_dict, slots=True, eq=False)
|
|
22
15
|
class SellmeierMaterial(BaseMaterial):
|
|
23
16
|
"""
|
|
24
17
|
Class representing a material with Sellmeier coefficients for refractive index computation.
|
|
@@ -36,12 +29,24 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
36
29
|
formula_type : int
|
|
37
30
|
The formula type to use for refractive index calculation.
|
|
38
31
|
"""
|
|
39
|
-
filename: str
|
|
32
|
+
def __init__(self, filename: str):
|
|
33
|
+
"""
|
|
34
|
+
Initializes the SellmeierMaterial with a filename.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
|
|
39
|
+
filename : str
|
|
40
|
+
The name of the YAML file containing material properties.
|
|
41
|
+
"""
|
|
42
|
+
self.filename = filename
|
|
43
|
+
|
|
44
|
+
self.coefficients = None
|
|
45
|
+
self.wavelength_bound = None
|
|
46
|
+
self.reference = None
|
|
47
|
+
self.formula_type = None
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
wavelength_bound: Optional[Tuple[float, float]] = Field(default=None)
|
|
43
|
-
reference: Optional[str] = Field(default=None)
|
|
44
|
-
formula_type: Optional[int] = Field(default=None)
|
|
49
|
+
self._load_coefficients()
|
|
45
50
|
|
|
46
51
|
def __repr__(self) -> str:
|
|
47
52
|
return self.__str__()
|
|
@@ -49,12 +54,6 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
49
54
|
def __str__(self) -> str:
|
|
50
55
|
return self.filename
|
|
51
56
|
|
|
52
|
-
def __post_init__(self) -> None:
|
|
53
|
-
"""
|
|
54
|
-
Post-initialization method to load coefficients, wavelength range, formula type, and reference from a YAML file.
|
|
55
|
-
"""
|
|
56
|
-
self._load_coefficients()
|
|
57
|
-
|
|
58
57
|
def _load_coefficients(self) -> None:
|
|
59
58
|
"""
|
|
60
59
|
Loads the Sellmeier coefficients, wavelength range, formula type, and reference from the specified YAML file.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
|
|
4
4
|
import numpy
|
|
5
|
-
from pydantic.dataclasses import dataclass, Field, ConfigDict
|
|
6
5
|
from typing import Optional, Union
|
|
7
6
|
import yaml
|
|
8
7
|
from PyOptik.directories import tabulated_data_path
|
|
@@ -12,12 +11,7 @@ import matplotlib.pyplot as plt
|
|
|
12
11
|
from PyOptik.units import Quantity, micrometer, meter
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
config_dict = ConfigDict(
|
|
16
|
-
arbitrary_types_allowed=True
|
|
17
|
-
)
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
@dataclass(config=config_dict, slots=True, eq=False)
|
|
21
15
|
class TabulatedMaterial(BaseMaterial):
|
|
22
16
|
"""
|
|
23
17
|
Class representing a material with tabulated refractive index (n) and absorption (k) values.
|
|
@@ -35,11 +29,27 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
35
29
|
reference : Optional[str]
|
|
36
30
|
Reference information for the material data.
|
|
37
31
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
|
|
33
|
+
def __init__(self, filename: str):
|
|
34
|
+
"""
|
|
35
|
+
Initializes the TabulatedMaterial with a filename.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
filename : str
|
|
40
|
+
The name of the YAML file containing material properties.
|
|
41
|
+
"""
|
|
42
|
+
self.filename = filename
|
|
43
|
+
|
|
44
|
+
# Initialize attributes
|
|
45
|
+
self.wavelength_bound = None
|
|
46
|
+
self.wavelength = None
|
|
47
|
+
self.n_values = None
|
|
48
|
+
self.k_values = None
|
|
49
|
+
self.reference = None
|
|
50
|
+
|
|
51
|
+
# Load tabulated data from the YAML file
|
|
52
|
+
self._load_tabulated_data()
|
|
43
53
|
|
|
44
54
|
def __repr__(self) -> str:
|
|
45
55
|
return self.__str__()
|
|
@@ -47,12 +57,6 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
47
57
|
def __str__(self) -> str:
|
|
48
58
|
return self.filename
|
|
49
59
|
|
|
50
|
-
def __post_init__(self) -> None:
|
|
51
|
-
"""
|
|
52
|
-
Post-initialization method to load the tabulated data from the YAML file.
|
|
53
|
-
"""
|
|
54
|
-
self._load_tabulated_data()
|
|
55
|
-
|
|
56
60
|
def _load_tabulated_data(self) -> None:
|
|
57
61
|
"""
|
|
58
62
|
Loads the tabulated refractive index and absorption values from the specified YAML file.
|
|
@@ -13,11 +13,9 @@ from PyOptik.material.sellmeier_class import SellmeierMaterial
|
|
|
13
13
|
from PyOptik.material.tabulated_class import TabulatedMaterial
|
|
14
14
|
from PyOptik.utils import download_yml_file
|
|
15
15
|
from tabulate import tabulate
|
|
16
|
-
from dataclasses import dataclass
|
|
17
16
|
from PyOptik.material_type import MaterialType
|
|
18
17
|
|
|
19
18
|
|
|
20
|
-
@dataclass(frozen=True, slots=True)
|
|
21
19
|
class _MaterialBank():
|
|
22
20
|
"""
|
|
23
21
|
A class representing a centralized material bank for common optical materials available in the PyOptik library.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyOptik
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.7
|
|
4
4
|
Summary: A package for refractive index values.
|
|
5
5
|
Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -36,9 +36,7 @@ Classifier: Intended Audience :: Science/Research
|
|
|
36
36
|
Requires-Python: >=3.10
|
|
37
37
|
Description-Content-Type: text/x-rst
|
|
38
38
|
License-File: LICENSE
|
|
39
|
-
Requires-Dist: flexparser<0.4
|
|
40
39
|
Requires-Dist: pint~=0.24
|
|
41
|
-
Requires-Dist: pydantic~=2.9
|
|
42
40
|
Requires-Dist: numpy
|
|
43
41
|
Requires-Dist: matplotlib~=3.8
|
|
44
42
|
Requires-Dist: requests~=2.31
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.flake8
|
|
2
2
|
.gitignore
|
|
3
|
-
.readthedocs.yml
|
|
4
3
|
LICENSE
|
|
5
4
|
README.rst
|
|
6
5
|
meta.yaml
|
|
@@ -103,8 +102,8 @@ docs/examples/tabulated/README.rst
|
|
|
103
102
|
docs/examples/tabulated/plot_sf5.py
|
|
104
103
|
docs/examples/tabulated/plot_silver.py
|
|
105
104
|
docs/examples/utils/README.rst
|
|
105
|
+
docs/examples/utils/__build_library.py
|
|
106
106
|
docs/examples/utils/__download_yml_file.py
|
|
107
|
-
docs/examples/utils/build_library.py
|
|
108
107
|
docs/examples/utils/create_sellmeier_file.py
|
|
109
108
|
docs/examples/utils/create_tabulated_file.py
|
|
110
109
|
docs/images/example_bk7.png
|
|
@@ -119,5 +118,5 @@ docs/source/gallery/index.rst
|
|
|
119
118
|
tests/__init__.py
|
|
120
119
|
tests/test_sellmeier.py
|
|
121
120
|
tests/test_tabulated.py
|
|
122
|
-
tests/
|
|
121
|
+
tests/test_usual_materials.py
|
|
123
122
|
tests/test_utils.py
|
|
@@ -9,7 +9,6 @@ This module demonstrates the usage of the PyOptik library to calculate and plot
|
|
|
9
9
|
# %%
|
|
10
10
|
import numpy
|
|
11
11
|
from PyOptik import MaterialBank
|
|
12
|
-
MaterialBank.build_library('metals')
|
|
13
12
|
|
|
14
13
|
# Initialize the material with the Sellmeier model
|
|
15
14
|
material = MaterialBank.silver
|
|
@@ -23,14 +23,12 @@ requirements:
|
|
|
23
23
|
- setuptools-scm >=8.0
|
|
24
24
|
- pip
|
|
25
25
|
run:
|
|
26
|
-
- flexparser <0.4 # This is due to a dataclass inheritance problem coming from the pint package
|
|
27
26
|
- pint ~= 0.24
|
|
28
|
-
- martinpdes::mpsplots
|
|
27
|
+
- martinpdes::mpsplots
|
|
29
28
|
- pyyaml ~=6.0
|
|
30
29
|
- requests ~=2.31
|
|
31
30
|
- matplotlib ~=3.8
|
|
32
31
|
- numpy
|
|
33
|
-
- pydantic ~=2.9
|
|
34
32
|
- tabulate ~=0.9
|
|
35
33
|
|
|
36
34
|
about:
|
|
@@ -23,9 +23,7 @@ classifiers = [
|
|
|
23
23
|
keywords = ["refracive index", "optics"]
|
|
24
24
|
|
|
25
25
|
dependencies = [
|
|
26
|
-
"flexparser <0.4", # This is due to a dataclass inheritance problem coming from the pint package
|
|
27
26
|
"pint ~=0.24",
|
|
28
|
-
"pydantic ~=2.9",
|
|
29
27
|
"numpy",
|
|
30
28
|
"matplotlib ~=3.8",
|
|
31
29
|
"requests ~=2.31",
|
|
@@ -72,7 +70,9 @@ minversion = "6.0"
|
|
|
72
70
|
xfail_strict = true
|
|
73
71
|
log_cli_level = "INFO"
|
|
74
72
|
testpaths = [
|
|
75
|
-
"tests
|
|
73
|
+
"tests/test_sellmeier.py",
|
|
74
|
+
"tests/test_tabulated.py",
|
|
75
|
+
"tests/test_usual_materials.py",
|
|
76
76
|
]
|
|
77
77
|
addopts = [
|
|
78
78
|
'-v',
|
|
@@ -8,8 +8,8 @@ from PyOptik.utils import download_yml_file
|
|
|
8
8
|
MaterialBank.set_filter(use_sellmeier=True, use_tabulated=True)
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
def test_main():
|
|
12
|
+
MaterialBank.build_library('minimal', remove_previous=True)
|
|
13
13
|
|
|
14
14
|
url_water = 'https://refractiveindex.info/database/data/main/H2O/nk/Daimon-19.0C.yml'
|
|
15
15
|
|
|
@@ -154,7 +154,7 @@ def test_create_custom_tabulated_file():
|
|
|
154
154
|
)
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
def
|
|
157
|
+
def test_download_yml_file_http_error_log(caplog):
|
|
158
158
|
with pytest.raises(ValueError):
|
|
159
159
|
download_yml_file(
|
|
160
160
|
filename='example_download',
|
pyoptik-1.10.4/.readthedocs.yml
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# .readthedocs.yml
|
|
2
|
-
# Read the Docs configuration file
|
|
3
|
-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
-
|
|
5
|
-
# Required
|
|
6
|
-
version: 2
|
|
7
|
-
|
|
8
|
-
submodules:
|
|
9
|
-
include: all
|
|
10
|
-
recursive: true
|
|
11
|
-
|
|
12
|
-
build:
|
|
13
|
-
os: ubuntu-22.04
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
tools:
|
|
17
|
-
python: "3.10"
|
|
18
|
-
jobs:
|
|
19
|
-
pre_install:
|
|
20
|
-
- Xvfb :99 &
|
|
21
|
-
- export DISPLAY=:99
|
|
22
|
-
- cd docs && rm -rf source/gallery
|
|
23
|
-
- sleep 3
|
|
24
|
-
|
|
25
|
-
python:
|
|
26
|
-
install:
|
|
27
|
-
- method: pip
|
|
28
|
-
path: .
|
|
29
|
-
extra_requirements:
|
|
30
|
-
- documentation
|
|
31
|
-
|
|
32
|
-
sphinx:
|
|
33
|
-
builder: html
|
|
34
|
-
configuration: docs/source/conf.py
|
|
35
|
-
fail_on_warning: false
|
|
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
|
|
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.10.4/tests/test_usual_material.py → /pyoptik-1.10.7/tests/test_usual_materials.py
RENAMED
|
File without changes
|