Commit 6c121462 authored by payno's avatar payno
Browse files

[scanbase] keep original behavior: flat_field_correction always return a list...

[scanbase] keep original behavior: flat_field_correction always return a list of nuloy array even if flat field correction fails
parent 7625fcb5
Pipeline #33050 passed with stages
in 3 minutes and 51 seconds
......@@ -551,20 +551,27 @@ class TomoScanBase:
if dark is None:
if self._notify_ffc_rsc_missing:
_logger.error("cannot make flat field correction, dark not found")
return
return [
get_data(proj) if isinstance(proj, DataUrl) else proj
for proj in projs
]
if dark is not None and dark.ndim != 2:
_logger.error(
"cannot make flat field correction, dark should be of " "dimension 2"
)
return
return [
get_data(proj) if isinstance(proj, DataUrl) else proj for proj in projs
]
return [
self._frame_flat_field_correction(
data=frame,
dark=dark,
index_proj=proj_i,
flat_weights=self._flats_weights[proj_i],
flat_weights=self._flats_weights[proj_i]
if proj_i in self._flats_weights
else None,
)
for frame, proj_i in zip(projs, proj_indexes)
]
......
Markdown is supported
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