Name | refractiveindex JSON |
Version |
0.0.5
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-06-20 03:20:58 |
maintainer | None |
docs_url | None |
author | Ivan Toftul |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Easy Python interface to RefractiveIndex database
The original database<br>
https://github.com/polyanskiy/refractiveindex.info-database
Database files parsing was made with a modified version of `refractiveIndex.py` from [PyTMM project](https://github.com/kitchenknif/PyTMM) by [Pavel Dmitriev](https://github.com/kitchenknif).
## Installation
```
pip install refractiveindex
```
## Usage
```python
from refractiveindex import RefractiveIndexMaterial
SiO = RefractiveIndexMaterial(shelf='main', book='SiO', page='Hass')
wavelength_nm = 600 # [nm]
SiO.get_epsilon(wavelength_nm)
# (3.8633404437869827+0.003931076923076923j)
SiO.get_refractive_index(wavelength_nm)
# (1.96553846)
SiO.get_extinction_coefficient(wavelength_nm)
# (0.001)
```
Notes:
- here the time dependence is assumed to be $\mathrm{e}^{-\mathrm{i} \omega t}$, so $\mathrm{Im}(\varepsilon) > 0$ is responsible for the losses.
- if there is a space in the name, one should write underscore instead of it, i.e. not `page='Rodriguez-de Marcos'` but `page='Rodriguez-de_Marcos'`.
## How to get material page names
You can find the proper “page” name by hovering your cursor on the link in the Data section
![How to get page name](./fig/link.png)
Or you can look up folders in this repository<br>
https://github.com/polyanskiy/refractiveindex.info-database
## Simular projects for Julia
Julia interface to refractiveindex.info database<br>
https://github.com/stillyslalom/RefractiveIndex.jl
## Possible problems
Refractive index changed naming in its database, please upgrade the package
```shell
pip install --upgrade refractiveindex
```
and remove database folder at `~/.refractiveindex.info-database`.
The database is currently limited to dispersion and extinction ('n-k') data.
Raw data
{
"_id": null,
"home_page": null,
"name": "refractiveindex",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Ivan Toftul",
"author_email": "toftul.ivan@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ee/08/7fcd39df89437f3d9f7e0e5c38f7ee6164dba9c1c2453a01f5cdcdf64f45/refractiveindex-0.0.5.tar.gz",
"platform": null,
"description": "# Easy Python interface to RefractiveIndex database\n\nThe original database<br>\nhttps://github.com/polyanskiy/refractiveindex.info-database\n\nDatabase files parsing was made with a modified version of `refractiveIndex.py` from [PyTMM project](https://github.com/kitchenknif/PyTMM) by [Pavel Dmitriev](https://github.com/kitchenknif).\n\n## Installation\n\n```\npip install refractiveindex\n```\n\n## Usage\n\n\n```python\nfrom refractiveindex import RefractiveIndexMaterial\n\nSiO = RefractiveIndexMaterial(shelf='main', book='SiO', page='Hass')\n\nwavelength_nm = 600 # [nm]\n\nSiO.get_epsilon(wavelength_nm)\n# (3.8633404437869827+0.003931076923076923j)\n\nSiO.get_refractive_index(wavelength_nm)\n# (1.96553846)\n\nSiO.get_extinction_coefficient(wavelength_nm)\n# (0.001)\n```\n\nNotes: \n- here the time dependence is assumed to be $\\mathrm{e}^{-\\mathrm{i} \\omega t}$, so $\\mathrm{Im}(\\varepsilon) > 0$ is responsible for the losses.\n- if there is a space in the name, one should write underscore instead of it, i.e. not `page='Rodriguez-de Marcos'` but `page='Rodriguez-de_Marcos'`.\n\n\n## How to get material page names\n\nYou can find the proper \u201cpage\u201d name by hovering your cursor on the link in the Data section\n\n![How to get page name](./fig/link.png)\n\nOr you can look up folders in this repository<br>\nhttps://github.com/polyanskiy/refractiveindex.info-database\n\n## Simular projects for Julia\n\nJulia interface to refractiveindex.info database<br>\nhttps://github.com/stillyslalom/RefractiveIndex.jl\n\n## Possible problems\n\nRefractive index changed naming in its database, please upgrade the package\n```shell\npip install --upgrade refractiveindex\n```\nand remove database folder at `~/.refractiveindex.info-database`.\n\nThe database is currently limited to dispersion and extinction ('n-k') data.\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.0.5",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f9f951976f29d2de7d928c3e9cdebcdb50fd0294ccd23c946f62df4550d807c",
"md5": "50bf88f866acf1b579c2f82d844091ee",
"sha256": "a2283a623376f88652adc7c20ba59e3b147d8a0e092eac6ba5bff2ee1fad97b5"
},
"downloads": -1,
"filename": "refractiveindex-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50bf88f866acf1b579c2f82d844091ee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 6273,
"upload_time": "2024-06-20T03:20:56",
"upload_time_iso_8601": "2024-06-20T03:20:56.815057Z",
"url": "https://files.pythonhosted.org/packages/6f/9f/951976f29d2de7d928c3e9cdebcdb50fd0294ccd23c946f62df4550d807c/refractiveindex-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ee087fcd39df89437f3d9f7e0e5c38f7ee6164dba9c1c2453a01f5cdcdf64f45",
"md5": "a776952c6ce7f92a051e6cfe2ca98a84",
"sha256": "a36def0afe16cf5a040cba2c1cdba5f78ed3b4d603a5a7a7686915540383ca14"
},
"downloads": -1,
"filename": "refractiveindex-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "a776952c6ce7f92a051e6cfe2ca98a84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 5544,
"upload_time": "2024-06-20T03:20:58",
"upload_time_iso_8601": "2024-06-20T03:20:58.498218Z",
"url": "https://files.pythonhosted.org/packages/ee/08/7fcd39df89437f3d9f7e0e5c38f7ee6164dba9c1c2453a01f5cdcdf64f45/refractiveindex-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-20 03:20:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "refractiveindex"
}