Skip to content

Commit

Permalink
fix: also filter if root ids = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dlbrittain authored and fcollman committed Aug 16, 2023
1 parent 38051ce commit 49dae2d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions materializationengine/workflows/ingest_new_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def process_new_annotations_workflow(
def ingest_table_svids(
self, datastack_info: dict, table_name: str, annotation_ids: list = None
):

mat_info = get_materialization_info(
datastack_info=datastack_info,
materialization_time_stamp=None,
Expand Down Expand Up @@ -697,8 +696,10 @@ def get_new_root_ids(materialization_data: dict, mat_metadata: dict) -> dict:

cg_client = chunkedgraph_cache.init_pcg(pcg_table_name)

# filter missing root_ids and lookup root_ids if missing
mask = np.logical_and.reduce([root_ids_df[col].isna() for col in cols])
# filter missing root_ids and lookup root_ids if missing or zero
mask = np.logical_and.reduce(
[(root_ids_df[col].isna() | (root_ids_df[col] == 0)) for col in cols]
)
missing_root_rows = root_ids_df.loc[mask]
if not missing_root_rows.empty:
supervoxel_data = missing_root_rows.loc[:, supervoxel_col_names]
Expand Down

0 comments on commit 49dae2d

Please sign in to comment.