GithubHelp home page GithubHelp logo

mnishida / rii_pandas Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 70 MB

Python 3 + Pandas wrapper for the refractiveindex.info database by Mikhail Polyanskiy.

License: MIT License

Python 90.76% Makefile 1.03% Cython 8.21%
pandas python

rii_pandas's People

Contributors

mnishida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

joamatab

rii_pandas's Issues

Add hash column in catalog

  • select columns to be used for the evaluation of hash.
    • Include "model": "riip" for the evaluation of hash
  • PyOptMat will evaluate hash for custom material
    • "model": "dielectric", "model": "pec", "RI" will be used
    • Used material data are summarized in a hash table.

No such file or directory error: library.yml

I installed the latest version (0.6.16) of RII_Pandas using pip on Windows. When I tried to run RII_Pandas for the first time and build the database, I got the following error:

import riip
ri = riip.RiiDataFrame()
Catalog file not found.
Cloning Repository...
Done.
Creating catalog file...
Traceback (most recent call last):
File "", line 1, in
File "C:\Python311\Lib\site-packages\riip\dataframe.py", line 113, in init
_catalog, _raw_data = self._load_catalog_and_raw_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\riip\dataframe.py", line 133, in _load_catalog_and_raw_data
catalog = self._add_my_db_to_catalog(self._create_catalog())
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\riip\dataframe.py", line 222, in _create_catalog
list(self._extract_entry(self._db_path)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\riip\dataframe.py", line 167, in _extract_entry
with open(library_file, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Python311\Lib\site-packages\riip\data\refractiveindex.info-database\database\library.yml'

This may be because the Polyanskiy directory now has library-nk.yml and library-n2.yml files, instead of a library.yml file.

ValueError: too many values to unpack (expected 3)

issue within riip

when entering line:
"ri = riip.RiiDataFrame()"

there is a warning produced "FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead."

and an error:
<<
"line 287, in _extract_raw_data
wls_n, ns, ks = np.array("
ValueError: too many values to unpack (expected 3). >>

is this new to this release?

Raw Data File creation error

I get the following error when attempting to run riip for the first time, during the "creating raw data file" stage:

Python 3.9.12 (main, Apr 5 2022, 06:56:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

Commands:
import riip
ri = riip.RiiDataFrame()

Output:
Catalog file not found.
Cloning Repository...
Done.
Creating catalog file...
Done.
Creating raw data file...
Traceback (most recent call last):
File "", line 1, in
File "/.local/lib/python3.9/site-packages/riip/dataframe.py", line 113, in init
_catalog, _raw_data = self._load_catalog_and_raw_data()
File "/.local/lib/python3.9/site-packages/riip/dataframe.py", line 138, in _load_catalog_and_raw_data
raw_data, catalog = self._create_raw_data_and_modify_catalog(catalog)
File "/.local/lib/python3.9/site-packages/riip/dataframe.py", line 424, in _create_raw_data_and_modify_catalog
df_idx, catalog = self._extract_raw_data(idx, catalog)
File "/.local/lib/python3.9/site-packages/riip/dataframe.py", line 287, in _extract_raw_data
wls_n, ns, ks = np.array(
ValueError: too many values to unpack (expected 3)

create tutorial

Add some explanations to examples.ipynb and create tutorial.ipynb

Add 'name' column in catalog

'id' number may change when database update. Therefore, using id to specify material may not be safe. it will be better to add simple unique name at database creation or update, and use it to specify material.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.