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

Add custom element #212

Merged
merged 4 commits into from
Oct 19, 2023
Merged

Add custom element #212

merged 4 commits into from
Oct 19, 2023

Conversation

bvale1
Copy link
Contributor

@bvale1 bvale1 commented Sep 25, 2023

Sorry I had to put this down temporarily and focus on a deadline but I've added the 2d and 3d custom element instances to both collect_kWaveArray.m and kWaveArray_test.py. The test was a pass on my system.

Copy link
Owner

@waltsims waltsims left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This looks great to me.

As I have noted, one check for dimensionality with the custom element needs to be included.

Thanks!

kwave/utils/kwave_array.py Show resolved Hide resolved
@bvale1
Copy link
Contributor Author

bvale1 commented Oct 17, 2023

I've made the requested changes, this PR is ready be reviewed.

@bvale1 bvale1 requested a review from waltsims October 17, 2023 10:36
Also test that error is correctly raised
@waltsims
Copy link
Owner

I believe this now matches the logic from MATLAB and passes the CI when testing that the ValueError is raised. I think there is a logic error in k-wave MATLAB with the use of element_dim and input_dim in the kwavearray that I would like to bring up on the k-wave repository. Thanks for this PR!

Copy link
Owner

@waltsims waltsims left a comment

Choose a reason for hiding this comment

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

This is great. Thanks.

@waltsims waltsims merged commit d2176e0 into waltsims:master Oct 19, 2023
21 checks passed
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.

None yet

2 participants