From e38352e97283eeeb3c7f105bb85e42c197e76a9a Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Wed, 24 Jul 2024 13:04:24 -0500 Subject: [PATCH 1/2] fix: remove old tif files if `overwrite=True` --- element_interface/prairie_view_loader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/element_interface/prairie_view_loader.py b/element_interface/prairie_view_loader.py index 13b8c89..a3e9790 100644 --- a/element_interface/prairie_view_loader.py +++ b/element_interface/prairie_view_loader.py @@ -120,6 +120,9 @@ def write_single_bigtiff( if len(output_tiff_list) and not overwrite: return output_tiff_list[0] if gb_per_file is None else output_tiff_list + # delete old tif files if overwrite is True + [f.unlink() for f in output_tiff_list] + output_tiff_list = [] if self.meta["is_multipage"]: if gb_per_file is not None: From 0b3b306ca623626412d22e8f5a0252c38480b752 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Wed, 24 Jul 2024 13:47:13 -0500 Subject: [PATCH 2/2] fix: incorrect dimension ordering for single-plane caimain loading --- element_interface/caiman_loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element_interface/caiman_loader.py b/element_interface/caiman_loader.py index 18199c2..7d1e06f 100644 --- a/element_interface/caiman_loader.py +++ b/element_interface/caiman_loader.py @@ -289,7 +289,7 @@ def _get_image(self, img_type): img_ = ( pln_cm.motion_correction[img_type].transpose() if self.is3D - else pln_cm.motion_correction[img_type][...][np.newaxis, ...] + else pln_cm.motion_correction[img_type][...][..., np.newaxis] ) else: img_ = np.dstack(