Skip to content

Commit

Permalink
Merge pull request #17 from nel-lab/fix-add-background
Browse files Browse the repository at this point in the history
fix #15
  • Loading branch information
kushalkolar committed May 21, 2022
2 parents 5e06ce7 + 8e11d2b commit 57746c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesmerize_core/caiman_extensions/cnmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def get_spatial_contour_coors(self, ixs_components: np.ndarray) -> List[np.ndarr
return coordinates

@validate('cnmf')
def get_temporal_components(self, ixs_components: np.ndarray = None, add_background: bool = True) -> np.ndarray:
def get_temporal_components(self, ixs_components: np.ndarray = None, add_background: bool = False) -> np.ndarray:
"""
Get the temporal components for this CNMF item
Expand Down Expand Up @@ -231,4 +231,4 @@ def get_reconstructed_movie(self, ixs_frames: Tuple[int, int] = None, add_backgr

if add_background:
dn += (cnmf_obj.estimates.b.dot(cnmf_obj.estimates.f[:, ixs_frames[0]:ixs_frames[1]]))
return dn.reshape(cnmf_obj.dims + (-1,), order='F').transpose([2, 0, 1])
return dn.reshape(cnmf_obj.dims + (-1,), order='F').transpose([2, 0, 1])

0 comments on commit 57746c4

Please sign in to comment.