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

Add tests and peek function for emission measure #113

Closed wtbarnes closed 4 years ago

wtbarnes commented 4 years ago

Related to comments in #110, this PR adds a method for quickly plotting the emission measure and also adds a few tests.

codecov[bot] commented 4 years ago

Codecov Report

Merging #113 into master will decrease coverage by 1.69%. The diff coverage is 14.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   43.41%   41.71%   -1.70%     
==========================================
  Files          10       10              
  Lines         463      489      +26     
==========================================
+ Hits          201      204       +3     
- Misses        262      285      +23     
Impacted Files Coverage Δ
pydrad/configure/configure.py 57.66% <ø> (ø)
pydrad/parse/parse.py 32.79% <14.28%> (-1.51%) :arrow_down:
pydrad/visualize/plot.py 14.45% <15.38%> (-1.04%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3f49d3...8bd7514. Read the comment docs.

wtbarnes commented 4 years ago

@jwreep with this PR, you should now be able to do something like,

import pydrad.parse
s = pydrad.parse.Strand('/path/to/my/hydrad')
s[10].peek_emission_measure()

to preview the column emission measure at the 10th timestep.