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

Fc into earthscope #286

Merged
merged 45 commits into from
Sep 6, 2023
Merged

Fc into earthscope #286

merged 45 commits into from
Sep 6, 2023

Conversation

kkappler
Copy link
Collaborator

@kkappler kkappler commented Sep 5, 2023

FCs are now passing basic tests. Just wanted to leave a record of merging the updates into earthscope tests branch in case we need to go back. mth5_helpers.py is not merged (there are several functions in earthscope_tests not in FCs.

kkappler added 30 commits July 23, 2023 13:21
- Add unit test to cover basic creation of fcs for synthetic data
- add core FC building methods to pipelines
- modify make_mth5_from_ascii so that
   - main takes version as a kwarg
   - ensure all retuned mth5_paths are instances of pathlib.Path

Relates to issue #278
- utilize save_fcs and save_fcs_type in updated processing config
- deprecate save_fcs kwarg from process_mth5
- minor tidying
- uncomment code to add FC layer in process_mth5
- rearrange some notes/comments in TFK
- also, test_doc failing, 3.9+, 3.8 OK,
- add check to fc metadata
- change processing_summary validation to use the value in metadata
as this property was added to mt_metadata in aurora processing config
…info into h5 archive (instead of default init values)
- Created make_fc_metadata_from_processing_config
  - there are still some things to iron out but its working on first synthetic test
- Tuned some logic in tf_kernel
- add logic to get fc from h5 if exists
- skip timeseries initialization in KernleDataset if fcs exist
- skip timeseries decimation in tfk if fcs exist
- had to swap between dataset and dataarray ion extract_band to use FC data (maybe due to h5 ref)
Previously was passing FCDecimationGroup but all checks are perfomed
on the layer fc_group.metadata which is an object of type:
mt_metadata.transfer_functions.processing.fourier_coefficients.decimation.Decimation

So, update and rename the consistency check to:
fcdecimation_has_fcs_for_processing.

This is a staging commit, eventually this method will become a class method of
mt_metadata.transfer_functions.processing.fourier_coefficients.decimation.Decimation
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #286 (a346601) into earthscope_tests (be25cc7) will decrease coverage by 1.95%.
Report is 164 commits behind head on earthscope_tests.
The diff coverage is 56.33%.

@@                 Coverage Diff                  @@
##           earthscope_tests     #286      +/-   ##
====================================================
- Coverage             77.31%   75.37%   -1.95%     
====================================================
  Files                    84       86       +2     
  Lines                  5170     5534     +364     
====================================================
+ Hits                   3997     4171     +174     
- Misses                 1173     1363     +190     
Files Changed Coverage Δ
aurora/pipelines/run_summary.py 88.88% <ø> (ø)
aurora/sandbox/mth5_helpers.py 0.00% <0.00%> (ø)
aurora/pipelines/process_mth5.py 90.16% <78.04%> (-6.90%) ⬇️
tests/synthetic/test_fourier_coefficients.py 80.32% <80.32%> (ø)
aurora/pipelines/transfer_function_kernel.py 90.72% <82.50%> (+0.02%) ⬆️
aurora/pipelines/fourier_coefficients.py 87.36% <87.36%> (ø)
aurora/test_utils/synthetic/make_mth5_from_asc.py 84.21% <87.50%> (+0.73%) ⬆️
aurora/transfer_function/kernel_dataset.py 72.82% <93.33%> (-6.63%) ⬇️
aurora/sandbox/io_helpers/zfile_murphy.py 82.08% <100.00%> (ø)
aurora/test_utils/synthetic/rms_helpers.py 72.54% <100.00%> (ø)
... and 5 more

... and 4 files with indirect coverage changes

Use built-in method that i created a while ago.
This commit has a bunch of commented lines (for posterity) at the
top if process_mth5.py.  These will be deleted and cleaned up now.
- replace boolean kwarg "remake_if_exists" with "force_make_mth5"
- add test_create_then_use_stored_fcs_for_processing to test_fourier_coefficients
(using a local import)
- latest fix is on fix_issue_157
@kkappler kkappler merged commit 7f88940 into earthscope_tests Sep 6, 2023
@kkappler kkappler deleted the fc_into_earthscope branch September 19, 2023 20:28
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