PyOptik 1.7.3.post0__tar.gz → 1.8.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.
Files changed (168) hide show
  1. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PKG-INFO +87 -17
  2. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/__init__.py +2 -3
  3. pyoptik-1.8.1.post0/PyOptik/__main__.py +7 -0
  4. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/_version.py +2 -2
  5. pyoptik-1.8.1.post0/PyOptik/data/classics.yml +28 -0
  6. pyoptik-1.8.1.post0/PyOptik/data/glasses.yml +20 -0
  7. pyoptik-1.8.1.post0/PyOptik/data/metals.yml +20 -0
  8. pyoptik-1.8.1.post0/PyOptik/data/minimal.yml +9 -0
  9. pyoptik-1.8.1.post0/PyOptik/data/organics.yml +11 -0
  10. pyoptik-1.8.1.post0/PyOptik/data/others.yml +4 -0
  11. pyoptik-1.8.1.post0/PyOptik/data/sellmeier/air.yml +15 -0
  12. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/directories.py +2 -0
  13. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/material/base_class.py +10 -7
  14. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/material/sellmeier_class.py +11 -8
  15. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/material/tabulated_class.py +0 -1
  16. pyoptik-1.8.1.post0/PyOptik/material_bank.py +388 -0
  17. pyoptik-1.8.1.post0/PyOptik/utils.py +38 -0
  18. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik.egg-info/PKG-INFO +87 -17
  19. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik.egg-info/SOURCES.txt +15 -7
  20. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/README.rst +87 -17
  21. pyoptik-1.8.1.post0/development/dev_0.py +6 -0
  22. pyoptik-1.8.1.post0/docs/examples/utils/build_library.py +30 -0
  23. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/code.rst +6 -15
  24. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/conf.py +2 -5
  25. pyoptik-1.8.1.post0/docs/source/gallery/utils/build_library.ipynb +43 -0
  26. pyoptik-1.8.1.post0/docs/source/gallery/utils/build_library.py +30 -0
  27. pyoptik-1.8.1.post0/docs/source/gallery/utils/build_library.py.md5 +1 -0
  28. pyoptik-1.8.1.post0/docs/source/gallery/utils/build_library.rst +173 -0
  29. pyoptik-1.8.1.post0/docs/source/gallery/utils/build_library_codeobj.pickle +0 -0
  30. pyoptik-1.8.1.post0/docs/source/gallery/utils/images/thumb/sphx_glr_build_library_thumb.png +0 -0
  31. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/index.rst +18 -0
  32. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/sg_execution_times.rst +4 -2
  33. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/pyproject.toml +3 -0
  34. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/tests/test_sellmeier.py +5 -1
  35. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/tests/test_tabulated.py +3 -2
  36. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/tests/test_usual_material.py +8 -0
  37. pyoptik-1.8.1.post0/tests/test_utils.py +131 -0
  38. pyoptik-1.7.3.post0/PyOptik/__main__.py +0 -6
  39. pyoptik-1.7.3.post0/PyOptik/data/sellmeier/__init__.py +0 -8
  40. pyoptik-1.7.3.post0/PyOptik/data/sellmeier/default.py +0 -16
  41. pyoptik-1.7.3.post0/PyOptik/data/sellmeier/fluorine_doped_silica_1%.yml +0 -8
  42. pyoptik-1.7.3.post0/PyOptik/data/sellmeier/fluorine_doped_silica_2%.yml +0 -9
  43. pyoptik-1.7.3.post0/PyOptik/data/sellmeier/silica.yml +0 -15
  44. pyoptik-1.7.3.post0/PyOptik/data/tabulated/__init__.py +0 -8
  45. pyoptik-1.7.3.post0/PyOptik/data/tabulated/default.py +0 -11
  46. pyoptik-1.7.3.post0/PyOptik/material_bank.py +0 -72
  47. pyoptik-1.7.3.post0/PyOptik/utils.py +0 -194
  48. pyoptik-1.7.3.post0/tests/test_utils.py +0 -75
  49. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.github/dependabot.yml +0 -0
  50. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.github/workflows/deploy_anaconda.yml +0 -0
  51. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.github/workflows/deploy_coverage.yml +0 -0
  52. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.github/workflows/deploy_documentation.yml +0 -0
  53. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.github/workflows/deploy_workflow.yml +0 -0
  54. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.gitignore +0 -0
  55. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/.readthedocs.yml +0 -0
  56. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/LICENSE +0 -0
  57. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/__init__.py +0 -0
  58. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/BAK1.yml +0 -0
  59. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/BK7.yml +0 -0
  60. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/SF5.yml +0 -0
  61. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/ZBLAN.yml +0 -0
  62. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/argon.yml +0 -0
  63. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/crown.yml +0 -0
  64. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/flint.yml +0 -0
  65. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/fused_silica.yml +0 -0
  66. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/germanium.yml +0 -0
  67. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/lithium_niobate.yml +0 -0
  68. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/polystyren.yml +0 -0
  69. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/silicon.yml +0 -0
  70. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/soda_lime_glass.yml +0 -0
  71. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/sellmeier/water.yml +0 -0
  72. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/aluminium.yml +0 -0
  73. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/calcium.yml +0 -0
  74. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/copper.yml +0 -0
  75. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/gold.yml +0 -0
  76. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/iron.yml +0 -0
  77. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/nickel.yml +0 -0
  78. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/silver.yml +0 -0
  79. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/sodium.yml +0 -0
  80. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/data/tabulated/zinc.yml +0 -0
  81. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/material/__init__.py +0 -0
  82. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik/units.py +0 -0
  83. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik.egg-info/dependency_links.txt +0 -0
  84. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik.egg-info/requires.txt +0 -0
  85. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/PyOptik.egg-info/top_level.txt +0 -0
  86. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/Makefile +0 -0
  87. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/README.rst +0 -0
  88. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/sellmeier/README.rst +0 -0
  89. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/sellmeier/plot_bk7.py +0 -0
  90. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/sellmeier/plot_silica.py +0 -0
  91. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/sellmeier/plot_water.py +0 -0
  92. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/tabulated/README.rst +0 -0
  93. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/tabulated/plot_sf5.py +0 -0
  94. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/tabulated/plot_silver.py +0 -0
  95. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/utils/README.rst +0 -0
  96. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/utils/create_sellmeier_file.py +0 -0
  97. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/utils/create_tabulated_file.py +0 -0
  98. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/examples/utils/download_yml_file.py +0 -0
  99. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/images/example_bk7.png +0 -0
  100. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/images/logo.png +0 -0
  101. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/make.bat +0 -0
  102. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/_static/default.css +0 -0
  103. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/index.rst +0 -0
  104. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/sphx_glr_plot_bk7_001.png +0 -0
  105. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/sphx_glr_plot_silica_001.png +0 -0
  106. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/sphx_glr_plot_water_001.png +0 -0
  107. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/thumb/sphx_glr_plot_bk7_thumb.png +0 -0
  108. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/thumb/sphx_glr_plot_silica_thumb.png +0 -0
  109. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/images/thumb/sphx_glr_plot_water_thumb.png +0 -0
  110. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/index.rst +0 -0
  111. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_bk7.ipynb +0 -0
  112. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_bk7.py +0 -0
  113. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_bk7.py.md5 +0 -0
  114. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_bk7.rst +0 -0
  115. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_bk7_codeobj.pickle +0 -0
  116. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_silica.ipynb +0 -0
  117. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_silica.py +0 -0
  118. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_silica.py.md5 +0 -0
  119. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_silica.rst +0 -0
  120. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_silica_codeobj.pickle +0 -0
  121. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_water.ipynb +0 -0
  122. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_water.py +0 -0
  123. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_water.py.md5 +0 -0
  124. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_water.rst +0 -0
  125. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/plot_water_codeobj.pickle +0 -0
  126. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/sellmeier/sg_execution_times.rst +0 -0
  127. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/images/sphx_glr_plot_sf5_001.png +0 -0
  128. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/images/sphx_glr_plot_silver_001.png +0 -0
  129. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/images/thumb/sphx_glr_plot_sf5_thumb.png +0 -0
  130. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/images/thumb/sphx_glr_plot_silver_thumb.png +0 -0
  131. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/index.rst +0 -0
  132. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_sf5.ipynb +0 -0
  133. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_sf5.py +0 -0
  134. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_sf5.py.md5 +0 -0
  135. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_sf5.rst +0 -0
  136. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_sf5_codeobj.pickle +0 -0
  137. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_silver.ipynb +0 -0
  138. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_silver.py +0 -0
  139. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_silver.py.md5 +0 -0
  140. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_silver.rst +0 -0
  141. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/plot_silver_codeobj.pickle +0 -0
  142. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/tabulated/sg_execution_times.rst +0 -0
  143. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_sellmeier_file.ipynb +0 -0
  144. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_sellmeier_file.py +0 -0
  145. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_sellmeier_file.py.md5 +0 -0
  146. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_sellmeier_file.rst +0 -0
  147. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_sellmeier_file_codeobj.pickle +0 -0
  148. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_tabulated_file.ipynb +0 -0
  149. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_tabulated_file.py +0 -0
  150. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_tabulated_file.py.md5 +0 -0
  151. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_tabulated_file.rst +0 -0
  152. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/create_tabulated_file_codeobj.pickle +0 -0
  153. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/download_yml_file.ipynb +0 -0
  154. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/download_yml_file.py +0 -0
  155. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/download_yml_file.py.md5 +0 -0
  156. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/download_yml_file.rst +0 -0
  157. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/download_yml_file_codeobj.pickle +0 -0
  158. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/sphx_glr_create_sellmeier_file_001.png +0 -0
  159. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/sphx_glr_create_tabulated_file_001.png +0 -0
  160. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/sphx_glr_download_yml_file_001.png +0 -0
  161. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/thumb/sphx_glr_create_sellmeier_file_thumb.png +0 -0
  162. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/thumb/sphx_glr_create_tabulated_file_thumb.png +0 -0
  163. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/gallery/utils/images/thumb/sphx_glr_download_yml_file_thumb.png +0 -0
  164. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/index.rst +0 -0
  165. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/docs/source/references.rst +0 -0
  166. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/meta.yaml +0 -0
  167. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/setup.cfg +0 -0
  168. {pyoptik-1.7.3.post0 → pyoptik-1.8.1.post0}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyOptik
