Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set_frequency_bands method to processing class #214

Merged
merged 22 commits into from
Sep 10, 2022
Merged

Conversation

kkappler
Copy link
Collaborator

Carve a place for assignment of frequency bands via
a list of band_edges.

[Issue(s): #150]

Carve a place for assignment of frequency bands via
a list of band_edges.

[Issue(s): #150]
@codecov
Copy link

codecov bot commented Aug 28, 2022

Codecov Report

Merging #214 (b80d431) into main (e311397) will increase coverage by 1.45%.
The diff coverage is 90.39%.

@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
+ Coverage   77.50%   78.96%   +1.45%     
==========================================
  Files          99      101       +2     
  Lines        5104     5306     +202     
==========================================
+ Hits         3956     4190     +234     
+ Misses       1148     1116      -32     
Impacted Files Coverage Δ
aurora/config/metadata/band.py 100.00% <ø> (ø)
aurora/time_series/frequency_band.py 69.01% <ø> (+1.11%) ⬆️
...ora/transfer_function/weights/coherence_weights.py 0.00% <ø> (ø)
aurora/time_series/windowing_scheme.py 92.56% <33.33%> (+0.32%) ⬆️
aurora/transfer_function/kernel_dataset.py 76.87% <66.66%> (+21.87%) ⬆️
aurora/config/metadata/channel_nomenclature.py 88.40% <71.42%> (+1.96%) ⬆️
aurora/time_series/frequency_band_helpers.py 61.53% <75.00%> (+18.14%) ⬆️
aurora/sandbox/io_helpers/emtf_band_setup.py 80.30% <90.47%> (+59.61%) ⬆️
aurora/config/metadata/processing.py 71.52% <91.89%> (-3.48%) ⬇️
aurora/config/config_creator.py 91.89% <92.30%> (+3.00%) ⬆️
... and 40 more

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

Fix issue 90
and issue 3134 with obspy seems to be fixed as well
Cleanup, towards issue#150.
Also reduced to only one test (py3.8)

[Issue(s): #150]
See Issue #218.
Replace reference to bs_256 with bs_256_26 which has 3 fewer bands

bs_256.cfg has 29 bands and has been giving unstable results on the test dataset at the lowest
frequencies.  To avoid this issue, I created a truncated file, bs_256_26.cfg, truncated to
omit the 3 longest period bands (for which the matlab codes never showed results anyhow).

The _26 file should be used for the matlab comparison test.

[Issue(s): #218]
The files in config/emtf_band_setup/ were:
bs_256_26.cfg
bs_256.cfg
bs_test.cfg

And are from the EMTF FORTRAN code repository.

bs_test.cfg is the boilerplate band_setup file, and normally goes with 128 point windows.

bs_256.cfg has 29 bands and has been giving unstable results on the test dataset at the lowest
frequencies.  To avoid this issue, I created a truncated file, bs_256_26.cfg, truncated to
omit the 3 longest period bands (for which the matlab codes never showed results anyhow).

The _26 file should be used for the matlab comparison test.

Renaming bs_256.cfg to bs_256_29.cfg, and make the
test that compares output with the matlab codes use bs_256_26.cfg.

[Issue(s): #218]
-Fix emtf_band_setup_files to import from their own __init__.py
-Add _band_specification_style attr to ConfigCreator
-add fftfreqs method to decimation_level
-add method (assign_bands) to processing.py to allow (prototype) band specifcati
ons
-correct some definitions in band.json

[Issue(s): #150]
Added a simple test that creates bands from manually accessing
the band edges that are assocaited with the emtf band default file.

[Issue(s): #150]
Now, even if band definition is from an emtf band setup file,
band edges are defined and used.
-Deprecated read_emtf_bands method in processing.py
-added compute_band_edges method to EMTF band setup file
-deprecated from_emtf_band_setup & from_emtf_band_df in frequency_band.py

-also, cleaned up calls to fftfreqs, replacing with get_fft_harmonics where appropriate

[Issue(s): #150]
-modified frequency_bands_obj() method of decimation_level.py to
remove duplication of band_edges assignment
-tried to remove all calls to deprecated from_emtf_band_df() method

[Issue(s): #150]
-Add some properties to decimation_level and processing classes to
make access of frequency_bands info easy from Processing objects
-Use this change to update test_define_frequency_bands.py to access
bands programatically

[Issue(s): #150]
Added  a band_specification_style to the processing config at the top
level.  The band_setup_file path is also written to the config is
relevant

[Issue(s): #150]
Streamlined some methods in frequency_bands marked as deprecated
Tracked down last usage to a test for the matlab_z_file_reader
Tuned up the test for the matlab_z_file_reader so that it has an assert
statement

[Issue(s): #150]
Also:
-add a few docstrings from last commit
-restore all three versions tests in prep for merge into main

[Issue(s): #150]
@kkappler kkappler merged commit d666080 into main Sep 10, 2022
@kkappler kkappler deleted the fix_issue_150 branch September 10, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant