Open TomTomRixRix opened 3 years ago
The settings prerequisites are checked on the level of the simulate
method already:
As such, the check can be omitted from any other location in the SIMPA source.
For use cases, where a module adapter is called individually (e.g. fr performing image reconstruction ONLY), isn't it desirable to automatically test if the volume and the device are compatible? Otherwise, it would be the responsibility of the user and might lead to errors that are hard to explain...
What do you think @TomTomRixRix
You're right, if the adapters are used individually it makes completely sense to perform these checks in each adapter. Only in the use case of an entire simulation pipeline we should do the check once in the beginning and don't repeat it in every adapter.
Any idea how to implement this behaviour? :D
Perhaps by having some sort of global variable haveChecksBeenPerformed
which is set to true once the checks have been performed. Each adapter can then skip the tests accordingly or perform them, if it is the first adapter.
At the moment, the
check_settings_prerequisites()
method is called several times within a simulation, e.g. in the kWave adapter and during reconstruction with DAS. It would be desirable if the settings were only checked once in the beginning of a simulation, so that all adapters can assume that all settings are valid.