Closed theHenks closed 6 months ago
Attention: 36 lines
in your changes are missing coverage. Please review.
Comparison is base (
59e5b50
) 48.96% compared to head (c9fd111
) 48.37%. Report is 9 commits behind head on main.:exclamation: Current head c9fd111 differs from pull request most recent head f4ce721. Consider uploading reports for the commit f4ce721 to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/filekey.jl | 0.00% | 17 Missing :warning: |
src/lprops.jl | 55.88% | 15 Missing :warning: |
src/dataprod_config.jl | 0.00% | 2 Missing :warning: |
src/legend_data.jl | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR enables features to read and write pars with units and uncertainties from
json
files. In particular, the following functions are provided:uparse(pd::PropDict)
andustrip(pd::PropDict)
: Parse units and strip units from a PropdDict. The units have to be stored in the:unit
field while the value and error have to be in the:val
and:err
field. The parsing remove the:val
key completely if the there is only the:val
and:unit
field present. The:unit
field has to be able to be parsed by Unitful.Ustrip
performs the opposite operationmeasurement(pd::PropDict)
andmstrip(pd::PropDict)
: Parse uncerainties from the:err
field into the variable. The parsing remove the:val
key completely if there is only the:val
and:err
key present.readlprops
andwritelprops
: New read and write function for LEGENDpars
which automatically reads and writes units and uncertainties. Example input:Example output: