Commit 5264c4d6 authored by payno's avatar payno Committed by Henri Payno
Browse files

sino normalization: adapat to what nabu expects.

parent 7eed11f3
......@@ -60,6 +60,7 @@ from time import sleep
import os
import uuid
from tomoscan.io import HDF5File
import numpy
_logger = logging.getLogger(__name__)
try:
......@@ -519,7 +520,14 @@ class _NabuBaseReconstructor:
serving_hatch_data_path = "/".join(
[entry_path, str(uuid.uuid1())]
)
h5f[serving_hatch_data_path] = extra_infos["value"]
# adapt value to what nabues expects.
array = extra_infos["value"]
if (
isinstance(array, numpy.ndarray) and array.ndim == 1
) or isinstance(array, (tuple, list)):
dim_1 = self.scan.dim_1
array = numpy.repeat(array, dim_1).reshape(len(array), dim_1)
h5f[serving_hatch_data_path] = array
file_path = os.path.join(
settings.NABU_CFG_FILE_FOLDER, settings.NABU_TOMWER_SERVING_HATCH
)
......
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