3
- Version: 1.7.3.post0
3
+ Version: 1.8.1.post0
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
@@ -60,26 +60,27 @@ Requires-Dist: pydata-sphinx-theme==0.14.1; extra == "documentation"
60
60
  PyOptik
61
61
  =======
62
62
 
63
- PyOptik is a powerful Python tool designed to import refractive indexes and extinction coefficients for various materials across different wavelengths. The data provided by PyOptik can be used in numerous applications, including simulating light interactions with particles. All data is sourced from the reputable RefractiveIndex.INFO database.
63
+ PyOptik is a Python tool designed to import refractive indexes and extinction coefficients for various materials across different wavelengths. The data provided by PyOptik can be used in numerous applications, including simulating light interactions with particles. All data is sourced from the reputable RefractiveIndex.INFO database.
64
64
 
65
- |Logo|
65
+ |logo|
66
66
 
67
67
  .. list-table::
68
- :widths: 10 25 25 25
68
+ :widths: 10 25 25
69
69
  :header-rows: 1
70
70
 
71
+ * - Meta
72
+ - |python|
73
+ - |docs|
71
74
  * - Testing
72
75
  - |ci/cd|
73
76
  - |coverage|
74
- -
75
- * - Package
77
+ * - PyPi
76
78
  - |PyPi|
