Giter Site home page Giter Site logo

refractiveindex.info-sqlite's People

Contributors

hugoguillen avatar lyd1ng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

refractiveindex.info-sqlite's Issues

Changed format of refractiveindex.info data

Hi,

the data structure of the refrativeindex.info yaml library that is available at there website has changed. This requires some minor changes in the refrativeindex.info-sqlite to work with the new format. Are you still maintaining this project and would you accept a PR to fix this?

Best.

Error Handling

Hi,
I stumbled across your sqlite3 wrapper cause I wanted to use the refractive index library
inside a plugin for a physical calculator I am currently developing. (https://gitlab.com/lyding/hfcl)
Therefor I would like this library to get rid of its verbose character. Currently vital information
and error messages are printed directly to the console which makes it unusable as library within a project.
Would you be interested in me adding a more meaningful error handling?
Of course I would stay backward compatible.

Kind regards,
lyding

Cant load all materials correctly

Hi,
I started to add error handling using custom exceptions.
During this I realized that some of the Exceptions in material.py are constructed
but not raised. So they where never active. After raising them I tried to recreate
the database which yielded that two materials could not be loaded:

LOG: 800,organic,polyvinylpyrrolidone,Konig : Invalid yaml material file
LOG: 2687,3d,plastics,pvp : Invalid yaml material file
***Wrote SQLite DB on refractive.db

The exception is raised from the constructor of the Material class in line 64
which was inert before cause of a missing raise statement.
I inspected the Koenig.yaml file:

DATA:

  • type: formula 5
    wavelength_range: 0.375 1
    coefficients: 1.5151 0.00279 -2 5.0756E-4 -4
  • type: tabulated nk
    data: |
    ....

It seems that this YAML file provides two different refractive index data.
I checked out the refractiveindex.info page and itt seems that they are using the formula
to interpolate the refractive index. I would change the loading code so it also prefers to formula
data over the tabulated data if both are given, or do you see a reason to do otherwise?

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.