Skip to content

Commit 1bf92c1

Browse files
Merge branch 'dev'
2 parents 58c9036 + 6f276f2 commit 1bf92c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1982
-1334
lines changed

.travis.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
language: python
2+
dist: xenial
3+
services:
4+
- xvfb
25
jobs:
36
include:
47
- name: Python 3.7.1 on Linux
@@ -19,12 +22,25 @@ jobs:
1922
- bash ./miniconda.sh -b
2023
- export PATH=~/miniconda3/bin:$PATH
2124
- conda update --yes conda
25+
- name: Python 3.7.7 on Windows
26+
os: windows
27+
language: shell
28+
before_install:
29+
- choco install python --version 3.7.7
30+
- export MINICONDA=/c/miniconda
31+
- MINICONDA_WIN=$(cygpath --windows $MINICONDA)
32+
- choco install openssl.light
33+
- choco install miniconda3 --params="'/AddToPath:0 /D:$MINICONDA_WIN'"
34+
- PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/bin||')
35+
- PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin||')
36+
- source $MINICONDA/Scripts/activate
37+
- source $MINICONDA/etc/profile.d/conda.sh
2238
allow_failures:
2339
- os: osx
2440
install:
2541
- conda env create -f environment.yml
2642
- source activate suite2p
27-
- pip install .[data]
43+
- pip install .[data,nwb]
2844
- dvc pull -r gdrive-travis
2945
- pip install coveralls
3046
script:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ Install an [Anaconda](https://www.anaconda.com/download/) distribution of Python
3434
1. Download the [`environment.yml`](https://github.com/MouseLand/suite2p/blob/master/environment.yml) file from the repository. You can do this by cloning the repository, or copy-pasting the text from the file into a text document on your local computer.
3535
2. Open an anaconda prompt / command prompt with `conda` for **python 3** in the path
3636
3. Change directories to where the `environment.yml` is and run `conda env create -f environment.yml`
37-
4. Activate the environment with `conda activate suite2p'
37+
4. Activate the environment with `conda activate suite2p`
3838
5. Pip install suite2p into the environment: `pip install suite2p`
3939
6. Now run `suite2p` and you're all set.
40+
7. Running the command `suite2p --version` in the terminal will print the install version of suite2p.
4041

4142
If you have an older `suite2p` environment you can remove it with `conda env remove -n suite2p` before creating a new one.
4243

data/test_data.dvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
outs:
2-
- md5: 484b58990efd6929863cd77108f68ab0.dir
2+
- md5: 273c132e8b2d31901a45c70188e68535.dir
33
path: test_data

docs/deconvolution.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,17 @@ run your own data separately if you want):
3232
Fc = F - ops['neucoeff'] * Fneu
3333

3434
# baseline operation
35-
Fc = dcnv.preprocess(Fc, ops)
35+
Fc = dcnv.preprocess(
36+
F=Fc,
37+
baseline=ops['baseline'],
38+
win_baseline=ops['win_baseline'],
39+
sig_baseline=ops['sig_baseline'],
40+
fs=ops['fs'],
41+
prctile_baseline=ops['prctile_baseline']
42+
)
3643

3744
# get spikes
38-
spks = dcnv.oasis(Fc, ops)
45+
spks = dcnv.oasis(F=Fc, batch_size=ops['batch_size'], tau=ops['tau'], fs=ops['fs'])
3946

4047
.. _OASIS paper: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005423
4148
.. _paper: http://www.jneurosci.org/content/38/37/7976

docs/developer_doc.rst

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
11
Developer Documentation
22
---------------------------
33

4+
Versioning
5+
~~~~~~~~~~~~~~~~~~~~~
6+
There's a rare issue that developers may face when calling `suite2p --version` on their command line. You
7+
may get an incorrect version number. To fix this issue, one should use the following command:
8+
9+
.. prompt:: bash
10+
11+
git fetch --prune --unshallow
12+
13+
414
Testing
515
~~~~~~~~~~~~~~~~~~~~~
616

7-
Before contributing to Suite2P, please make sure your changes pass all our tests. To run the tests (located in
17+
Before contributing to Suite2P, please make sure your changes pass all our tests.
18+
19+
Downloading Test Data
20+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21+
22+
To run the tests (located in
823
the ``tests`` subdirectory of your working ``suite2p`` directory) , you'll first need to download our test data.
924
Suite2p depends on `dvc`_ to download the test data.
1025

1126
.. note::
1227

13-
Before testing, make sure you have dvc installed:
28+
Before testing, make sure you have dvc and pydrive2 installed. Navigate to the suite2p
29+
directory and use the following command to install both dvc and pydrive2.
1430

1531
.. prompt:: bash
1632

17-
pip install dvc
18-
The command above may prompt you to install ``pydrive2``. Install it and you should be good to go.
33+
pip install -e .[data]
34+
35+
zsh users should use the following:
1936

2037
.. prompt:: bash
2138

22-
pip install pydrive2
39+
pip install -e .\[docs\]
2340

2441

2542
Use to following command to download the test data into the ``data`` subdirectory of your working ``suite2p`` directory.
@@ -28,6 +45,9 @@ Use to following command to download the test data into the ``data`` subdirector
2845

2946
dvc pull
3047

48+
Running the tests
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
3151
Tests can then be easily run with the following command:
3252

3353
.. prompt:: bash

docs/registration.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ To run the script, use the following command:
209209

210210
reg_metrics <INSERT_OPS_DATA_PATH> # Add --tiff_list <INSERT_INPUT_TIF_FILENAME_HERE>.tif to select a subset of tifs
211211

212-
Once you run the ``reg_metrics`` command, registration will be performed for the input file and
213-
an output similar to the following will be shown:
212+
Once you run the ``reg_metrics`` command, registration will be performed for the input file with default
213+
ops parameters and an output similar to the following will be shown:
214214

215215
::
216216

@@ -224,6 +224,14 @@ For each ``nplane``, these statistics (Average and Max) are calculated across PC
224224
If the registration works perfectly and most of the motion is removed from the registered dataset, these scores
225225
should all be very close to zero.
226226

227+
.. Important::
228+
229+
Make sure to also inspect the registered video to check the quality of registration. You can see an example
230+
of how this is done in the GUI `here <https://youtu.be/M7UjvCUn74Y?t=810>`_.
231+
232+
You may notice that upon visual inspection, the registered video may look fine/contain little motion even
233+
if the statistics are not close to zero. You should always visually check the registration output and prioritize
234+
what your eyes say over what the CLI script reports.
227235

228236
.. note::
229237

docs/settings.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ Output settings
6565
to um/pixels in Y (ONLY for correct aspect ratio in GUI, not used for
6666
other processing)
6767

68+
- **report_time**: (*bool, default: True) (**new**) whether or not to return
69+
a timing dictionary for each plane. Timing dictionary will contain keys
70+
corresponding to stages and values corresponding to the duration of that stage.
71+
6872
Registration
6973
~~~~~~~~~~~~
7074

@@ -121,14 +125,14 @@ Registration
121125
spatial filtering and tapering (parameters set below), which help
122126
with 1P registration
123127

124-
- **spatial_hp**: (*int, default: 50*) window in pixels for spatial
128+
- **spatial_hp**: (*int, default: 42*) window in pixels for spatial
125129
high-pass filtering before registration
126130

127-
- **pre_smooth**: (*float, default: 2*) if > 0, defines stddev of
131+
- **pre_smooth**: (*float, default: 0*) if > 0, defines stddev of
128132
Gaussian smoothing, which is applied before spatial high-pass
129133
filtering
130134

131-
- **spatial_taper**: (*float, default: 50*) how many pixels to ignore
135+
- **spatial_taper**: (*float, default: 40*) how many pixels to ignore
132136
on edges - they are set to zero (important for vignetted windows, for
133137
FFT padding do not set BELOW 3*ops['smooth_sigma'])
134138

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ dependencies:
99
- matplotlib
1010
- scipy
1111
- h5py
12-
- scikit-image
1312
- scikit-learn
1413
- pyqt

0 commit comments

Comments
 (0)