Skip to content

Commit

Permalink
Make movie.removeBL work with 3D movies
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbb committed Jun 13, 2024
1 parent e401f75 commit af09876
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions caiman/base/movies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down

0 comments on commit af09876

Please sign in to comment.