77
79
  - |PyPi_download|
80
+ * - Anaconda
78
81
  - |anaconda|
79
- * - Meta
80
- - |python|
81
- - |docs|
82
- -
82
+ - |anaconda_download|
83
+
83
84
 
84
85
  Features
85
86
  ********
@@ -99,10 +100,67 @@ To install PyOptik, simply use `pip` or `conda`:
99
100
  pip install PyOptik
100
101
  conda install --channels martinpdes pyoptik
101
102
 
103
+ Building the Material Library
104
+ *****************************
105
+
106
+ PyOptik allows you to build and customize a local material library, importing material data from various categories. You can download the following categories of materials from the RefractiveIndex.INFO database:
107
+
108
+ - `classics`: Commonly used optical materials.
109
+ - `glasses`: Various types of glass materials.
110
+ - `metals`: Different metal materials for optical simulations.
111
+ - `organics`: Organic materials with optical properties.
112
+ - `others`: Other optical materials.
113
+ - `all`: Download all available categories at once.
114
+
115
+ To build a material library, use the `build_library` function. This will download and save the material data to your local machine.
116
+
117
+ **Example: Building the Material Library:**
118
+
119
+ In this example, we will download the `others` category of materials and remove any previously existing data in that category:
120
+
121
+ .. code:: python
122
+
123
+ from PyOptik import MaterialBank
124
+
125
+ # Download the 'classics' category and remove previous files
126
+ MaterialBank.build_library('classics', remove_previous=True)
127
+
128
+ **Available Categories:**
129
+
130
+ To download materials from another category, simply pass the category name as an argument to `build_library`. For example:
131
+
132
+ .. code:: python
133
+
134
+ # Download materials from the 'glasses' category
135
+ MaterialBank.build_library('glasses')
136
+
137
+ To download all material categories at once:
138
+
139
+ .. code:: python
140
+
141
+ # Download all available material categories
142
+ MaterialBank.build_library('all')
143
+
144
+ You can also set the `remove_previous` parameter to `True` to remove old data before downloading new material data.
145
+
146
+ Viewing Available Materials
147
+ ***************************
148
+
149
+ Once you have built the material library, you can view all the available materials using the `MaterialBank` class. This will print a list of materials stored in your local library.
150
+
151
+ **Example:**
152
+
153
+ .. code:: python
154
+
155
+ from PyOptik import MaterialBank
156
+
157
+ # Print the available materials in a tabulated format
158
+ MaterialBank.print_materials()
159
+
102
160
  Simple Usage
