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

data_cast as numpy dtype

Open djps opened this issue 1 year ago • 4 comments

Describe the bug Makes sense to refactor parts of simulation_options so that the data_cast option is a numpy type rather than a string

djps avatar Mar 05 '24 19:03 djps

@djps can you better describe what the current behavior is and what enhancement is needed?

waltsims avatar Mar 30 '24 18:03 waltsims

In simulation_options the argument data_cast is either either off, single or double.

I think setting a default as np.float64 with another accepted option being np.float32.

djps avatar Apr 01 '24 19:04 djps

Currently in save_h5_file all values are cast to float32 here. We can continue to look into this behavior and try to ensure that precision is taken into account.

waltsims avatar Apr 02 '24 18:04 waltsims

Seems to replicate the matlab behaviour in writeMatrix

djps avatar Apr 02 '24 18:04 djps