From 8e70dd1aa66da5dc700e2bec4080645e150ab180 Mon Sep 17 00:00:00 2001 From: Atika-Syeda <47366160+Atika-Syeda@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:47:53 -0400 Subject: [PATCH 1/2] Fix motion bug --- facemap/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facemap/process.py b/facemap/process.py index 755864f..8981706 100644 --- a/facemap/process.py +++ b/facemap/process.py @@ -454,7 +454,7 @@ def process_ROIs( if movSVD: # use raw frames for movSVD imbin_mov = imbin[1:, :] if fullSVD: - M[t : t + imbin_mot.shape[0]] += imbin_mot.sum(axis=(-2, -1)) + M[0][t : t + imbin_mot.shape[0]] += imbin_mot.sum(axis=-1) if motSVD: imall_mot[:, ir[ii]] = imbin_mot - avgmotion[ii].flatten() if movSVD: From aa9e2345499b24490b7de60ca39e9f03b79c5404 Mon Sep 17 00:00:00 2001 From: Atika-Syeda Date: Fri, 27 Oct 2023 17:22:05 -0400 Subject: [PATCH 2/2] Fix savepath bug/issue --- facemap/gui/gui.py | 11 ----------- facemap/gui/ops_user.npy | Bin 396 -> 401 bytes facemap/process.py | 2 +- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/facemap/gui/gui.py b/facemap/gui/gui.py index 5981d87..2dce18e 100644 --- a/facemap/gui/gui.py +++ b/facemap/gui/gui.py @@ -583,16 +583,6 @@ def make_buttons(self): self.show_batch_button.setFont(QFont("Arial", 10, QFont.Bold)) self.show_batch_button.clicked.connect(self.show_batch) self.labels_groupbox.layout().addWidget(self.show_batch_button, 0, 2) - """ - self.batchname = [] - # TODO: Change batchname to be displayed in a pop-up message box that lists the filenames!! - for k in range(1): - self.batchname.append(QLabel("")) - self.batchname[-1].setStyleSheet("color: white;") - self.batchname[-1].setAlignment(QtCore.Qt.AlignCenter) - self.labels_groupbox.layout().addWidget(self.batchname[-1], k + 1, 0, 1, 2) - # self.scene_grid_layout.addWidget(self.batchname[-1], 6 + k, 0, 1, 4) - """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Video playback options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ self.current_frame_lineedit = QLineEdit() @@ -1239,7 +1229,6 @@ def save_ROIs(self): self.batchlist.append(savename) _, filename = os.path.split(savename) filename, _ = os.path.splitext(filename) - self.batchname[len(self.batchlist) - 1].setText(filename) self.processbatch.setEnabled(True) def process_batch(self): diff --git a/facemap/gui/ops_user.npy b/facemap/gui/ops_user.npy index c538d1f42153e1e23dfb5ed7dd22779efc4c7e54..fb89223221678c6b8420869027741d5c6909b498 100755 GIT binary patch delta 40 vcmeBSp2)nxhfzk7fq_9kBR@A)zqq6*GcP?SF-hMgzdSD|KQU!;GNUE{@4^hK delta 35 qcmbQp+{3)Vhf!RFfq_9kv^ce>SiiV3H6<}o-#5Q3Gj(zXqb2~aH429S diff --git a/facemap/process.py b/facemap/process.py index 8981706..af8a850 100644 --- a/facemap/process.py +++ b/facemap/process.py @@ -703,7 +703,7 @@ def run( rois = proc["rois"] sy = proc["sy"] sx = proc["sx"] - savepath = proc["savepath"] if savepath is not None else savepath + savepath = proc["savepath"] if savepath is None else savepath #proc["savepath"] if savepath is not None else savepath Lybin, Lxbin, iinds = binned_inds(Ly, Lx, sbin) LYbin, LXbin, sybin, sxbin = utils.video_placement(Lybin, Lxbin)