From 0db1284a744aaa5de30d79a9955f544417836d3b Mon Sep 17 00:00:00 2001 From: thorstenwagner Date: Tue, 19 Dec 2023 16:16:18 +0100 Subject: [PATCH] apply shown mask also to features --- src/box_manager/io/io_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/box_manager/io/io_utils.py b/src/box_manager/io/io_utils.py index 31fe1cf..1c73631 100644 --- a/src/box_manager/io/io_utils.py +++ b/src/box_manager/io/io_utils.py @@ -477,6 +477,7 @@ def _write_particle_data( mask = np.ones(len(data), dtype=int) == 1 coordinates = data[mask] + features = meta["features"].loc[mask, :] if "size" in meta: boxsize = meta["size"][mask] @@ -513,7 +514,7 @@ def _write_particle_data( d = format_func( coordinates=coordinates[mask, 1:], box_size=boxsize[mask], - features=meta["features"].loc[mask, :], + features=features.loc[mask, :], metadata=meta["metadata"], filament_spacing=filament_spacing, ) @@ -542,7 +543,7 @@ def _write_particle_data( format_func( coordinates=coordinates, box_size=boxsize, - features=meta["features"].loc[mask, :], + features=features.loc[mask, :], metadata=meta["metadata"], filament_spacing=filament_spacing, ),