From b5a036ffff620ed7d2cfcf922f6e0155393ece0d Mon Sep 17 00:00:00 2001 From: David Stirling Date: Fri, 29 Nov 2024 13:44:02 +0000 Subject: [PATCH] Clarify comments, check for modern NGFF metadata first --- cellprofiler_core/utilities/zarr.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cellprofiler_core/utilities/zarr.py b/cellprofiler_core/utilities/zarr.py index e4cef62..ff4be9e 100644 --- a/cellprofiler_core/utilities/zarr.py +++ b/cellprofiler_core/utilities/zarr.py @@ -208,14 +208,14 @@ def map_wells(self): # Empty well data for some reason return False mapper = {} - if 'column_index' in well_data[0]: - # v0.2 format - for row in well_data: - mapper[(str(row['column_index']), str(row['row_index']))] = row['path'] - elif "columnIndex" in well_data[0]: - # v0.4 format + if "columnIndex" in well_data[0]: + # NGFF v0.4 format for row in well_data: mapper[(str(row['columnIndex']), str(row['rowIndex']))] = row['path'] + elif 'column_index' in well_data[0]: + # Older bioformats2raw format + for row in well_data: + mapper[(str(row['column_index']), str(row['row_index']))] = row['path'] else: for row in well_data: path = row['path']