103
161
  ************
104
162
 
105
- After installing PyOptik, you can easily access material properties:
163
+ After installing PyOptik and building the material library, you can easily access material properties:
106
164
 
107
165
  .. code:: python
108
166
 
@@ -113,7 +171,6 @@ After installing PyOptik, you can easily access material properties:
113
171
  n = bk7.compute_refractive_index(0.55e-6)
114
172
  print(f"Refractive index at 0.55 µm: {n}")
115
173
 
116
-
117
174
  Example
118
175
  *******
119
176
 
@@ -136,8 +193,12 @@ Here is a quick example demonstrating how to use PyOptik to retrieve and plot th
136
193
 
137
194
  This code produces the following figure: |example_bk7|
138
195
 
196
+ Adding and Removing Custom Materials
197
+ ************************************
139
198
 
140
- You can also add a custom element to your library providing a URL from `refractiveindex.info <https://refractiveindex.info>`_ website.
199
+ You can add a custom material to your library by providing a URL from `refractiveindex.info <https://refractiveindex.info>`_.
200
+
201
+ **Adding a Custom Material:**
141
202
 
142
203
  .. code:: python
143
204
 
@@ -150,8 +211,9 @@ You can also add a custom element to your library providing a URL from `refracti
150
211
  location=tabulated_data_path
151
212
  )
152
213
 
153
- Evidently, you can also remove element from the library using as follows:
214
+ **Removing a Material:**
154
215
 
216
+ You can also remove a material from the library as follows:
155
217
 
156
218
  .. code:: python
157
219
 
@@ -185,14 +247,15 @@ As of 2024, PyOptik is still under development. If you would like to collaborate
185
247
 
186
248
  **Email**: `martin.poinsinet.de.sivry@gmail.com <mailto:martin.poinsinet.de.sivry@gmail.com?subject=PyOptik>`_
187
249
 
188
-
189
-
190
250
  .. |python| image:: https://img.shields.io/pypi/pyversions/pyoptik.svg
251
+ :alt: Python
191
252
  :target: https://www.python.org/
192
253
 
193
- .. |Logo| image:: https://github.com/MartinPdeS/PyOptik/raw/master/docs/images/logo.png
254
+ .. |logo| image:: https://github.com/MartinPdeS/PyOptik/raw/master/docs/images/logo.png
255
+ :alt: PyOptik logo
194
256
 
195
257
  .. |example_bk7| image:: https://github.com/MartinPdeS/PyOptik/raw/master/docs/images/example_bk7.png
258
+ :alt: PyOptik example: BK7
196
259
  :target: https://github.com/MartinPdeS/PyOptik/blob/master/docs/images/example_bk7.png
197
260
 
198
261
  .. |docs| image:: https://github.com/martinpdes/pyoptik/actions/workflows/deploy_documentation.yml/badge.svg
@@ -204,14 +267,21 @@ As of 2024, PyOptik is still under development. If you would like to collaborate
204
267
  :alt: Unittest Status
205
268
 
206
269
  .. |PyPi| image:: https://badge.fury.io/py/pyoptik.svg
270
+ :alt: PyPi version
207
271
  :target: https://badge.fury.io/py/pyoptik
208
272
 
209
273
  .. |PyPi_download| image:: https://img.shields.io/pypi/dm/pyoptik.svg
274
+ :alt: PyPi version
210
275
  :target: https://pypistats.org/packages/pyoptik
211
276
 
277
+ .. |anaconda_download| image:: https://anaconda.org/martinpdes/pyoptik/badges/downloads.svg
278
+ :alt: Anaconda downloads
279
+ :target: https://anaconda.org/martinpdes/pyoptik
280
+
212
281
  .. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/PyOptik/python-coverage-comment-action-data/badge.svg
213
282
  :alt: Unittest coverage
214
283
  :target: https://htmlpreview.github.io/?https://github.com/MartinPdeS/PyOptik/blob/python-coverage-comment-action-data/htmlcov/index.html
215
284
 
216
285
  .. |anaconda| image:: https://anaconda.org/martinpdes/pyoptik/badges/version.svg
286
+ :alt: Anaconda version
217
287
  :target: https://anaconda.org/martinpdes/pyoptik
@@ -5,10 +5,9 @@ except ImportError:
5
5
  __version__ = "0.0.0"
6
6
 
7
7
 
8
- from .utils import build_default_library
9
- from .material_bank import _MaterialBank
8
+ from .material_bank import MaterialBank
10
9
  from .material import TabulatedMaterial
11
10
  from .material import SellmeierMaterial
12
11
  from .material import base_class
13
12
 
14
- MaterialBank = Material = _MaterialBank()
13
+ Material = MaterialBank # For retro-compatiibility
@@ -0,0 +1,7 @@
1
+ from PyOptik import MaterialBank
2
+ import logging
3
+
4
+
5
+ if __name__ == '__main__':
6
+ logging.info('Building material library')
7
+ MaterialBank.build_library('classics')
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.7.3.post0'
16
- __version_tuple__ = version_tuple = (1, 7, 3)
15
+ __version__ = version = '1.8.1.post0'
16
+ __version_tuple__ = version_tuple = (1, 8, 1)
@@ -0,0 +1,28 @@
1
+ sellmeier:
2
+ ZBLAN: https://refractiveindex.info/database/data-nk/glass/misc/ZBLAN/Gan.yml
3
+ BK7: https://refractiveindex.info/database/data-nk/glass/schott/N-BK7.yml
4
+ fused_silica: https://refractiveindex.info/database/data-nk/main/SiO2/Malitson.yml
5
+ BAK1: https://refractiveindex.info/database/data-nk/glass/schott/N-BAK1.yml
6
+ SF5: https://refractiveindex.info/database/data-nk/glass/schott/N-SF5.yml
7
+ water: https://refractiveindex.info/database/data-nk/main/H2O/Daimon-19.0C.yml
8
+ polystyren: https://refractiveindex.info/database/data-nk/organic/(C8H8)n%20-%20polystyrene/Sultanova.yml
9
+ lithium_niobate: https://refractiveindex.info/database/data-nk/main/LiNbO3/Zelmon-o.yml
10
+ germanium: https://refractiveindex.info/database/data-nk/main/Ge/Icenogle.yml
11
+ silicon: https://refractiveindex.info/database/data-nk/main/Si/Salzberg.yml
12
+ soda_lime_glass: https://refractiveindex.info/database/data-nk/glass/misc/soda-lime/Rubin-clear.yml
13
+ crown: https://refractiveindex.info/database/data-nk/glass/schott/K7.yml
14
+ flint: https://refractiveindex.info/database/data-nk/glass/schott/F2.yml
15
+ argon: https://refractiveindex.info/database/data-nk/main/Ar/Bideau-Mehu.yml
16
+ air: https://refractiveindex.info/database/data-nk/other/mixed%20gases/air/Ciddor.yml
17
+ water: https://refractiveindex.info/database/data-nk/main/H2O/Daimon-19.0C.yml
18
+
19
+ tabulated:
20
+ silver: https://refractiveindex.info/database/data-nk/main/Ag/Johnson.yml
21
+ aluminium: https://refractiveindex.info/database/data-nk/main/Al/Rakic.yml
22
+ gold: https://refractiveindex.info/database/data-nk/main/Au/Johnson.yml
23
+ calcium: https://refractiveindex.info/database/data-nk/main/Ca/Mathewson.yml
24
+ copper: https://refractiveindex.info/database/data-nk/main/Cu/Johnson.yml
25
+ iron: https://refractiveindex.info/database/data-nk/main/Fe/Johnson.yml
26
+ sodium: https://refractiveindex.info/database/data-nk/main/Na/Smith.yml
27
+ nickel: https://refractiveindex.info/database/data-nk/main/Ni/Johnson.yml
28
+ zinc: https://refractiveindex.info/database/data-nk/main/Zn/Werner.yml
@@ -0,0 +1,20 @@
1
+ sellmeier:
2
+ ZBLAN: https://refractiveindex.info/database/data-nk/glass/misc/ZBLAN/Gan.yml
3
+ BK7: https://refractiveindex.info/database/data-nk/glass/schott/N-BK7.yml
4
+ fused_silica: https://refractiveindex.info/database/data-nk/main/SiO2/Malitson.yml
5
+ BAK1: https://refractiveindex.info/database/data-nk/glass/schott/N-BAK1.yml
6
+ BAF10: https://refractiveindex.info/database/data-nk/glass/schott/N-BAF10.yml
7
+ SF5: https://refractiveindex.info/database/data-nk/glass/schott/N-SF5.yml
8
+ SF10: https://refractiveindex.info/database/data-nk/glass/schott/N-SF10.yml
9
+ SF11: https://refractiveindex.info/database/data-nk/glass/schott/N-SF11.yml
10
+ LASF9: https://refractiveindex.info/database/data-nk/glass/schott/N-LASF9.yml
11
+ FK51A: https://refractiveindex.info/database/data-nk/glass/schott/N-FK51A.yml
12
+ water: https://refractiveindex.info/database/data-nk/main/H2O/Daimon-19.0C.yml
13
+ polystyren: https://refractiveindex.info/database/data-nk/organic/(C8H8)n%20-%20polystyrene/Sultanova.yml
14
+ lithium_niobate: https://refractiveindex.info/database/data-nk/main/LiNbO3/Zelmon-o.yml
15
+ germanium: https://refractiveindex.info/database/data-nk/main/Ge/Icenogle.yml
16
+ silicon: https://refractiveindex.info/database/data-nk/main/Si/Salzberg.yml
17
+ soda_lime_glass: https://refractiveindex.info/database/data-nk/glass/misc/soda-lime/Rubin-clear.yml
18
+ crown: https://refractiveindex.info/database/data-nk/glass/schott/K7.yml
19
+ flint: https://refractiveindex.info/database/data-nk/glass/schott/F2.yml
20
+
@@ -0,0 +1,20 @@
1
+ tabulated:
2
+ silver: https://refractiveindex.info/database/data-nk/main/Ag/Johnson.yml
3
+ aluminium: https://refractiveindex.info/database/data-nk/main/Al/Rakic.yml
4
+ gold: https://refractiveindex.info/database/data-nk/main/Au/Johnson.yml
5
+ calcium: https://refractiveindex.info/database/data-nk/main/Ca/Mathewson.yml
6
+ copper: https://refractiveindex.info/database/data-nk/main/Cu/Johnson.yml
7
+ iron: https://refractiveindex.info/database/data-nk/main/Fe/Johnson.yml
8
+ sodium: https://refractiveindex.info/database/data-nk/main/Na/Smith.yml
9
+ nickel: https://refractiveindex.info/database/data-nk/main/Ni/Johnson.yml
10
+ zinc: https://refractiveindex.info/database/data-nk/main/Zn/Werner.yml
11
+ chromium: https://refractiveindex.info/database/data-nk/main/Cr/Johnson.yml
12
+ titanium: https://refractiveindex.info/database/data-nk/main/Ti/Johnson.yml
13
+ tungsten: https://refractiveindex.info/database/data-nk/main/W/Werner.yml
14
+ lead: https://refractiveindex.info/database/data-nk/main/Pb/Werner.yml
15
+ bismuth: https://refractiveindex.info/database/data-nk/main/Bi/Werner.yml
16
+ magnesium: https://refractiveindex.info/database/data-nk/main/Mg/Hagemann.yml
17
+ paladium: https://refractiveindex.info/database/data-nk/main/Pd/Johnson.yml
18
+ rhodium: https://refractiveindex.info/database/data-nk/main/Rh/Arndt.yml
19
+ vanadium: https://refractiveindex.info/database/data-nk/main/V/Johnson.yml
20
+ tantalum: https://refractiveindex.info/database/data-nk/main/Ta/Werner.yml
@@ -0,0 +1,9 @@
1
+ sellmeier:
2
+ argon: https://refractiveindex.info/database/data-nk/main/Ar/Bideau-Mehu.yml
3
+ air: https://refractiveindex.info/database/data-nk/other/mixed%20gases/air/Ciddor.yml
4
+ water: https://refractiveindex.info/database/data-nk/main/H2O/Daimon-19.0C.yml
5
+ soda_lime_glass: https://refractiveindex.info/database/data-nk/glass/misc/soda-lime/Rubin-clear.yml
6
+ silicon: https://refractiveindex.info/database/data-nk/main/Si/Salzberg.yml
7
+
8
+ tabulated:
9
+ zinc: https://refractiveindex.info/database/data-nk/main/Zn/Werner.yml
@@ -0,0 +1,11 @@
1
+ sellmeier:
2
+ ethanol: https://refractiveindex.info/database/data-nk/organic/C2H6O%20-%20ethanol/Rheims.yml
3
+ methanol: https://refractiveindex.info/database/data-nk/organic/CH4O%20-%20methanol/El-Kashef.yml
4
+ propanol: https://refractiveindex.info/database/data-nk/organic/C3H8O%20-%20propanol/Kozma.yml
5
+ ethylene: https://refractiveindex.info/database/data-nk/organic/C2H4%20-%20ethylene/Loria.yml
6
+ acetylene: https://refractiveindex.info/database/data-nk/organic/C2H2%20-%20acetylene/Loria.yml
7
+ methane: https://refractiveindex.info/database/data-nk/organic/CH4%20-%20methane/Loria.yml
8
+ ethane: https://refractiveindex.info/database/data-nk/organic/C2H6%20-%20ethane/Loria.yml
9
+ acetone: https://refractiveindex.info/database/data-nk/organic/C3H6O%20-%20acetone/Rheims.yml
10
+ glycerol: https://refractiveindex.info/database/data-nk/organic/C3H8O3%20-%20glycerol/Rheims.yml
11
+
@@ -0,0 +1,4 @@
1
+ sellmeier:
2
+ air: https://refractiveindex.info/database/data-nk/other/mixed%20gases/air/Ciddor.yml
3
+ water: https://refractiveindex.info/database/data-nk/main/H2O/Daimon-19.0C.yml
4
+ argon: https://refractiveindex.info/database/data-nk/main/Ar/Bideau-Mehu.yml
@@ -0,0 +1,15 @@
1
+ # this file is part of refractiveindex.info database
2
+ # refractiveindex.info database is in the public domain
3
+ # copyright and related rights waived via CC0 1.0
4
+
5
+ REFERENCES: "P. E. Ciddor. Refractive index of air: new equations for the visible and near infrared, <a href=\"https://doi.org/10.1364/AO.35.001566\"><i>Appl. Optics</i> <b>35</b>, 1566-1573 (1996)</a><br>[<a href=\"https://github.com/polyanskiy/refractiveindex.info-scripts/blob/master/scripts/Ciddor%201996%20-%20air.py\">Calculation script (Python)</a> - can be used to calculate the refractive index of air for specific values of humidity, temperature, pressure, and CO<sub>2</sub> concentration]"
6
+ COMMENTS: "Standard air: dry air at 15 °C, 101.325 kPa and with 450 ppm CO<sub>2</sub> content."
7
+ DATA:
8
+ - type: formula 6
9
+ wavelength_range: 0.23 1.690
10
+ coefficients: 0 0.05792105 238.0185 0.00167917 57.362
11
+ SPECS:
12
+ n_is_absolute: true
13
+ wavelength_is_vacuum: true
14
+ temperature: 15 °C
15
+ pressure: 101325 Pa
@@ -30,6 +30,8 @@ examples_path = root_path.joinpath('examples')
30
30
  sellmeier_data_path = root_path.joinpath('data/sellmeier')
31
31
  tabulated_data_path = root_path.joinpath('data/tabulated')
32
32
 
33
+ data_path = root_path.joinpath('data')
34
+
33
35
 
34
36
  if __name__ == '__main__':
35
37
  for path_name in __all__:
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
+ from typing import Callable
4
5
  from PyOptik.units import Quantity, meter
5
6
  import numpy
6
7
  import warnings
@@ -28,13 +29,13 @@ class BaseMaterial:
28
29
  """
29
30
  return self.__str__()
30
31
 
31
- def _check_wavelength(self, wavelength_range: Quantity) -> None:
32
+ def _check_wavelength(self, wavelength: Quantity) -> None:
32
33
  """
33
34
  Checks if a wavelength is within the material's allowable range and raises a warning if it is not.
34
35
 
35
36
  Parameters
36
37
  ----------
37
- lambda_um : float
38
+ wavelength : Quantity
38
39
  The wavelength to check, in micrometers.
39
40
 
40
41
  Raises
@@ -45,29 +46,31 @@ class BaseMaterial:
45
46
  if self.wavelength_bound is not None:
46
47
  min_value, max_value = self.wavelength_bound
47
48
 
48
- if numpy.any((wavelength_range < min_value) | (wavelength_range > max_value)):
49
+ if numpy.any((wavelength < min_value) | (wavelength > max_value)):
49
50
  warnings.warn(
50
- f"Wavelength range goes from {wavelength_range.min().to_compact()} to {wavelength_range.max().to_compact()} "
51
+ f"Wavelength range goes from {wavelength.min().to_compact()} to {wavelength.max().to_compact()} "
51
52
  f"which is outside the allowable range of {min_value.to_compact()} to {max_value.to_compact()} µm. "
52
53
  f"[Material: {self.filename}]"
53
54
  )
54
55
 
55
- def ensure_units(func):
56
+ def ensure_units(func) -> Callable:
56
57
  """
57
58
  Decorator to ensure that the wavelength parameter has the correct units.
58
59
 
59
60
  Parameters
60
61
  ----------
61
- func : callable
62
+ func : Callable
62
63
  The function to wrap.
63
64
 
64
65
  Returns
65
66
  -------
66
- callable
67
+ Callable
67
68
  The wrapped function that ensures wavelength is a Quantity in meters.
68
69
  """
69
70
  def wrapper(self, wavelength: Quantity = None, *args, **kwargs):
70
71
  if wavelength is None:
72
+ if self.wavelength_bound is None:
73
+ raise ValueError('Wavelenght must be provided for computation.')
71
74
  wavelength = numpy.linspace(self.wavelength_bound[0].magnitude, self.wavelength_bound[1].magnitude, 100) * self.wavelength_bound.units
72
75
 
73
76
  if not isinstance(wavelength, Quantity):
@@ -1,17 +1,18 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
+ import yaml
5
+ import numpy
6
+ import itertools
7
+ from MPSPlots.styles import mps
8
+ import matplotlib.pyplot as plt
4
9
  from pydantic import Field, ConfigDict
5
10
  from pydantic.dataclasses import dataclass
6
- import matplotlib.pyplot as plt
7
- import numpy
8
11
  from typing import Tuple, Optional, Union
9
- import yaml
12
+ from PyOptik.units import micrometer, Quantity
10
13
  from PyOptik.directories import sellmeier_data_path
11
- import itertools
12
14
  from PyOptik.material.base_class import BaseMaterial
13
- from MPSPlots.styles import mps
14
- from PyOptik.units import meter, micrometer, Quantity
15
+
15
16
 
16
17
  config_dict = ConfigDict(
17
18
  arbitrary_types_allowed=True
@@ -36,6 +37,7 @@ class SellmeierMaterial(BaseMaterial):
36
37
  The formula type to use for refractive index calculation.
37
38
  """
38
39
  filename: str
40
+
39
41
  coefficients: Optional[numpy.ndarray] = Field(default=None)
40
42
  wavelength_bound: Optional[Tuple[float, float]] = Field(default=None)
41
43
  reference: Optional[str] = Field(default=None)
@@ -73,12 +75,13 @@ class SellmeierMaterial(BaseMaterial):
73
75
  # Extract wavelength range
74
76
  if 'wavelength_range' in parsed_yaml['DATA'][0]:
75
77
  data_str = parsed_yaml['DATA'][0]['wavelength_range'].split()
78
+
76
79
  self.wavelength_bound = numpy.array([float(val) for val in data_str]) * micrometer
77
80
 
78
81
  else:
79
82
  self.wavelength_bound = None
80
83
 
81
- # Extract reference
84
+ # # Extract reference
82
85
  self.reference = parsed_yaml.get('REFERENCES', None)
83
86
 
84
87
  @BaseMaterial.ensure_units
@@ -185,4 +188,4 @@ class SellmeierMaterial(BaseMaterial):
185
188
  f"wavelength_range: {self.wavelength_bound},\n"
186
189
  f"formula_type: {self.formula_type},\n"
187
190
  f"reference: '{self.reference}')"
188
- )
191
+ )
@@ -5,7 +5,6 @@ import numpy
5
5
  from pydantic.dataclasses import dataclass, Field
6
6
  from typing import Optional, Union
7
7
  import yaml
8
- import warnings
9
8
  from PyOptik.directories import tabulated_data_path
10
9
  from PyOptik.material.base_class import BaseMaterial
11
10
  from MPSPlots.styles import mps