exa-analytics / exa

The exa framework for data management, processing, and visualization
https://exa-analytics.github.io/exa
Apache License 2.0
2 stars 10 forks source link

Fix units #216

Closed herbertludowieg closed 3 years ago

herbertludowieg commented 3 years ago

Changed the way that we read the constants table to be read as a csv instead of a json file. This makes it easier to maintain the file up to date from NIST as with some simple formatting changes we can make a csv file that is still easily readable to cross-check for any mistakes.

Changed some of the more important unit conversions (mainly energy conversions) by hand which unfortunately won't be shown as it is a binary file. I went through the constants table to find any conversion units that are available and added those into the json file.

Will close #213

herbertludowieg commented 3 years ago

The most recent push removed the files constants.json and nist-constants-2018.txt.

I think it would be a good idea to do something where you can request a specific version of the constants. I think that could be in a separate PR as it would probably require scripts to parse and rearrange the data correctly. The other option would be to include them and use some lzma compression as that can still be parsed by pandas and I have found it to be the most aggressive compression.

I'll look into the arbitrary precision math objects. That sounds like it would be a valuable addition since we are dealing with what should be exact values.