riip


Nameriip JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/mnishida/RII_Pandas
SummaryPython 3 + Pandas wrapper for the refractiveindex.info database
upload_time2023-09-16 03:48:40
maintainer
docs_urlNone
authorMunehiro Nishida
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # RII_Pandas (refractiveindex.info-pandas)

[![PyPI version][pypi-image]][pypi-link]
[![Anaconda Version][anaconda-v-image]][anaconda-v-link]
[![Lint and Test][github-workflow-image]][github-workflow-link]

[pypi-image]: https://badge.fury.io/py/riip.svg
[pypi-link]: https://pypi.org/project/riip
[anaconda-v-image]: https://anaconda.org/mnishida/riip/badges/version.svg
[anaconda-v-link]: https://anaconda.org/mnishida/riip
[github-workflow-image]: https://github.com/mnishida/RII_Pandas/actions/workflows/pythonapp.yml/badge.svg
[github-workflow-link]: https://github.com/mnishida/RII_Pandas/actions/workflows/pythonapp.yml

Python 3 + [Pandas](https://pandas.pydata.org/) wrapper for the [refractiveindex.info database](http://refractiveindex.info/) developed by [Mikhail Polyanskiy](https://github.com/polyanskiy).

Pandas DataFrame creation was made with modified versions of `dboperations.py` from [refractiveindex.info-sqlite package](https://github.com/HugoGuillen/refractiveindex.info-sqlite) developed by [Hugo Guillén](https://github.com/HugoGuillen).

## Features
- Create Pandas DataFrame by parsing database files cloned from Polyanskiy's  [GitHub repository](https://github.com/polyanskiy/refractiveindex.info-database).
- Drude-Lorentz model (formula 21) and Brendel-Bormann model (formula 22) are available to describe metallic dielectric function.

## Install
#### Install and update using pip
```
$ pip install -U riip
```
#### Install using conda
```
$ conda install -c mnishida riip
```

## Usage
```
>>> import riip
>>> ri = riip.RiiDataFrame()
```
Polyanskiy's 'refractiveindex.info database' is cloned from [GitHub repository](https://github.com/polyanskiy/refractiveindex.info-database),
and three csv files, 'catalog.csv', 'raw_data.csv' and 'grid_data.csv' are created.
They are located in 'data' folder under the installation directory.
This process may take a few minutes, but it will happen only the first time you start it after installation.
```
>>> ri.search("Al")                      # search material contains the string
>>> ri.select(
      "2.5 < n < 3 and 0.4 < wl < 0.8"
    )                                    # select materials that fullfill the condition
>>> print(ri.show([23, 118]))            # show catalog
>>> print(ri.read(23))                   # read the data book
>>> ri.references(23)                    # see references
>>> ri.plot(23, "n")                     # plot wavelength dependence of refractive index

>>> Al = ri.material(
  {"book": "Al", "page": "Mathewson"})   # create material with book and page
>>> Al = ri.material({"id": 23})         # create material with id number
```

It may not be safe to use "id" in your application importing this package.
The id number may be changed when an update is done on your local database.

```
>>> import numpy as np
>>> wls = np.linspace(0.5, 1.6)          # wavelength from 0.5 μm to 1.6 μm
>>> Al.n(wls)                            # refractive index
>>> Al.k(wls)                            # extinction coefficient
>>> Al.eps(wls)                          # complex permittivity
```
For more information, see [RII_Pandas User's Guide](https://rii-pandas.readthedocs.io/en/latest/).

## Update database
If [refractiveindex.info database](http://refractiveindex.info/) is updated, you can pull it to the local database by

```
>>> import riip
>>> ri = riip.RiiDataFrame()
>>> ri.update_db()
```

## Uninstall
```
$ pip uninstall riip
```
or
```
$ conda uninstall riip
```

## Dependencies
- python 3
- numpy
- scipy
- pandas
- pyyaml
- gitpython

## Version
0.7.0

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mnishida/RII_Pandas",
    "name": "riip",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Munehiro Nishida",
    "author_email": "mnishida@hiroshima-u.ac.jp",
    "download_url": "https://files.pythonhosted.org/packages/e5/a6/e42b41a18c68fd37d183a0b03b2a230511d93436fbcaaffdd1da451317dc/riip-0.7.0.tar.gz",
    "platform": null,
    "description": "# RII_Pandas (refractiveindex.info-pandas)\n\n[![PyPI version][pypi-image]][pypi-link]\n[![Anaconda Version][anaconda-v-image]][anaconda-v-link]\n[![Lint and Test][github-workflow-image]][github-workflow-link]\n\n[pypi-image]: https://badge.fury.io/py/riip.svg\n[pypi-link]: https://pypi.org/project/riip\n[anaconda-v-image]: https://anaconda.org/mnishida/riip/badges/version.svg\n[anaconda-v-link]: https://anaconda.org/mnishida/riip\n[github-workflow-image]: https://github.com/mnishida/RII_Pandas/actions/workflows/pythonapp.yml/badge.svg\n[github-workflow-link]: https://github.com/mnishida/RII_Pandas/actions/workflows/pythonapp.yml\n\nPython 3 + [Pandas](https://pandas.pydata.org/) wrapper for the [refractiveindex.info database](http://refractiveindex.info/) developed by [Mikhail Polyanskiy](https://github.com/polyanskiy).\n\nPandas DataFrame creation was made with modified versions of `dboperations.py` from [refractiveindex.info-sqlite package](https://github.com/HugoGuillen/refractiveindex.info-sqlite) developed by [Hugo Guill\u00e9n](https://github.com/HugoGuillen).\n\n## Features\n- Create Pandas DataFrame by parsing database files cloned from Polyanskiy's  [GitHub repository](https://github.com/polyanskiy/refractiveindex.info-database).\n- Drude-Lorentz model (formula 21) and Brendel-Bormann model (formula 22) are available to describe metallic dielectric function.\n\n## Install\n#### Install and update using pip\n```\n$ pip install -U riip\n```\n#### Install using conda\n```\n$ conda install -c mnishida riip\n```\n\n## Usage\n```\n>>> import riip\n>>> ri = riip.RiiDataFrame()\n```\nPolyanskiy's 'refractiveindex.info database' is cloned from [GitHub repository](https://github.com/polyanskiy/refractiveindex.info-database),\nand three csv files, 'catalog.csv', 'raw_data.csv' and 'grid_data.csv' are created.\nThey are located in 'data' folder under the installation directory.\nThis process may take a few minutes, but it will happen only the first time you start it after installation.\n```\n>>> ri.search(\"Al\")                      # search material contains the string\n>>> ri.select(\n      \"2.5 < n < 3 and 0.4 < wl < 0.8\"\n    )                                    # select materials that fullfill the condition\n>>> print(ri.show([23, 118]))            # show catalog\n>>> print(ri.read(23))                   # read the data book\n>>> ri.references(23)                    # see references\n>>> ri.plot(23, \"n\")                     # plot wavelength dependence of refractive index\n\n>>> Al = ri.material(\n  {\"book\": \"Al\", \"page\": \"Mathewson\"})   # create material with book and page\n>>> Al = ri.material({\"id\": 23})         # create material with id number\n```\n\nIt may not be safe to use \"id\" in your application importing this package.\nThe id number may be changed when an update is done on your local database.\n\n```\n>>> import numpy as np\n>>> wls = np.linspace(0.5, 1.6)          # wavelength from 0.5 \u03bcm to 1.6 \u03bcm\n>>> Al.n(wls)                            # refractive index\n>>> Al.k(wls)                            # extinction coefficient\n>>> Al.eps(wls)                          # complex permittivity\n```\nFor more information, see [RII_Pandas User's Guide](https://rii-pandas.readthedocs.io/en/latest/).\n\n## Update database\nIf [refractiveindex.info database](http://refractiveindex.info/) is updated, you can pull it to the local database by\n\n```\n>>> import riip\n>>> ri = riip.RiiDataFrame()\n>>> ri.update_db()\n```\n\n## Uninstall\n```\n$ pip uninstall riip\n```\nor\n```\n$ conda uninstall riip\n```\n\n## Dependencies\n- python 3\n- numpy\n- scipy\n- pandas\n- pyyaml\n- gitpython\n\n## Version\n0.7.0\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python 3 + Pandas wrapper for the refractiveindex.info database",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://github.com/mnishida/RII_Pandas"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5a6e42b41a18c68fd37d183a0b03b2a230511d93436fbcaaffdd1da451317dc",
                "md5": "8281bbe622b211bd0b5f3659da532c10",
                "sha256": "8ce41d87cf67cc2abaf547b6c958903172d41c78d7ba6a0fd9aade62bcc643fd"
            },
            "downloads": -1,
            "filename": "riip-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8281bbe622b211bd0b5f3659da532c10",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 589127,
            "upload_time": "2023-09-16T03:48:40",
            "upload_time_iso_8601": "2023-09-16T03:48:40.473196Z",
            "url": "https://files.pythonhosted.org/packages/e5/a6/e42b41a18c68fd37d183a0b03b2a230511d93436fbcaaffdd1da451317dc/riip-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-16 03:48:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mnishida",
    "github_project": "RII_Pandas",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "riip"
}
        
Elapsed time: 0.13343s