-
Notifications
You must be signed in to change notification settings - Fork 4
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
Merge/add multichannel masks #57
Conversation
Is it safe to apply a single-channel mask across all channels if no specific mask is designed for each individual channel? |
If you enhanced the functionality of apply_mask, shouldn't you also update the modified function's documentation? |
This is the previous behaviour of the function - if you give it a mask with channels, it just applies channel 0 to everything |
Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! It should be fine to add at this time, but we will have to investigate how to solve the test failing.
* ci(deps): Bump actions/cache from 3.3.1 to 3.3.2 (OSOceanAcoustics#1161) Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): [pre-commit.ci] pre-commit autoupdate (OSOceanAcoustics#1162) updates: - [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Feature/add transient noise mask (#49) * added the feature described in issue 1 * Moved code for the signal attenuation mask to new file * Resolved merge conflicts by accepting remote versions of files * Update mask_attenuated_signal.py * renamed utils * Added unit test * Test can now automatically download its data * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Cleaned up mask_transformation * moved files and rerouted importing paths accordingly (#36) Co-authored-by: alejandro-ariza <[email protected]> * Feature/add transient noise mask (#35) * Completed feature #3 transient noise mask --------- Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Raluca Simedroni <[email protected]> Co-authored-by: ruxandra valcu <[email protected]> * Added extra tests for the utils/mask_transformation module to increase coverage * Reverted test_mask.py reformating * Moved impulse and transient noise functions to echopype/clean * Fixed import order * Fixed missing import in clean/conftest.py * Moved content of tests/clean/conftest.py to tests/conftest.py * Refactoring * Running some linters on the code * ci(deps): Bump actions/cache from 3.3.1 to 3.3.2 (OSOceanAcoustics#1161) Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): [pre-commit.ci] pre-commit autoupdate (OSOceanAcoustics#1162) updates: - [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Fix unused imports in conftest * Update echopype/mask/mask_attenuated_signal.py Co-authored-by: Raluca Simedroni <[email protected]> Update mask_transformation.py Cleaned up mask_transformation Delinted Removing pytest req Refactoring Refactoring and cleaning imports Fixed twod test Fixing some future merge conflicts Fix unused import Added attenuation mask to init * Added channel selection to signal attenuation mask --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: Raluca Simedroni <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: alejandro-ariza <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Feature/add attenuation mask (#50) * added the feature described in issue 1 * Moved code for the signal attenuation mask to new file * Resolved merge conflicts by accepting remote versions of files * Update mask_attenuated_signal.py * renamed utils * Added unit test * Test can now automatically download its data * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/utils/mask_transformation.py Co-authored-by: Raluca Simedroni <[email protected]> * Cleaned up mask_transformation * Update echopype/mask/mask_attenuated_signal.py Co-authored-by: Raluca Simedroni <[email protected]> Update mask_transformation.py Cleaned up mask_transformation Delinted Removing pytest req Refactoring Refactoring and cleaning imports Fixed twod test Fixing some future merge conflicts Fix unused import Added attenuation mask to init * Added channel selection to signal attenuation mask --------- Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: Raluca Simedroni <[email protected]> * Patch/nasc (#51) * Add conversion factors for NASC computation - Convert backscattering cross-section to scattering cross-section. - Convert meters to nmi. * Fix nasc test --------- Co-authored-by: Raluca Simedroni <[email protected]> * Merge/add shoal mask (#55) * Mask utils * rename * Mask utils * Weill shoal mask * Decided against implementing the echoview method * Turned out not to need these * Add wrapper function * Refactoring and adding channel selection capability * Merge/add seabed mask (#56) * Initial implementation of the seabed masking. * Code for seabed masking * Changed dilation source package from cv2 to skimage. * some refactoring and add unit test * Update echopype/mask/mask_seabed.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/tests/mask/test_mask_seabed.py Co-authored-by: Raluca Simedroni <[email protected]> * Re-added mask_transformation, with only the necessary functions kept * Changed the tests to be able to autodownload its files - must check that I have the correct one though since the test isn't passing * Cleaned up mask_transformation * Copyright notices Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/mask/mask_seabed.py Co-authored-by: Raluca Simedroni <[email protected]> * Update echopype/mask/mask_seabed.py Co-authored-by: Raluca Simedroni <[email protected]> * Update incorrect file name * Mask transformation consistency * Mask transformation consistency * Removing pytest req * Refactoring * Fix twod test * Refactoring * Test fixes * Fixing merge compatibility * Added dataset generation for datasets enriched with beam angle and location data * Added dataset generation for datasets enriched with beam angle and location data * Added channel selection. * Modified Blackwell methods to use the physical beam angle rather than the raw EK60 beam angle - doing this using a correction on the angle itself (rather than modifying the constants) since the changes are nonlinear so if I want a linear transformation, I need to apply it on the angle data itself - angle * 22 * 128 / 180, which gets it close to how a decently calibrated EK60 instrument as used by Blackwell et al stores its raw angle data. * Indent fix * Merge fixes --------- Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: Raluca Simedroni <[email protected]> * Merge/add multichannel masks (#57) * Initial multichannel mask * Fixed a has-channels check in apply_mask, added tests * Documentation * Made changes to conftest --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Mihai Boldeanu <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: Raluca Simedroni <[email protected]> Co-authored-by: Andrei Rusu <[email protected]> Co-authored-by: alejandro-ariza <[email protected]>
* Initial multichannel mask * Fixed a has-channels check in apply_mask, added tests * Documentation
Added multichannel mask support to apply_mask - if a channelless or single-channel mask is provided it'll apply it to all channels of the dataset, whereas if a mask with multiple channels is provided, it'll apply each channel of the mask to the corresponding channel individually.