Skip to content

Commit 6b08eaa

Browse files
authored
Merge pull request #96 from DiamondLightSource/find_center
adding a fix for find_center template generator
2 parents 6d73612 + a2c9aa5 commit 6b08eaa

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎httomo_backends/methods_database/packages/backends/httomolibgpu/supporting_funcs/misc/morph.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _calc_memory_bytes_sino_360_to_180(
8989
kwargs["overlap"] = params["overlap"].default
9090
overlap: float = kwargs["overlap"]
9191

92-
original_sino_width = non_slice_dims_shape[1] # detX
92+
original_sino_width = non_slice_dims_shape[1] # detX
9393
stitched_sino_width = original_sino_width * 2 - math.ceil(overlap)
9494
stitched_sino_padded = original_sino_width * 2
9595

@@ -123,4 +123,4 @@ def _calc_memory_bytes_sino_360_to_180(
123123
+ 4 * summand_size
124124
)
125125

126-
return int(1.1*total_memory_bytes), 0
126+
return int(1.1 * total_memory_bytes), 0

‎httomo_backends/scripts/yaml_pipelines_generator.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def yaml_pipelines_generator(
220220
pipeline_full[i]["parameters"].yaml_add_eol_comment(
221221
key="path_to_stiched_params_file",
222222
comment="Provide an absolute path to the text file with seam index and blending width.",
223-
)
223+
)
224224
elif "data_resampler" in method_name:
225225
pipeline_full.yaml_set_comment_before_after_key(
226226
i,

‎httomo_backends/scripts/yaml_templates_generator.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import importlib
3030
import inspect
3131
import os
32-
import re
3332
from typing import Any, List, Dict
3433

3534
import yaml
@@ -163,18 +162,18 @@ def _set_dict_special_cases(method_dict: Dict, method_name: str):
163162
method_dict: Dictionary of modules and parameters
164163
method_name: Name of method
165164
"""
166-
if method_name in ["find_center_vo", "find_center_pc"]:
165+
if method_name in ["find_center", "find_center_vo", "find_center_pc"]:
167166
method_dict["id"] = "centering"
168167
method_dict["side_outputs"] = {"cor": "centre_of_rotation"}
169-
if method_name in "find_center_360":
168+
if method_name in ["find_center_360"]:
170169
method_dict["id"] = "centering"
171170
method_dict["side_outputs"] = {
172171
"cor": "centre_of_rotation",
173172
"overlap": "overlap",
174173
"side": "side",
175174
"overlap_position": "overlap_position",
176175
}
177-
if method_name in "calculate_stats":
176+
if method_name in ["calculate_stats"]:
178177
method_dict["id"] = "statistics"
179178
method_dict["side_outputs"] = {"glob_stats": "glob_stats"}
180179

0 commit comments

Comments
 (0)