Skip to content
Snippets Groups Projects
Commit 39e35fea authored by David Hammer's avatar David Hammer
Browse files

Use cell table rather than image data to guess number of cells

parent 73ef58df
No related branches found
No related tags found
1 merge request!12Snapshot: field test deployed version as of end of run 202201
...@@ -974,19 +974,13 @@ class BaseCorrection(PythonDevice): ...@@ -974,19 +974,13 @@ class BaseCorrection(PythonDevice):
correction_cell_num = self._schema_cache["constantParameters.memoryCells"] correction_cell_num = self._schema_cache["constantParameters.memoryCells"]
cell_table_max = np.max(cell_table) cell_table_max = np.max(cell_table)
if cell_table_max >= correction_cell_num:
self.log_status_info(
f"Max cell ID ({cell_table_max}) exceeds range for loaded "
f"constants ({correction_cell_num} cells). Some frames will not be "
"corrected."
)
image_data = data_hash.get(self._image_data_path) image_data = data_hash.get(self._image_data_path)
if image_data.shape[0] != self._schema_cache["dataFormat.memoryCells"]: if cell_table.size != self._schema_cache["dataFormat.memoryCells"]:
self.log_status_info( self.log_status_info(
f"Updating new input shape {image_data.shape}, updating buffers" f"Updating new input shape {image_data.shape}, updating buffers"
) )
self.set("dataFormat.memoryCells", image_data.shape[0]) self.set("dataFormat.memoryCells", cell_table.size)
with self._buffer_lock: with self._buffer_lock:
self._update_frame_filter() self._update_frame_filter()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment