Skip to content

Commit

Permalink
When remapping only add the metadata fields if the user specified them
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Jan 6, 2022
1 parent ba3d08d commit d4422c3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions ark/mibi/tiling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,10 +1105,14 @@ def remap_and_reorder_tiles(tiled_regions_proposed, proposed_to_auto_map,
# define a new tiled regions proposed dict
tiled_regions_remapped = {}

# copy over the basic metadata
tiled_regions_remapped['id'] = tiled_regions_proposed['id']
tiled_regions_remapped['name'] = tiled_regions_proposed['name']
tiled_regions_remapped['status'] = tiled_regions_proposed['status']
# if the user specifies additional metadata, make sure they're copied over
# specifically, id, name, and status
if 'id' in tiled_regions_proposed:
tiled_regions_remapped['id'] = tiled_regions_proposed['id']
if 'name' in tiled_regions_proposed:
tiled_regions_remapped['name'] = tiled_regions_proposed['name']
if 'status' in tiled_regions_proposed:
tiled_regions_remapped['status'] = tiled_regions_proposed['status']

# define a new FOVs list for tiled_regions_remapped
tiled_regions_remapped['fovs'] = []
Expand Down

0 comments on commit d4422c3

Please sign in to comment.