simpeg / aurora

software for processing natural source electromagnetic data
MIT License
14 stars 2 forks source link

Consistent Metadata with updated versions of MTH5 and MT-metadata #239

Closed kujaku11 closed 1 year ago

kujaku11 commented 1 year ago

Going through and trying to make sure metadata and methods are consistent with updated versions of MTH5 and mt-metadata before I merge them with master. The update was creating a single metadata object under the hood for mth5.timeseries.ChannelTS and mth5.timeseries.RunTS to allow for more self-consistent metadata. To do this an object was created for the list of metadata objects at the level below called mt_metadata.utils.list_dict.ListDict, which can be indexed as a list or keyed like a dictionary.

For example:

from mt_metadata.timeseries import Station, Run

s = Station(id="mt001")
s.add_run(Run(id="a"))
s.add_run(Run(id='"b"))

run_indexed = s.runs[0]
run_keyed = s.runs["a"]

# can be mixed slice as well
run_mixed = s.runs[0:"b"]
run_mixed = s.runs["a":]

Tasks Before Merging

codecov[bot] commented 1 year ago

Codecov Report

Merging #239 (1037175) into main (0f7c8f8) will decrease coverage by 0.08%. The diff coverage is 69.84%.

@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
- Coverage   77.62%   77.53%   -0.09%     
==========================================
  Files         101       99       -2     
  Lines        5470     5493      +23     
==========================================
+ Hits         4246     4259      +13     
- Misses       1224     1234      +10     
Impacted Files Coverage Δ
aurora/pipelines/process_mth5.py 98.11% <ø> (ø)
aurora/pipelines/run_summary.py 88.88% <ø> (ø)
aurora/pipelines/time_series_helpers.py 75.57% <ø> (+2.38%) :arrow_up:
aurora/sandbox/butterworth_filters.py 0.00% <0.00%> (ø)
aurora/time_series/windowed_time_series.py 50.74% <28.57%> (-3.36%) :arrow_down:
tests/parkfield/test_process_parkfield_run_rr.py 78.26% <41.66%> (-16.19%) :arrow_down:
tests/parkfield/test_process_parkfield_run.py 82.25% <47.36%> (-13.58%) :arrow_down:
tests/parkfield/test_calibrate_parkfield.py 80.00% <61.11%> (-13.94%) :arrow_down:
aurora/sandbox/io_helpers/make_mth5_helpers.py 91.66% <75.00%> (-6.01%) :arrow_down:
aurora/test_utils/parkfield/make_parkfield_mth5.py 81.08% <81.08%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kkappler commented 1 year ago

The aurora tests are failing for several reasons, which all appear to be because NCEDC is down, but none actually are.

So, the strategy for getting this PR across the line should probably be to review the Auxiliary channel issue. I created an issue#117 in mt_metadata to take a look at this.

A few other observations of things that can be improved when this PR is merged: