rice-solar-physics / pydrad

Python tools for setting up HYDRAD runs and parsing output
https://pydrad.readthedocs.io
MIT License
4 stars 3 forks source link

Support parsing for more filetypes #97

Closed wtbarnes closed 4 years ago

wtbarnes commented 4 years ago

Adds support for .ine and .hstate files to partly address issue #9. Also fixes #71 and includes a fix to the naming of the HYDRAD config file to be consistent with the latest HYDRAD update.

To support parsing more quantities, I've made the property creation on Profile more programmatic so that adding more variables on each profile is easier.

For .ine files, the data are accessed via properties on Profile with the naming convention population_fraction_{element name}_{ion number} so if you wanted to get the population fraction of Fe XVIII at timestep 5 as a function of s,

>>> from pydrad.parse import Strand
>>> s = Strand('/path/to/HYDRAD')
>>> s[5].population_fraction_iron_18

These property names are created on the fly when the data are parsed from the .ine files.

For .hstate files, the data are accessed with the naming convention level_population_hydrogen_{level} where level is an integer between 1 and 7, 1 being the ground state and 7 being the fully ionized state.

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 147


Changes Missing Coverage Covered Lines Changed/Added Lines %
pydrad/visualize/plot.py 0 3 0.0%
pydrad/parse/parse.py 0 61 0.0%
<!-- Total: 12 76 15.79% -->
Files with Coverage Reduction New Missed Lines %
pydrad/parse/parse.py 3 0%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 144: -1.5%
Covered Lines: 229
Relevant Lines: 552

đź’› - Coveralls