Skip to content

Commit 3a989a2

Browse files
Merge branch 'main' of http://www.github.com/mouseland/suite2p into main
2 parents 5eacca8 + c9d925e commit 3a989a2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

docs/settings.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Registration
104104
of the gaussian used to smooth the data before phase correlation is computed.
105105
Might need this to be set to 1 or 2 for low SNR data.
106106

107-
- **keep_movie_raw**: (*bool, default: True*) whether or not to keep
107+
- **keep_movie_raw**: (*bool, default: False*) whether or not to keep
108108
the binary file of the non-registered frames. You can view the
109109
registered and non-registered binaries together in the GUI in the
110110
"View registered binaries" view if you set this to *True*.

suite2p/extraction/extract.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ def extract_traces(ops, cell_masks, neuropil_masks, reg_file):
6464

6565
cell_ipix = [cell_mask[0].astype(np.int64) for cell_mask in cell_masks]
6666
cell_lam = [cell_mask[1].astype(np.float32) for cell_mask in cell_masks]
67+
6768
if neuropil_masks is not None:
6869
if isinstance(neuropil_masks, np.ndarray) and neuropil_masks.shape[1] == Ly*Lx:
6970
neuropil_masks = [np.nonzero(neuropil_mask)[0] for neuropil_mask in neuropil_masks]
7071
else:
7172
neuropil_masks = [neuropil_mask.astype(np.int64) for neuropil_mask in neuropil_masks]
7273
neuropil_ipix = neuropil_masks
7374
neuropil_npix = np.array([len(neuropil_ipixi) for neuropil_ipixi in neuropil_ipix]).astype(np.float32)
75+
else:
76+
neuropil_ipix = None
7477

7578
ix = 0
7679
for k, (_, data) in enumerate(reg_file.iter_frames(batch_size=ops['batch_size'])):
@@ -174,7 +177,8 @@ def create_masks_and_extract(ops, stat, cell_masks=None, neuropil_masks=None):
174177
for k in range(F.shape[0]):
175178
stat[k]['skew'] = sk[k]
176179
stat[k]['std'] = sd[k]
177-
stat[k]['neuropil_mask'] = neuropil_masks[k]
180+
if not neuropil_masks is None:
181+
stat[k]['neuropil_mask'] = neuropil_masks[k]
178182

179183
return ops, stat, F, Fneu, F_chan2, Fneu_chan2
180184

suite2p/gui/io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,5 +476,6 @@ def load_again(parent, Text):
476476
tryagain = QMessageBox.question(
477477
parent, "ERROR", Text, QMessageBox.Yes | QMessageBox.No
478478
)
479+
479480
if tryagain == QMessageBox.Yes:
480-
parent.load_dialog()
481+
load_dialog(parent)

0 commit comments

Comments
 (0)