Skip to content

Commit 3c58470

Browse files
carsen-stringernickdelgrossochriski777
authored
Dev (#359)
* install current version of suite2p * moved everything to environment.yml * added lockfile * added travis and test that imports work * added pytest, requirements_dev, and travis config file * moved to a duplicated environment.yml to simplify usage * fixed travis * rebuilt docs * Added suite2p import in extract.py to fix suite2p not definted error in line 200. * Add test_pipeline.py which contains several common use cases and fixture for setup/teardown.Add testcases that compare and check F, Fneu, iscell, and spks. * Remove print statements from test_pipeline and use np.array_equal to avoid edge cases. * Replaced numpy comparisons with filecmp. Now comparing stat.npy and data.bins in tests. * updated installation instructions in docs * changed suite2p import to relative for self-consistency and added numba caching for performance * deleting docs * deleted build docs * added readthedocs config file * test conda env * added rtd badge * try using general environment * readthedocs not detecting the mixed dependency sources * test whether rtd workds without pytest and suite2p in environment.yml * added docs env * removed mkl and pyqt from doc deps * removed conda from rtd build * removed all non-sphinx requirements from rtd build * added pyqt5 to rtd reqs * added pyqtgraph to rtd reqs * integrated build pathways * fixed travis * fixing rtd * fixing classifiers * change build method with docs * moved docs/requirements to setup.py * added gui deps to extras_require * removed unused mkl_fft imports * update setuptools in travis for p37 * get more debug info for installer version * removed pyc files to solve setuptools marchall bug * more-specific python version to avoid pyc bug * set zip_safe to try and resolve marshall bug * remove pyc * update pycparser * trying zip_safe True * changed scanimage version * remove unnecessary solutions * changed mkl_fft importerror to warning to support rtd docs * fixed error type * fixed error type * stopped raising warnings * have rtd get pyqt5 * added notes on necessary dependencies, cleaned up warnings. * Clean install: travis & rtd compatibility, conda and pypi integration (#343) * use bash instead of executable * remove windows, because not supported * new conda setup setps * try again * sudo everywhere * sudo everywhere * nosudo * debug path * switched to environment variable * added readthedocs config file * test conda env * added rtd badge * try using general environment * readthedocs not detecting the mixed dependency sources * fixed miniconda path * changed activate command * changed activate command * changed activate command * run single test * added install command * added dev environment * added dev environment * removed extraneous steps * run all tests * added badge * environment doesn't install suite2p * changed badge to match dev docs * Removed unnecessary imports. Added download_url_to_file function from cellpose. * Made changes to download test_data from suite2p link to .suite2p directory. Using pathlib.Path instead of os.path. Modified test functions to compare to downloaded cache test_files. * Replaced filecmp with np allclose due to small differences between npy files across OSes. * Modified atol and rtol parameters to get np.allclose to work * Circimports (#350) * removed unused imports * added dependency chart generation graph * removed cross-module nested imports * simplified subpackage inits * removed unused io imports * removed last of parent's subpacke introspection * renamed save/write files to enable package-level usage * removed built files from version control * removed inline subpackage importing from run_s2p * remvobed subpackage introspection * removed subpackage utils from external interface * corrected import location * removed subpackage import from __main__ * moved circle() and boundary() to gui.utils * organized package-level imports * moved enhanced_mean_image() * ran optimize-imports linting refactor * moved function * moved unused resample_frames() to utils.py * removed circular import between gui.classgui and gui.masks * moved function to registration.utils * moved roi_stats() to extract.py * moved functions to utils * merged reference and register * moved utils function into using module * moved sample_means and related functions back into registration.utils * add cycle graph script * expose pick_initial_reference() * removed dependency of sourcery on sparsedetect. * merged detection and extraction submodules, removed utils.py * bugfix: fixed imports * Merge branch 'dev' of D:\ProgrammingProjects\suite2p with conflicts. * fixed default_ops() import * added tqdm to test requirements * fixed imports from package refactor commit * Docsmerge (#352) * chenged pick_init() to pick_initial_reference() * moved in wiki cell detection tutorial page Co-authored-by: Nicholas A. Del Grosso <[email protected]> Co-authored-by: Chris <[email protected]>
1 parent 77f3600 commit 3c58470

File tree

211 files changed

+1486
-29500
lines changed

Some content is hidden

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

211 files changed

+1486
-29500
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ $RECYCLE.BIN/
1616
# Windows shortcuts
1717
*.lnk
1818

19+
# builds
20+
.eggs
21+
1922
# python and jupyter
2023
jupyter/.ipynb_checkpoints/
2124
jupyter/__pycache__/
@@ -41,6 +44,12 @@ doctrees/
4144
.AppleDouble
4245
.LSOverride
4346

47+
# visual studio code
48+
.vscode
49+
50+
# pycharm
51+
.idea
52+
4453
# Thumbnails
4554
._*
4655

.readthedocs.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Build documentation in the docs/ directory with Sphinx
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
# Build documentation with MkDocs
12+
#mkdocs:
13+
# configuration: mkdocs.yml
14+
15+
# Optionally build your docs in additional formats such as PDF
16+
formats:
17+
- pdf
18+
19+
# specify dependencies
20+
python:
21+
version: 3.7
22+
install:
23+
- method: pip
24+
path: .
25+
extra_requirements:
26+
- docs
27+
- gui

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: python
2+
os:
3+
- linux
4+
python:
5+
- '3.7'
6+
before_install:
7+
# Example from https://github.com/astrofrog/example-travis-conda/
8+
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
9+
- bash ./miniconda.sh -b
10+
- export PATH=~/miniconda3/bin:$PATH
11+
- conda update --yes conda
12+
install:
13+
- conda env create -f environment.yml
14+
- source activate suite2p
15+
- python setup.py install
16+
script:
17+
- python setup.py test
18+
19+

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ include suite2p/ops/ops_user.npy
88
include suite2p/ops/ops_1P.npy
99
include README.md
1010
include LICENSE
11+
recursive-exclude * __pycache__

README.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# suite2p <img src="suite2p/logo/logo_unshaded.png" width="250" title="sweet two pea" alt="sweet two pea" align="right" vspace = "50">
22

3+
[![Documentation Status](https://readthedocs.org/projects/suite2p/badge/?version=dev)](https://suite2p.readthedocs.io/en/dev/?badge=dev)
4+
5+
[![Build Status](https://travis-ci.org/Mouseland/suite2p.svg?branch=dev)](https://travis-ci.org/Mouseland/suite2p)
6+
37
Pipeline for processing two-photon calcium imaging data.
48
Copyright (C) 2018 Howard Hughes Medical Institute Janelia Research Campus
59

@@ -28,43 +32,33 @@ Install an [Anaconda](https://www.anaconda.com/download/) distribution of Python
2832
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.
2933
2. Open an anaconda prompt / command prompt with `conda` for **python 3** in the path
3034
3. Change directories to where the `environment.yml` is and run `conda env create -f environment.yml`
31-
4. To activate this new environment, run `conda activate suite2p`
32-
5. You should see `(suite2p)` on the left side of the terminal line. Now run `pip install suite2p --upgrade`.
35+
4. Pip install suite2p into the environment: `pip install suite2p`
3336
6. Now run `python -m suite2p` and you're all set.
3437

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

3740
Note you will always have to run **conda activate suite2p** before you run suite2p. Conda ensures mkl_fft and numba run correctly and quickly on your machine. If you want to run jupyter notebooks in this environment, then also `conda install jupyter`.
3841

39-
To upgrade suite2p (package [here](https://pypi.org/project/suite2p/)), run the following in the environment:
42+
To **upgrade** the suite2p (package [here](https://pypi.org/project/suite2p/)), run the following in the environment:
4043
~~~~
41-
pip install suite2p --upgrade
44+
pip install git+https://github.com/MouseLand/suite2p
4245
~~~~
4346

44-
**Common issues**
45-
46-
If when running `python -m suite2p`, you receive the error: `No module named PyQt5.sip`, then try uninstalling and reinstalling pyqt5
47-
~~~~
48-
pip uninstall pyqt5 pyqt5-tools
49-
pip install pyqt5 pyqt5-tools pyqt5.sip
50-
~~~~
5147

52-
If when running `python -m suite2p`, you receive an error associated with **matplotlib**, try upgrading it:
53-
~~~~
54-
pip install matplotlib --upgrade
55-
~~~~
48+
**Common issues**
5649

5750
If you are on Yosemite Mac OS, PyQt doesn't work, and you won't be able to install suite2p. More recent versions of Mac OS are fine.
5851

5952
The software has been heavily tested on Windows 10 and Ubuntu 18.04, and less well tested on Mac OS. Please post an issue if you have installation problems. The registration step runs faster on Ubuntu than Windows, so if you have a choice we recommend using the Ubuntu OS.
6053

61-
## Installation of github version for developers and super-users :)
54+
## Installation of github version for developers
6255

6356
1. Clone the repository and `cd suite2p` in an anaconda prompt / command prompt with `conda` for **python 3** in the path
6457
2. Run `conda env create -f environment.yml`
6558
3. To activate this new environment, run `conda activate suite2p` (you will have to activate every time you want to run suite2p)
66-
4. You should see `(suite2p)` on the left side of the terminal line. Now run `pip install -e .` to install the code in the github repository.
67-
5. Run `python -m suite2p` (<-- you can run this command from anywhere now. If you want to go back to the supported version of suite2p, then say `pip install suite2p` and that will grab the pip package of suite2p)
59+
4. Install the local version of suite2p into this environment in develop mode: `python setup.py develop`
60+
5. Run tests: `python setup.py test`
61+
6862

6963
## Examples
7064

docs/FAQ.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Frequently Asked Questions
2-
--------------
2+
--------------------------
33

44
Cropped field-of-view
5-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
~~~~~~~~~~~~~~~~~~~~~
66

77
Some issues on this: `#273 <https://github.com/MouseLand/suite2p/issues/273>`_,
88
`#207 <https://github.com/MouseLand/suite2p/issues/207>`_,
@@ -29,7 +29,7 @@ See this page :ref:`inputs`
2929
for more info.
3030

3131
Deconvolution means what?
32-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
~~~~~~~~~~~~~~~~~~~~~~~~~
3333

3434
There is a lot of misinformation about what deconvolution is and what it isn't. Some issues on this:
3535
`#267 <https://github.com/MouseLand/suite2p/issues/267>`_,
@@ -83,14 +83,14 @@ know of many papers that make such statements.
8383

8484

8585
Multiple functional channels
86-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8787

8888
If you have two channels and they both have functional activity, then to
8989
process both you need to run suite2p in a jupyter notebook. Here is an example
9090
notebook for that purpose: `multiple_functional_channels.ipynb <https://github.com/MouseLand/suite2p/blob/master/jupyter/multiple_functional_channels.ipynb>`_
9191

9292
Z-drift
93-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93+
~~~~~~~
9494

9595
It's not frequently asked about but it should be :)
9696

0 commit comments

Comments
 (0)