waltsims / k-wave-python

A Python interface to k-Wave GPU accelerated binaries
https://k-wave-python.readthedocs.io/en/latest/
GNU General Public License v3.0
109 stars 32 forks source link

Refactor ktransducer #437

Open faridyagubbayli opened 4 months ago

faridyagubbayli commented 4 months ago

Towards #436

Moved active_elements, transmit_apodization, receive_apodization and related methods to the kWaveTransducerSimple while ensuring backwards compatibility. This is part of the effort to refactor the ktransducer.py.

faridyagubbayli commented 4 months ago

@waltsims @djps can you have a look and comment on the direction? If the direction looks good, I'll go ahead and update the examples to use the new structure.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 69.64286% with 17 lines in your changes missing coverage. Please review.

Project coverage is 71.90%. Comparing base (98b0d26) to head (18daf0a).

Files Patch % Lines
kwave/ktransducer.py 69.64% 14 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #437 +/- ## ========================================== + Coverage 71.84% 71.90% +0.05% ========================================== Files 46 46 Lines 6744 6776 +32 Branches 1496 1503 +7 ========================================== + Hits 4845 4872 +27 - Misses 1334 1337 +3 - Partials 565 567 +2 ``` | [Flag](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | Coverage Δ | | |---|---|---| | [3.10](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `72.10% <69.64%> (+0.05%)` | :arrow_up: | | [3.11](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `72.10% <69.64%> (+0.05%)` | :arrow_up: | | [3.12](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `72.10% <69.64%> (+0.05%)` | :arrow_up: | | [3.9](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `71.87% <69.64%> (+0.05%)` | :arrow_up: | | [macos-latest](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `71.84% <69.64%> (+0.05%)` | :arrow_up: | | [ubuntu-latest](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `71.87% <69.64%> (+0.05%)` | :arrow_up: | | [windows-latest](https://app.codecov.io/gh/waltsims/k-wave-python/pull/437/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson) | `71.88% <69.64%> (+0.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Walter+Simson#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

waltsims commented 4 months ago

@faridyagubbayli how do you plan to make this backwards compatible?