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
393e0655
Commit
393e0655
authored
May 06, 2021
by
Pierre Paleo
Browse files
Compare current nabu_configuration with file dump nabu configuration
parent
af15f694
Pipeline
#46335
passed with stage
in 5 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/resources/processconfig.py
View file @
393e0655
import
os
import
posixpath
from
..utils
import
copy_dict_items
from
..io.config
import
NabuConfigParser
,
validate_nabu_config
from
..utils
import
copy_dict_items
,
compare_dicts
from
..io.config
import
NabuConfigParser
,
validate_nabu_config
,
import_h5_to_dict
from
..io.utils
import
hdf5_entry_exists
,
get_h5_value
from
.dataset_analyzer
import
analyze_dataset
,
DatasetAnalyzer
from
.dataset_validator
import
NabuValidator
...
...
@@ -569,6 +569,29 @@ class ProcessConfig:
return
None
self
.
logger
.
fatal
(
msg
)
raise
ValueError
(
msg
)
# Check parameters other than reconstruction
filedump_nabu_config
=
import_h5_to_dict
(
process_file
,
posixpath
.
join
(
self
.
dataset_infos
.
hdf5_entry
or
"entry"
,
self
.
resume_from_step
,
"configuration/nabu_config"
)
)
sections_to_ignore
=
[
"reconstruction"
]
for
section
in
sections_to_ignore
:
filedump_nabu_config
[
section
]
=
self
.
nabu_config
[
section
]
diff
=
compare_dicts
(
filedump_nabu_config
,
self
.
nabu_config
)
if
diff
is
not
None
:
msg
=
"Nabu configuration in file %s differ from the current one: %s"
%
(
process_file
,
diff
)
if
not
raise_on_error
:
self
.
logger
.
error
(
msg
)
return
None
self
.
logger
.
fatal
(
msg
)
raise
ValueError
(
msg
)
#
return
(
dump_start_z
,
dump_end_z
)
...
...
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