Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
c84cb53a
Commit
c84cb53a
authored
May 11, 2021
by
Pierre Paleo
Browse files
Allow enable_halftomo=auto in nabu config
parent
1e1c6de7
Changes
2
Hide whitespace changes
Inline
Side-by-side
nabu/resources/nabu_config.py
View file @
c84cb53a
...
...
@@ -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"
:
{
...
...
nabu/resources/validators.py
View file @
c84cb53a
...
...
@@ -212,6 +212,14 @@ def boolean_validator(val):
assert
error
is
None
,
"Invalid boolean value"
return
res
@
validator
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
@
validator
def
float_validator
(
val
):
val_float
,
error
=
convert_to_float
(
val
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment