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

Fix CW-based beamwidth scaling #998

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

leewujung
Copy link
Member

@leewujung leewujung commented Mar 20, 2023

This PR addresses #997:

  • fix the bug in scaling CW-based beamwidth_alongship and beamwidth_athwartship when frequency-dependent beamdwidth cal parameters do not exist in the data Vendor-specific group.
  • add a test that ensures the scaling is applied correctly for the following parameters that all require scaling. Note in the descriptino below fc is center frequency of each broadband ping, fn is the channel nominal frequency.
    • beamwidth_alongship and beamwidth_athwartship: scale by fn/fc
    • angle_sensitivity_alongship and angle_sensitivity_athwartship: scale by fc/fn
    • equivalent_beam_angle: scale by (fn/fc)^2

Just to have things all in one place, we do not need to alter the test file test_calibrate_ek80.py, because (from my comment in #997):

Turns out for that particular file used in test_calibrate_ek80.py, there was no need to scale CW-based cal parameters (stored in the Sonar/Beam_groupX group) because those cal parameters happen to exist in a frequency-dependent form (stored in the Vendor-specific group) for the BB channels. (To elaborate: scaling is only needed if a particular parameter is not available in the frequency-dependent form and needs to be estimated from CW-based values.)

@leewujung leewujung added this to the 0.6.4.2 milestone Mar 20, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #998 (2350cf0) into dev (edc1d15) will increase coverage by 11.84%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##              dev     #998       +/-   ##
===========================================
+ Coverage   79.72%   91.56%   +11.84%     
===========================================
  Files          62       11       -51     
  Lines        5721      854     -4867     
===========================================
- Hits         4561      782     -3779     
+ Misses       1160       72     -1088     
Flag Coverage Δ
unittests 91.56% <100.00%> (+11.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
echopype/calibrate/cal_params.py 92.42% <100.00%> (+0.11%) ⬆️

... and 51 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants