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( 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: