aronnax icon indicating copy to clipboard operation
aronnax copied to clipboard

setting variables to 0 or 1 in call to driver.simulate results in an error

Open edoddridge opened this issue 8 years ago • 4 comments

Trying to override the value for slip in the config file by passing a new one to driver.simulate results in slip being set to yes for slip=1., or no for slip=0., rather than the numerical value.

Setting it for a partial slip simulation, somewhere in the open interval (0, 1), produces the expected outcome.

edoddridge avatar May 01 '17 14:05 edoddridge

This presumably has to do with the ConfigParser class trying to be clever somehow about variable types. It must be possible to either persuade it, or post-process. Does the same thing not happen with other variables? Is there anything obviously special about slip?

axch avatar May 05 '17 10:05 axch

I've just tested freesurfFac and it shows the same behaviour. I suspect other variables would too, but these ones are commonly set to zero or one, and hence we seem to be having numerical/boolean decision errors.

Setting them in the aronnax.conf file seems to be a manageable workaround for now.

edoddridge avatar May 06 '17 13:05 edoddridge

Stupid Python: python -c 'print 1 == True'. We're probably going to need an explicit workaround for this disaster.

axch avatar May 06 '17 16:05 axch

That's awkward.

edoddridge avatar May 06 '17 19:05 edoddridge