Commit c84cb53a authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Allow enable_halftomo=auto in nabu config

parent 1e1c6de7
......@@ -283,9 +283,9 @@ nabu_config = {
"type": "optional", # put "advanced" with default value "edges" ?
"enable_halftomo": {
"default": "0",
"help": "Whether to enable half-acquisition",
"validator": boolean_validator,
"default": "auto",
"help": "Whether to enable half-acquisition. Default is auto. You can enable/disable it manually by setting 1 or 0.",
"validator": boolean_or_auto_validator,
"type": "optional",
"start_x": {
......@@ -212,6 +212,14 @@ def boolean_validator(val):
assert error is None, "Invalid boolean value"
return res
def boolean_or_auto_validator(val):
res, error = convert_to_bool(val)
if error is not None:
assert val.lower() == "auto", "Valid values are 0, 1 and auto"
return val
return res
def float_validator(val):
val_float, error = convert_to_float(val)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment