From af098769baccda2801f1bdc51fe200b080865fb7 Mon Sep 17 00:00:00 2001 From: Ethan Blackwood Date: Wed, 12 Jun 2024 21:54:25 -0400 Subject: [PATCH] Make movie.removeBL work with 3D movies --- caiman/base/movies.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/caiman/base/movies.py b/caiman/base/movies.py index 9f44dac43..1dd85551a 100644 --- a/caiman/base/movies.py +++ b/caiman/base/movies.py @@ -552,15 +552,15 @@ def removeBL(self, windowSize:int=100, quantilMin:int=8, in_place:bool=False, re def to2DPixelxTime(self, order='F'): """ - Transform 3D movie into 2D + Transform 3D or 4D movie into 2D """ - return self.transpose([2,1,0]).reshape((-1,self.shape[0]),order=order) + return self.transpose().reshape((-1,self.shape[0]),order=order) def to3DFromPixelxTime(self, shape, order='F'): """ - Transform 2D movie into 3D + Transform 2D movie into 3D or 4D """ - return to_3D(self,shape[::-1],order=order).transpose([2,1,0]) + return to_3D(self,shape[::-1],order=order).transpose() def computeDFF(self, secsWindow: int = 5, quantilMin: int = 8, method: str = 'only_baseline', in_place: bool = False, order: str = 'F') -> tuple[Any, Any]: