IMSY-DKFZ / simpa

The Simulation and Image Processing for Photoacoustic Imaging (SIMPA) toolkit.
https://simpa.readthedocs.io/en/main/
Other
65 stars 17 forks source link

Additional executable flags #311

Open TomTomRixRix opened 5 days ago

TomTomRixRix commented 5 days ago

New PR for #9 instead of PR #168

Please check the following before creating the pull request (PR):

leoyala commented 4 days ago

I think that a better way to deal with additional flags would be such that the additional flags defined by the user take priority over the default flags that are defined on each module. For example, if the default flags are -F jnii, and the user passes -F mc2, then the one defined by the additional flags should take priority.

TomTomRixRix commented 4 days ago

I think that a better way to deal with additional flags would be such that the additional flags defined by the user take priority over the default flags that are defined on each module. For example, if the default flags are -F jnii, and the user passes -F mc2, then the one defined by the additional flags should take priority.

Although it is not necessarily always the case, usually if a flag is given multiple times the last given flag argument is considered. Thus our current implementation already allows for overriding existing flags as the additional flags are added at the end. We tested that this works at least for MCX and MATLAB and added this information to the documentation of Tags.ADDITIONAL_FLAGS

leoyala commented 4 days ago

I think that a better way to deal with additional flags would be such that the additional flags defined by the user take priority over the default flags that are defined on each module. For example, if the default flags are -F jnii, and the user passes -F mc2, then the one defined by the additional flags should take priority.

Although it is not necessarily always the case, usually if a flag is given multiple times the last given flag argument is considered. Thus our current implementation already allows for overriding existing flags as the additional flags are added at the end. We tested that this works at least for MCX and MATLAB and added this information to the documentation of Tags.ADDITIONAL_FLAGS

Ok that sounds good, I would say lets add that information in the docs then; otherwise users will not know that they can define additional flags

TomTomRixRix commented 2 days ago

Similar test for MATLAB in kWaveAdapter is still missing