Skip to content
Snippets Groups Projects
Commit e9eb7a07 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Merge branch 'fix/lpd-mem-cells-missing-mod' into 'master'

[LPD] [Correct] Ignore missing sources when finding memory cell patterns

See merge request !1114
parents b69bde07 74a72920
No related branches found
No related tags found
1 merge request!1114[LPD] [Correct] Ignore missing sources when finding memory cell patterns
......@@ -4,7 +4,7 @@ from typing import Optional
from warnings import warn
import numpy as np
from extra_data import RunDirectory
from extra_data import RunDirectory, SourceNameError
def get_mem_cell_pattern(run, sources) -> np.ndarray:
......@@ -15,7 +15,11 @@ def get_mem_cell_pattern(run, sources) -> np.ndarray:
"""
patterns = []
for source in sources:
cell_id_data = run[source, 'image.cellId'].drop_empty_trains()
try:
cell_id_data = run[source, 'image.cellId'].drop_empty_trains()
except SourceNameError:
continue # Source missing
if len(cell_id_data.train_ids) == 0:
continue # No data for this module
cell_ids = cell_id_data[0].ndarray().flatten()
......
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