k-wave-python icon indicating copy to clipboard operation
k-wave-python copied to clipboard

[Enhancement] Improve p0 mutation behavior

Open waltsims opened this issue 1 year ago • 1 comments

I also noticed, that kspaceFirstOrderxD mutates its inputs, which is not the case in the matlab version. Is this your desired behaviour? If you run e.g. the at_array_as_sensor example with pml_inside=False, the source.p0 gets expanded, which leads to a crash in the second kspaceFirstOrder2D. To fix this we could copy some of the inputs at the beginning of kspaceFirstOrderxD.

Originally posted by @faberno in https://github.com/waltsims/k-wave-python/issues/463#issuecomment-2323102024

waltsims avatar Sep 19 '24 00:09 waltsims

Copying will result in increased memory usage. I wonder if there is another way?

faridyagubbayli avatar Sep 24 '24 16:09 faridyagubbayli