Skip to content
GitLab
Menu
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
8b8a3d12
Commit
8b8a3d12
authored
Apr 09, 2021
by
Pierre Paleo
Browse files
Account for CTF translations
parent
e2c0c39d
Pipeline
#44565
passed with stage
in 6 minutes and 10 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/app/fullfield_mixed.py
View file @
8b8a3d12
...
...
@@ -322,8 +322,8 @@ class FullRadiosPipeline(FullFieldPipeline):
self
.
phase_retrieval
.
retrieve_phase
(
self
.
radios
[
i
],
padding_mode
=
padding_mode
,
translation_vh
=
None
,
normalize_by_mean
=
None
,
translation_vh
=
self
.
dataset_info
.
ctf_translations
[
i
]
,
normalize_by_mean
=
options
[
"ctf_normalize_by_mean"
]
,
)
...
...
nabu/resources/dataset_analyzer.py
View file @
8b8a3d12
...
...
@@ -100,6 +100,7 @@ class DatasetAnalyzer(object):
self
.
radio_dims
=
(
self
.
dataset_scanner
.
dim_1
,
self
.
dataset_scanner
.
dim_2
)
self
.
_binning
=
(
1
,
1
)
self
.
translations
=
None
self
.
ctf_translations
=
None
self
.
axis_position
=
None
self
.
_radio_dims_notbinned
=
self
.
radio_dims
...
...
nabu/resources/dataset_validator.py
View file @
8b8a3d12
...
...
@@ -37,7 +37,8 @@ class NabuValidator(object):
self
.
convert_negative_indices
()
self
.
get_angles
()
self
.
_get_rotation_axis
()
self
.
_get_translation_file
()
self
.
_get_translation_file
(
"reconstruction"
,
"translation_movements_file"
,
"translations"
)
self
.
_get_translation_file
(
"phase"
,
"ctf_translations_file"
,
"ctf_translations"
)
self
.
_get_resources
()
self
.
_get_output_filename
()
...
...
@@ -130,9 +131,8 @@ class NabuValidator(object):
self
.
dataset_infos
.
axis_correction
=
axis_correction
def
_get_translation_file
(
self
):
rec_params
=
self
.
nabu_config
[
"reconstruction"
]
transl_file
=
rec_params
[
"translation_movements_file"
]
def
_get_translation_file
(
self
,
config_section
,
config_key
,
dataset_info_attr
):
transl_file
=
self
.
nabu_config
[
config_section
][
config_key
]
if
transl_file
in
(
None
,
''
):
return
translations
=
None
...
...
@@ -150,7 +150,7 @@ class NabuValidator(object):
except
:
print
(
"Something wrong with translation_movements_file %s"
%
transl_file
)
raise
self
.
dataset_infos
.
translations
=
translations
setattr
(
self
.
dataset_infos
,
dataset_info_attr
,
translations
)
def
_get_resources
(
self
):
...
...
nabu/resources/nabu_config.py
View file @
8b8a3d12
...
...
@@ -208,7 +208,7 @@ nabu_config = {
"validator"
:
optional_string_validator
,
"type"
:
"optional"
,
},
"ctf_translations"
:
{
"ctf_translations
_file
"
:
{
"default"
:
""
,
"help"
:
"A file where each line has two values: horizontal and vertical displacements. There should be as many values as there are projection images."
,
"validator"
:
optional_file_location_validator
,
...
...
nabu/resources/processconfig.py
View file @
8b8a3d12
...
...
@@ -417,4 +417,3 @@ class ProcessConfig:
phase_options
[
"ctf_lim1"
]
=
ctf_advanced_params
[
"lim1"
]
phase_options
[
"ctf_lim2"
]
=
ctf_advanced_params
[
"lim2"
]
phase_options
[
"ctf_normalize_by_mean"
]
=
ctf_advanced_params
[
"normalize_by_mean"
]
phase_options
[
"ctf_translations"
]
=
user_phase_options
[
"ctf_translations"
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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