PyOptik 2.0.0__tar.gz → 2.0.2__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-2.0.0 → pyoptik-2.0.2}/.github/dependabot.yml +1 -1
- pyoptik-2.0.2/.gitignore +29 -0
- pyoptik-2.0.2/.pre-commit-config.yaml +20 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PKG-INFO +2 -2
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/_version.py +3 -3
- pyoptik-2.0.2/PyOptik/data/sellmeier/example_sellmeier.yml +6 -0
- pyoptik-2.0.2/PyOptik/data/sellmeier/test_sellmeier_file.yml +7 -0
- pyoptik-2.0.2/PyOptik/data/tabulated/example_tabulated.yml +13 -0
- pyoptik-2.0.2/PyOptik/data/tabulated/test_tabulated_file.yml +9 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material/sellmeier_class.py +11 -13
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material/tabulated_class.py +12 -15
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik.egg-info/PKG-INFO +2 -2
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik.egg-info/SOURCES.txt +5 -1
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik.egg-info/requires.txt +1 -1
- {pyoptik-2.0.0 → pyoptik-2.0.2}/pyproject.toml +1 -1
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_sellmeier.py +13 -0
- pyoptik-2.0.0/.gitignore +0 -28
- pyoptik-2.0.0/docs/source/gallery/index.rst +0 -289
- {pyoptik-2.0.0 → pyoptik-2.0.2}/.flake8 +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/.github/workflows/deploy_PyPi.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/.github/workflows/deploy_anaconda.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/.github/workflows/deploy_coverage.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/.github/workflows/deploy_documentation.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/LICENSE +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/__init__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/__main__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/__init__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/BAF10.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/BAK1.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/BK7.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/FK51A.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/LASF9.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/SF10.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/SF11.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/SF5.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/ZBLAN.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/acetone.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/acetylene.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/air.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/argon.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/cellulose.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/crown.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/ethane.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/ethanol.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/ethylene.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/flint.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/fused_silica.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/germanium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/glycerol.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/lithium_niobate.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/methane.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/methanol.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/polycarbonate.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/polystyren.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/polystyrene.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/propanol.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/pvc.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/soda_lime_glass.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/sellmeier/water.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/aluminium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/bismuth.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/calcium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/chromium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/copper.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/gold.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/iron.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/lead.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/magnesium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/nickel.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/paladium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/polyetylene.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/pva.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/rhodium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/silicon.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/silver.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/sodium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/tantalum.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/titanium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/tungsten.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/vanadium.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/data/tabulated/zinc.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/directories.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/__init__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/classics.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/dielectrics.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/metals.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/minimal.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/organics.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/others.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/polymers.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/libraries/repertoire.yml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material/__init__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material/base_class.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material_bank.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/material_type.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik/utils.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik.egg-info/dependency_links.txt +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/PyOptik.egg-info/top_level.txt +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/development/dev_0.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/Makefile +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/group_properties/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/group_properties/plot_group_properties.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/sellmeier/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/sellmeier/plot_bk7.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/sellmeier/plot_compare_glasses.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/sellmeier/plot_silica.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/sellmeier/plot_water.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/tabulated/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/tabulated/plot_polyethylene.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/tabulated/plot_silicon_nk.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/tabulated/plot_silver.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/README.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/__build_library.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/__download_yml_file.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/create_sellmeier_file.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/create_tabulated_file.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/examples/utils/search_materials.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/images/example_bk7.png +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/images/logo.png +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/make.bat +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/_static/default.css +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/_static/thumbnail.png +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/code.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/conf.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/index.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/references.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/docs/source/sg_execution_times.rst +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/meta.yaml +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/setup.cfg +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/__init__.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_base_material_decorator.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_group_properties.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_main_cli.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_material_bank_extra.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_tabulated.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_usual_materials.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_utils.py +0 -0
- {pyoptik-2.0.0 → pyoptik-2.0.2}/tests/test_utils_extra.py +0 -0
pyoptik-2.0.2/.gitignore
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
# Ignore all
|
|
3
|
+
/*
|
|
4
|
+
|
|
5
|
+
# Except ...
|
|
6
|
+
!.github
|
|
7
|
+
!PyOptik
|
|
8
|
+
!development
|
|
9
|
+
!docs
|
|
10
|
+
!tests
|
|
11
|
+
!.flake8
|
|
12
|
+
!.gitignore
|
|
13
|
+
!.pre-commit-config.yaml
|
|
14
|
+
!LICENSE
|
|
15
|
+
!meta.yaml
|
|
16
|
+
!pyproject.toml
|
|
17
|
+
!README.rst
|
|
18
|
+
!notebook.ipynb
|
|
19
|
+
!CMakeLists.txt
|
|
20
|
+
|
|
21
|
+
# But ignore docs/build inside docs and code
|
|
22
|
+
docs/build/
|
|
23
|
+
docs/source/gallery/
|
|
24
|
+
|
|
25
|
+
# Compiled files in the project
|
|
26
|
+
*__pycache__*
|
|
27
|
+
*.DS_Store*
|
|
28
|
+
*.so*
|
|
29
|
+
*.a*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
|
|
10
|
+
- repo: https://github.com/psf/black
|
|
11
|
+
rev: 24.4.2
|
|
12
|
+
hooks:
|
|
13
|
+
- id: black
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
rev: v0.6.9
|
|
17
|
+
hooks:
|
|
18
|
+
- id: ruff
|
|
19
|
+
args: [--select, I, --fix] # import-order rules + auto-fix
|
|
20
|
+
- id: ruff-format # optional (formatter)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyOptik
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
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
|
|
@@ -40,7 +40,7 @@ Requires-Dist: numpy
|
|
|
40
40
|
Requires-Dist: matplotlib~=3.8
|
|
41
41
|
Requires-Dist: requests~=2.31
|
|
42
42
|
Requires-Dist: pyyaml~=6.0
|
|
43
|
-
Requires-Dist: MPSPlots
|
|
43
|
+
Requires-Dist: MPSPlots
|
|
44
44
|
Requires-Dist: tabulate~=0.9
|
|
45
45
|
Requires-Dist: TypedUnit
|
|
46
46
|
Provides-Extra: testing
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '2.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (2, 0,
|
|
31
|
+
__version__ = version = '2.0.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (2, 0, 2)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g356195240'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
COMMENTS: 'This file contains sample tabulated data for demonstration purposes. '
|
|
2
|
+
DATA:
|
|
3
|
+
- data: '0.1879 0.94 1.337
|
|
4
|
+
|
|
5
|
+
0.1916 0.95 1.388
|
|
6
|
+
|
|
7
|
+
0.1953 0.97 1.44
|
|
8
|
+
|
|
9
|
+
0.1993 0.98 1.493
|
|
10
|
+
|
|
11
|
+
0.2033 0.99 1.55'
|
|
12
|
+
type: tabulated nk
|
|
13
|
+
REFERENCES: Example Reference for Tabulated Data
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
import yaml
|
|
5
5
|
import numpy
|
|
6
6
|
import itertools
|
|
7
|
-
from MPSPlots
|
|
8
|
-
import matplotlib.pyplot as plt
|
|
7
|
+
from MPSPlots import helper
|
|
9
8
|
from TypedUnit import Length, RefractiveIndex, validate_units, ureg
|
|
10
9
|
|
|
11
10
|
from PyOptik.directories import sellmeier_data_path
|
|
@@ -89,13 +88,13 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
89
88
|
self.reference = parsed_yaml.get('REFERENCES', None)
|
|
90
89
|
|
|
91
90
|
@validate_units
|
|
92
|
-
def compute_refractive_index(self, wavelength: Length) -> RefractiveIndex:
|
|
91
|
+
def compute_refractive_index(self, wavelength: Length | float) -> RefractiveIndex:
|
|
93
92
|
r"""
|
|
94
93
|
Computes the refractive index n(\u03bb) using the appropriate formula (either Formula 1, 2, 5, or 6).
|
|
95
94
|
|
|
96
95
|
Parameters
|
|
97
96
|
----------
|
|
98
|
-
wavelength : Length
|
|
97
|
+
wavelength : Length | float
|
|
99
98
|
The wavelength \u03bb in meters, can be a single float or a numpy array.
|
|
100
99
|
|
|
101
100
|
Returns
|
|
@@ -108,6 +107,9 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
108
107
|
ValueError
|
|
109
108
|
If the wavelength is outside the specified range or if an unsupported formula type is encountered.
|
|
110
109
|
"""
|
|
110
|
+
if not isinstance(wavelength, Length):
|
|
111
|
+
wavelength = wavelength * ureg.meter
|
|
112
|
+
|
|
111
113
|
return_as_scalar = numpy.isscalar(wavelength.magnitude)
|
|
112
114
|
|
|
113
115
|
wavelength = numpy.atleast_1d(wavelength)
|
|
@@ -145,7 +147,8 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
145
147
|
|
|
146
148
|
return n[0] if return_as_scalar else n
|
|
147
149
|
|
|
148
|
-
|
|
150
|
+
@helper.pre_plot(nrows=1, ncols=1)
|
|
151
|
+
def plot(self, axes, samples: int = 100) -> None:
|
|
149
152
|
"""
|
|
150
153
|
Plots the refractive index as a function of wavelength over a specified range.
|
|
151
154
|
|
|
@@ -168,18 +171,13 @@ class SellmeierMaterial(BaseMaterial):
|
|
|
168
171
|
# Calculate the refractive index over the wavelength range
|
|
169
172
|
refractive_index = self.compute_refractive_index(wavelength)
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
fig, ax = plt.subplots()
|
|
173
|
-
|
|
174
|
-
ax.set(
|
|
174
|
+
axes.set(
|
|
175
175
|
ylabel='Refractive Index',
|
|
176
176
|
xlabel=r'Wavelength [$\mu$m]',
|
|
177
177
|
title=f"Refractive Index vs. Wavelength: [{self.filename}]"
|
|
178
178
|
)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
plt.show()
|
|
179
|
+
axes.plot(wavelength.to(ureg.micrometer).magnitude, refractive_index.real, linewidth=2, label='Real Part')
|
|
180
|
+
axes.legend()
|
|
183
181
|
|
|
184
182
|
def print(self) -> str:
|
|
185
183
|
"""
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
# -*- coding: utf-8 -*-
|
|
3
3
|
|
|
4
4
|
import numpy
|
|
5
|
-
from typing import Optional, Union
|
|
6
5
|
import yaml
|
|
7
|
-
|
|
8
|
-
from
|
|
9
|
-
from TypedUnit import Length, RefractiveIndex, validate_units, ureg
|
|
6
|
+
from MPSPlots import helper
|
|
7
|
+
from TypedUnit import Length, validate_units, ureg
|
|
10
8
|
|
|
11
9
|
from PyOptik.material.base_class import BaseMaterial
|
|
12
10
|
from PyOptik.directories import tabulated_data_path
|
|
@@ -93,13 +91,13 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
93
91
|
self.reference = parsed_yaml.get('REFERENCES', None)
|
|
94
92
|
|
|
95
93
|
@validate_units
|
|
96
|
-
def compute_refractive_index(self, wavelength: Length) -> numpy.ndarray:
|
|
94
|
+
def compute_refractive_index(self, wavelength: Length | float) -> numpy.ndarray:
|
|
97
95
|
"""
|
|
98
96
|
Interpolates the refractive index (n) and absorption (k) values for the given wavelength(s).
|
|
99
97
|
|
|
100
98
|
Parameters
|
|
101
99
|
----------
|
|
102
|
-
wavelength : Length
|
|
100
|
+
wavelength : Length | float
|
|
103
101
|
Wavelength(s) in micrometers for which to interpolate n and k.
|
|
104
102
|
|
|
105
103
|
Returns
|
|
@@ -112,6 +110,9 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
112
110
|
ValueError
|
|
113
111
|
If the wavelength is outside the tabulated range.
|
|
114
112
|
"""
|
|
113
|
+
if not isinstance(wavelength, Length):
|
|
114
|
+
wavelength = wavelength * ureg.meter
|
|
115
|
+
|
|
115
116
|
return_as_scalar = numpy.isscalar(wavelength.magnitude)
|
|
116
117
|
|
|
117
118
|
wavelength = numpy.atleast_1d(wavelength)
|
|
@@ -125,7 +126,8 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
125
126
|
|
|
126
127
|
return index[0] if return_as_scalar else index
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
@helper.pre_plot(nrows=1, ncols=1)
|
|
130
|
+
def plot(self, axes, samples: int = 100) -> None:
|
|
129
131
|
"""
|
|
130
132
|
Plots the tabulated refractive index (n) and absorption (k) as a function of wavelength.
|
|
131
133
|
|
|
@@ -147,18 +149,15 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
147
149
|
|
|
148
150
|
n_values, k_values = self.compute_refractive_index(wavelength).real, self.compute_refractive_index(wavelength).imag
|
|
149
151
|
|
|
150
|
-
|
|
151
|
-
_, ax1 = plt.subplots()
|
|
152
|
-
|
|
153
|
-
ax1.set(
|
|
152
|
+
axes.set(
|
|
154
153
|
title=f"Refractive Index and Absorption vs. Wavelength [{self.filename}]",
|
|
155
154
|
xlabel='Wavelength [µm]',
|
|
156
155
|
ylabel='Refractive Index (n)',
|
|
157
156
|
)
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
axes.plot(wavelength.to(ureg.micrometer).magnitude, n_values, 'o-', color='tab:blue', label='n')
|
|
160
159
|
|
|
161
|
-
ax2 =
|
|
160
|
+
ax2 = axes.twinx()
|
|
162
161
|
|
|
163
162
|
ax2.set(
|
|
164
163
|
xlabel='Wavelength [µm]',
|
|
@@ -167,8 +166,6 @@ class TabulatedMaterial(BaseMaterial):
|
|
|
167
166
|
|
|
168
167
|
ax2.plot(wavelength.to(ureg.micrometer).magnitude, k_values, 'o-', color='tab:red', label='k')
|
|
169
168
|
|
|
170
|
-
plt.show()
|
|
171
|
-
|
|
172
169
|
def print(self) -> str:
|
|
173
170
|
"""
|
|
174
171
|
Provides a formal string representation of the TabulatedMaterial object, including key attributes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyOptik
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
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
|
|
@@ -40,7 +40,7 @@ Requires-Dist: numpy
|
|
|
40
40
|
Requires-Dist: matplotlib~=3.8
|
|
41
41
|
Requires-Dist: requests~=2.31
|
|
42
42
|
Requires-Dist: pyyaml~=6.0
|
|
43
|
-
Requires-Dist: MPSPlots
|
|
43
|
+
Requires-Dist: MPSPlots
|
|
44
44
|
Requires-Dist: tabulate~=0.9
|
|
45
45
|
Requires-Dist: TypedUnit
|
|
46
46
|
Provides-Extra: testing
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.flake8
|
|
2
2
|
.gitignore
|
|
3
|
+
.pre-commit-config.yaml
|
|
3
4
|
LICENSE
|
|
4
5
|
README.rst
|
|
5
6
|
meta.yaml
|
|
@@ -40,6 +41,7 @@ PyOptik/data/sellmeier/crown.yml
|
|
|
40
41
|
PyOptik/data/sellmeier/ethane.yml
|
|
41
42
|
PyOptik/data/sellmeier/ethanol.yml
|
|
42
43
|
PyOptik/data/sellmeier/ethylene.yml
|
|
44
|
+
PyOptik/data/sellmeier/example_sellmeier.yml
|
|
43
45
|
PyOptik/data/sellmeier/flint.yml
|
|
44
46
|
PyOptik/data/sellmeier/fused_silica.yml
|
|
45
47
|
PyOptik/data/sellmeier/germanium.yml
|
|
@@ -53,12 +55,14 @@ PyOptik/data/sellmeier/polystyrene.yml
|
|
|
53
55
|
PyOptik/data/sellmeier/propanol.yml
|
|
54
56
|
PyOptik/data/sellmeier/pvc.yml
|
|
55
57
|
PyOptik/data/sellmeier/soda_lime_glass.yml
|
|
58
|
+
PyOptik/data/sellmeier/test_sellmeier_file.yml
|
|
56
59
|
PyOptik/data/sellmeier/water.yml
|
|
57
60
|
PyOptik/data/tabulated/aluminium.yml
|
|
58
61
|
PyOptik/data/tabulated/bismuth.yml
|
|
59
62
|
PyOptik/data/tabulated/calcium.yml
|
|
60
63
|
PyOptik/data/tabulated/chromium.yml
|
|
61
64
|
PyOptik/data/tabulated/copper.yml
|
|
65
|
+
PyOptik/data/tabulated/example_tabulated.yml
|
|
62
66
|
PyOptik/data/tabulated/gold.yml
|
|
63
67
|
PyOptik/data/tabulated/iron.yml
|
|
64
68
|
PyOptik/data/tabulated/lead.yml
|
|
@@ -72,6 +76,7 @@ PyOptik/data/tabulated/silicon.yml
|
|
|
72
76
|
PyOptik/data/tabulated/silver.yml
|
|
73
77
|
PyOptik/data/tabulated/sodium.yml
|
|
74
78
|
PyOptik/data/tabulated/tantalum.yml
|
|
79
|
+
PyOptik/data/tabulated/test_tabulated_file.yml
|
|
75
80
|
PyOptik/data/tabulated/titanium.yml
|
|
76
81
|
PyOptik/data/tabulated/tungsten.yml
|
|
77
82
|
PyOptik/data/tabulated/vanadium.yml
|
|
@@ -119,7 +124,6 @@ docs/source/references.rst
|
|
|
119
124
|
docs/source/sg_execution_times.rst
|
|
120
125
|
docs/source/_static/default.css
|
|
121
126
|
docs/source/_static/thumbnail.png
|
|
122
|
-
docs/source/gallery/index.rst
|
|
123
127
|
tests/__init__.py
|
|
124
128
|
tests/test_base_material_decorator.py
|
|
125
129
|
tests/test_group_properties.py
|
|
@@ -165,6 +165,19 @@ def test_material_string_representation():
|
|
|
165
165
|
assert isinstance(material_repr, str)
|
|
166
166
|
assert isinstance(material_print, str)
|
|
167
167
|
|
|
168
|
+
def test_compute_refractive_index_single_wavelength():
|
|
169
|
+
"""Test computation of refractive index for given wavelengths."""
|
|
170
|
+
material = Material('water')
|
|
171
|
+
|
|
172
|
+
# Test single wavelength input
|
|
173
|
+
wavelength = 500 * ureg.nanometer
|
|
174
|
+
refractive_index_0 = material.compute_refractive_index(wavelength)
|
|
175
|
+
|
|
176
|
+
refractive_index_1 = material.compute_refractive_index(wavelength.to('meter').magnitude)
|
|
177
|
+
|
|
178
|
+
assert np.isclose(refractive_index_0, refractive_index_1)
|
|
179
|
+
|
|
180
|
+
|
|
168
181
|
|
|
169
182
|
if __name__ == "__main__":
|
|
170
183
|
pytest.main(["-W error", "-s", __file__])
|
pyoptik-2.0.0/.gitignore
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# General patterns
|
|
2
|
-
*.DS_store
|
|
3
|
-
*.ipynb_checkpoints*
|
|
4
|
-
*__pycache__*
|
|
5
|
-
*.so
|
|
6
|
-
*.a
|
|
7
|
-
.coverage*
|
|
8
|
-
*.pytest_cache
|
|
9
|
-
htmlcov*
|
|
10
|
-
dist
|
|
11
|
-
build
|
|
12
|
-
*.egg*
|
|
13
|
-
*.whl
|
|
14
|
-
CMakeCache.txt
|
|
15
|
-
CMakeFiles
|
|
16
|
-
install_manifest.txt
|
|
17
|
-
cmake_install.cmake
|
|
18
|
-
wheelhouse
|
|
19
|
-
|
|
20
|
-
# Docs-specific patterns
|
|
21
|
-
docs/source/gallery/*
|
|
22
|
-
!docs/source/gallery/index.rst
|
|
23
|
-
PyOptik/data/**/test*
|
|
24
|
-
PyOptik/data/**/example*
|
|
25
|
-
|
|
26
|
-
# Override for documentation_build
|
|
27
|
-
!documentation_build
|
|
28
|
-
!documentation_build/**
|
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
:orphan:
|
|
2
|
-
|
|
3
|
-
.. _examples_gallery:
|
|
4
|
-
|
|
5
|
-
Examples Gallery
|
|
6
|
-
================
|
|
7
|
-
|
|
8
|
-
Welcome to the PyOptik Examples Gallery. Here you will find a collection of examples that demonstrate the versatility and power of PyOptik.
|
|
9
|
-
These examples range from simple introductory use cases to more advanced, application-specific tutorials.
|
|
10
|
-
|
|
11
|
-
The gallery includes:
|
|
12
|
-
|
|
13
|
-
- **Basic API Usage**: Learn how to get started with PyOptik, covering fundamental operations and core functionalities of the library.
|
|
14
|
-
|
|
15
|
-
- **Application Tutorials**: Follow step-by-step guides that show how PyOptik can be used in practical, real-world scenarios, such as:
|
|
16
|
-
|
|
17
|
-
- **Simulating Optical Properties**: Understand how to simulate the optical properties of various materials, including refractive index and absorption characteristics.
|
|
18
|
-
|
|
19
|
-
- **Fiber Optic Analysis**: See how PyOptik can be utilized for fiber optics simulations, providing insights into light propagation and mode analysis.
|
|
20
|
-
|
|
21
|
-
- **Biomedical Imaging Applications**: Discover how PyOptik can be leveraged for imaging purposes, including applications in biomedical optics.
|
|
22
|
-
|
|
23
|
-
These examples are designed to help users at all levels, whether you are a beginner learning how to use the basic API or an experienced user looking for guidance on more advanced use cases.
|
|
24
|
-
|
|
25
|
-
Explore the gallery and unlock the potential of PyOptik for your optical simulations and research!
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.. toctree::
|
|
29
|
-
:maxdepth: 2
|
|
30
|
-
:hidden:
|
|
31
|
-
|
|
32
|
-
sellmeier/index.rst
|
|
33
|
-
tabulated/index.rst
|
|
34
|
-
utils/index.rst
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.. raw:: html
|
|
40
|
-
|
|
41
|
-
<div class="sphx-glr-thumbnails">
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.. raw:: html
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
Examples: Sellmeier Material
|
|
49
|
-
============================
|
|
50
|
-
|
|
51
|
-
This folder contains examples that demonstrate how to use the `SellmeierMaterial` class from the PyOptik library. These examples illustrate the practical applications of modeling materials using the Sellmeier equation, which is commonly used in optical design to determine the refractive index of various materials.
|
|
52
|
-
|
|
53
|
-
Contents
|
|
54
|
-
--------
|
|
55
|
-
|
|
56
|
-
- **Basic Sellmeier Calculation**: Shows how to instantiate the `SellmeierMaterial` class and calculate the refractive index for different wavelengths.
|
|
57
|
-
- **Plotting Refractive Index**: Demonstrates how to visualize the refractive index as a function of wavelength using the `plot` method.
|
|
58
|
-
- **Application Example**: Provides an example of how to use the Sellmeier model in a more advanced optical simulation or analysis.
|
|
59
|
-
|
|
60
|
-
Usage
|
|
61
|
-
-----
|
|
62
|
-
|
|
63
|
-
To run these examples, make sure you have installed all required dependencies as outlined in the main `PyOptik` README. Navigate to this folder and execute the Python scripts as follows:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.. raw:: html
|
|
68
|
-
|
|
69
|
-
<div class="sphx-glr-thumbnails">
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.. raw:: html
|
|
73
|
-
|
|
74
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This module demonstrates the usage of the PyOptik library to calculate and plot the refractive ...">
|
|
75
|
-
|
|
76
|
-
.. only:: html
|
|
77
|
-
|
|
78
|
-
.. image:: /gallery/sellmeier/images/thumb/sphx_glr_plot_bk7_thumb.png
|
|
79
|
-
:alt:
|
|
80
|
-
|
|
81
|
-
:ref:`sphx_glr_gallery_sellmeier_plot_bk7.py`
|
|
82
|
-
|
|
83
|
-
.. raw:: html
|
|
84
|
-
|
|
85
|
-
<div class="sphx-glr-thumbnail-title">Plot the Refractive Index of Optical Material: BK7</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.. raw:: html
|
|
90
|
-
|
|
91
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This module demonstrates the usage of the PyOptik library to calculate and plot the refractive ...">
|
|
92
|
-
|
|
93
|
-
.. only:: html
|
|
94
|
-
|
|
95
|
-
.. image:: /gallery/sellmeier/images/thumb/sphx_glr_plot_silica_thumb.png
|
|
96
|
-
:alt:
|
|
97
|
-
|
|
98
|
-
:ref:`sphx_glr_gallery_sellmeier_plot_silica.py`
|
|
99
|
-
|
|
100
|
-
.. raw:: html
|
|
101
|
-
|
|
102
|
-
<div class="sphx-glr-thumbnail-title">Plot the Refractive Index of Optical Material: Silica</div>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
.. raw:: html
|
|
107
|
-
|
|
108
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This module demonstrates the usage of the PyOptik library to calculate and plot the refractive ...">
|
|
109
|
-
|
|
110
|
-
.. only:: html
|
|
111
|
-
|
|
112
|
-
.. image:: /gallery/sellmeier/images/thumb/sphx_glr_plot_water_thumb.png
|
|
113
|
-
:alt:
|
|
114
|
-
|
|
115
|
-
:ref:`sphx_glr_gallery_sellmeier_plot_water.py`
|
|
116
|
-
|
|
117
|
-
.. raw:: html
|
|
118
|
-
|
|
119
|
-
<div class="sphx-glr-thumbnail-title">Plot the Refractive Index of Optical Material: Water</div>
|
|
120
|
-
</div>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.. raw:: html
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
Examples: Tabulated Material
|
|
128
|
-
============================
|
|
129
|
-
|
|
130
|
-
This folder contains examples demonstrating how to use the `TabulatedMaterial` class from the PyOptik library.
|
|
131
|
-
These examples illustrate the practical applications of working with tabulated refractive index and absorption data, which is useful for analyzing materials based on empirical measurements.
|
|
132
|
-
|
|
133
|
-
Contents
|
|
134
|
-
--------
|
|
135
|
-
|
|
136
|
-
- **Basic Tabulated Material Usage**: Shows how to create an instance of the `TabulatedMaterial` class and access the refractive index and absorption values.
|
|
137
|
-
- **Interpolating Refractive Index**: Demonstrates how to interpolate the refractive index and absorption values for a given range of wavelengths.
|
|
138
|
-
- **Visualization Example**: Provides an example of plotting the refractive index and absorption over a range of wavelengths using the `plot` method.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.. raw:: html
|
|
144
|
-
|
|
145
|
-
<div class="sphx-glr-thumbnails">
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.. raw:: html
|
|
149
|
-
|
|
150
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This module demonstrates the usage of the PyOptik library to calculate and plot the refractive ...">
|
|
151
|
-
|
|
152
|
-
.. only:: html
|
|
153
|
-
|
|
154
|
-
.. image:: /gallery/tabulated/images/thumb/sphx_glr_plot_polyethylene_thumb.png
|
|
155
|
-
:alt:
|
|
156
|
-
|
|
157
|
-
:ref:`sphx_glr_gallery_tabulated_plot_polyethylene.py`
|
|
158
|
-
|
|
159
|
-
.. raw:: html
|
|
160
|
-
|
|
161
|
-
<div class="sphx-glr-thumbnail-title">Plot the Refractive Index of Optical Material: Polyethylene</div>
|
|
162
|
-
</div>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
.. raw:: html
|
|
166
|
-
|
|
167
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This module demonstrates the usage of the PyOptik library to calculate and plot the refractive ...">
|
|
168
|
-
|
|
169
|
-
.. only:: html
|
|
170
|
-
|
|
171
|
-
.. image:: /gallery/tabulated/images/thumb/sphx_glr_plot_silver_thumb.png
|
|
172
|
-
:alt:
|
|
173
|
-
|
|
174
|
-
:ref:`sphx_glr_gallery_tabulated_plot_silver.py`
|
|
175
|
-
|
|
176
|
-
.. raw:: html
|
|
177
|
-
|
|
178
|
-
<div class="sphx-glr-thumbnail-title">Plot the Refractive Index of Optical Material: Silver</div>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
.. raw:: html
|
|
183
|
-
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
Examples: Utility Functions
|
|
187
|
-
===========================
|
|
188
|
-
|
|
189
|
-
This folder contains examples demonstrating the various utility functions provided by the `PyOptik.utils` module.
|
|
190
|
-
These utilities are designed to facilitate common tasks such as managing directories, downloading necessary data, and creating custom material definitions.
|
|
191
|
-
The examples provided here aim to help you leverage these utilities effectively in your workflows.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
.. raw:: html
|
|
196
|
-
|
|
197
|
-
<div class="sphx-glr-thumbnails">
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
.. raw:: html
|
|
201
|
-
|
|
202
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to build a material library using the build_library function from...">
|
|
203
|
-
|
|
204
|
-
.. only:: html
|
|
205
|
-
|
|
206
|
-
.. image:: /gallery/utils/images/thumb/sphx_glr_build_library_thumb.png
|
|
207
|
-
:alt:
|
|
208
|
-
|
|
209
|
-
:ref:`sphx_glr_gallery_utils_build_library.py`
|
|
210
|
-
|
|
211
|
-
.. raw:: html
|
|
212
|
-
|
|
213
|
-
<div class="sphx-glr-thumbnail-title">Building database and Printing Materials</div>
|
|
214
|
-
</div>
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
.. raw:: html
|
|
218
|
-
|
|
219
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to create a custom Sellmeier YAML file using the create_sellmeier...">
|
|
220
|
-
|
|
221
|
-
.. only:: html
|
|
222
|
-
|
|
223
|
-
.. image:: /gallery/utils/images/thumb/sphx_glr_create_sellmeier_file_thumb.png
|
|
224
|
-
:alt:
|
|
225
|
-
|
|
226
|
-
:ref:`sphx_glr_gallery_utils_create_sellmeier_file.py`
|
|
227
|
-
|
|
228
|
-
.. raw:: html
|
|
229
|
-
|
|
230
|
-
<div class="sphx-glr-thumbnail-title">Example: Create a Custom Sellmeier YAML File</div>
|
|
231
|
-
</div>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
.. raw:: html
|
|
235
|
-
|
|
236
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to create a custom YAML file containing tabulated nk data using t...">
|
|
237
|
-
|
|
238
|
-
.. only:: html
|
|
239
|
-
|
|
240
|
-
.. image:: /gallery/utils/images/thumb/sphx_glr_create_tabulated_file_thumb.png
|
|
241
|
-
:alt:
|
|
242
|
-
|
|
243
|
-
:ref:`sphx_glr_gallery_utils_create_tabulated_file.py`
|
|
244
|
-
|
|
245
|
-
.. raw:: html
|
|
246
|
-
|
|
247
|
-
<div class="sphx-glr-thumbnail-title">Example: Create a Custom Tabulated Data YAML File</div>
|
|
248
|
-
</div>
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
.. raw:: html
|
|
252
|
-
|
|
253
|
-
<div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to download a YAML file from a URL using the download_yml_file fu...">
|
|
254
|
-
|
|
255
|
-
.. only:: html
|
|
256
|
-
|
|
257
|
-
.. image:: /gallery/utils/images/thumb/sphx_glr_download_yml_file_thumb.png
|
|
258
|
-
:alt:
|
|
259
|
-
|
|
260
|
-
:ref:`sphx_glr_gallery_utils_download_yml_file.py`
|
|
261
|
-
|
|
262
|
-
.. raw:: html
|
|
263
|
-
|
|
264
|
-
<div class="sphx-glr-thumbnail-title">Example: Download a YAML file</div>
|
|
265
|
-
</div>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
.. raw:: html
|
|
269
|
-
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
.. toctree::
|
|
274
|
-
:hidden:
|
|
275
|
-
:includehidden:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
/gallery/sellmeier/index.rst
|
|
279
|
-
/gallery/tabulated/index.rst
|
|
280
|
-
/gallery/utils/index.rst
|
|
281
|
-
/gallery/group_properties/index.rst
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
.. only:: html
|
|
286
|
-
|
|
287
|
-
.. rst-class:: sphx-glr-signature
|
|
288
|
-
|
|
289
|
-
`Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
|
|
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
|
|
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
|