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

Update record_reader.py to remove warnings #211

Merged
merged 37 commits into from
Jan 18, 2024
Merged

Conversation

waltsims
Copy link
Owner

No description provided.

@waltsims waltsims removed the request for review from faridyagubbayli September 28, 2023 21:06
@waltsims waltsims marked this pull request as draft September 28, 2023 21:06
@waltsims waltsims marked this pull request as ready for review December 20, 2023 02:03
@waltsims
Copy link
Owner Author

This is the best I can do for the time being. It would seem many methods are not careful about zero division, but this is also the case in MATLAB, so fixing k-wave-python breaks tests.

@waltsims waltsims requested a review from djps December 27, 2023 01:14
@waltsims waltsims added this to the v0.3.1 milestone Jan 15, 2024
Copy link
Collaborator

@faridyagubbayli faridyagubbayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

kwave/options/simulation_options.py Show resolved Hide resolved
kwave/utils/atten_comp.py Outdated Show resolved Hide resolved
kwave/utils/atten_comp.py Outdated Show resolved Hide resolved
@@ -2720,6 +2726,8 @@ def calculate_axial_pressure() -> float:
def calculate_lateral_pressure() -> float:
# calculate magnitude of the lateral pressure at the geometric focus
Z = k * lateral_positions * diameter / (2 * radius)
# TODO: this should work
# assert np.all(Z) > 0, 'Z must be greater than 0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to enable this check?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fails the CI.

kwave/utils/signals.py Show resolved Hide resolved
@faridyagubbayli
Copy link
Collaborator

Sorry for keeping this PR unreviewed for such a long time!

Copy link
Collaborator

@faridyagubbayli faridyagubbayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@waltsims waltsims merged commit c37b2e5 into master Jan 18, 2024
30 checks passed
@waltsims waltsims deleted the clean-up-pytest-warnings branch January 18, 2024 18:32
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.

2 participants