{"id":24256143,"url":"https://github.com/mfschubert/refractiveindex2","last_synced_at":"2025-03-04T19:47:12.477Z","repository":{"id":272527552,"uuid":"916245655","full_name":"mfschubert/refractiveindex2","owner":"mfschubert","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-22T00:49:47.000Z","size":72,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T01:41:00.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfschubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-13T18:18:25.000Z","updated_at":"2025-01-22T00:49:39.000Z","dependencies_parsed_at":"2025-01-15T02:40:10.561Z","dependency_job_id":null,"html_url":"https://github.com/mfschubert/refractiveindex2","commit_stats":null,"previous_names":["mfschubert/refractiveindex2"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Frefractiveindex2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Frefractiveindex2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Frefractiveindex2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfschubert%2Frefractiveindex2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfschubert","download_url":"https://codeload.github.com/mfschubert/refractiveindex2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241913787,"owners_count":20041459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-15T04:57:17.014Z","updated_at":"2025-03-04T19:47:12.470Z","avatar_url":"https://github.com/mfschubert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A python interface to refractiveindex.info\n![Continuous integration](https://github.com/mfschubert/refractiveindex2/actions/workflows/build-ci.yml/badge.svg)\n![PyPI version](https://img.shields.io/pypi/v/refractiveindex2)\n\nThis repo is based on the [refractiveindex repo](https://github.com/toftul/refractiveindex) by [Ivan Toftul](https://github.com/toftul), which itself is based on the `refractiveindex.py` module from the [PyTMM project](https://github.com/kitchenknif/PyTMM) by [Pavel Dmitriev](https://github.com/kitchenknif). It provides a python interface to the [refractiveindex.info database](https://github.com/polyanskiy/refractiveindex.info-database) by [Mikhail Polyanskiy](https://github.com/polyanskiy).\n\nCompared to other interfaces to the database, `refractiveindex2` implements additional formulas required by some materials in the database and is rewritten to have a simpler class structure. It also includes extensive tests for all materials in the database.\n\n\n## Installation\n\n```\npip install refractiveindex2\n```\n\n## Usage\n\n\n```python\nimport refractiveindex2 as ri\n\nSiO = ri.RefractiveIndexMaterial(shelf=\"main\", book=\"SiO\", page=\"Hass\")\n\nwavelength_um = 0.6  # [microns]\n\nSiO.get_epsilon(wavelength_um=wavelength_um)\n# (3.8633404437869827 + 0.003931076923076923j)\n\nSiO.get_refractive_index(wavelength_um=wavelength_um)\n# (1.96553846)\n\nSiO.get_extinction_coefficient(wavelength_um=wavelength_um)\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) \u003e 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 “page” name by hovering your cursor on the link in the Data section\n\n![How to get page name](docs/img/material_page_names.png)\n\nOr you can look up folders in this repository\u003cbr\u003e\nhttps://github.com/polyanskiy/refractiveindex.info-database\n\n## Known issues\nFor unknown reasons, download of the database can be slow on some systems. You can avoid this by manually downloading the zip file with the `SHA` hard-coded in the `refractiveindex.py` module, e.g.\n```\nhttps://github.com/polyanskiy/refractiveindex.info-database/archive/{SHA}.zip\n```\nwhich will be a file named\n```\nrefractiveindex.info-database-{SHA}.zip\n```\nThen, manually add this file to the `src/refractiveindex2/database/{SHA}` directory, creating the directory if needed. This ensures that the automatic download of the database on first module import is avoided.\n\n\n## Related projects\n\n- https://github.com/stillyslalom/RefractiveIndex.jl\n- https://github.com/kitchenknif/PyTMM\n- https://github.com/toftul/refractiveindex\n- https://github.com/polyanskiy/refractiveindex.info-database\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfschubert%2Frefractiveindex2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfschubert%2Frefractiveindex2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfschubert%2Frefractiveindex2/lists"}