Open johannesmayer opened 1 year ago
I think it would make sense to add it to the env
scripts as a default value, and provide an equivalent to stir.set_verbosity()
in SIRF that would set the env variable, assuming that changing the env variable while in python would change the log-level. @johannesmayer could you test that?
I did some testing, but doing anything to the environmental variables from Python will not modify them in the parent shell (according to SO). Setting the verbosity level within Python seems not possible.
yes, you cannot modify anything in the parent shell, and certainly not anything for a running Gadgetron server. However, you are running this toolboxes directly from SIRF, so I didn't think the parent shell as we involved. I think if you change the env variables from Python, you would change them for the whole process, and therefore for anything that runs from Python. But I guess you tried that...
The alternative is to do a PR to Gadgetron to be able to switch this output off.
The non-uniform Fourier transform using Gadgetron generates a lot of output during the gridding. The output is just timing how long the gridding took. In the past this has caused notebooks to crash without warning.
This output can be suppressed by adjusting the gadgetron logger-level setting an environmental variable
export GADGETRON_LOG_MASK="LEVEL_INFO"
(c.f. here).This should be documented somewhere, but I don't know where would be best. Or maybe exporting the variable in the sirf environmental script could automatically suppress it, I don't know what would be best.