Skip to content

Commit

Permalink
Merge pull request #70 from SpikeInterface/prepare_release
Browse files Browse the repository at this point in the history
Prepare release
  • Loading branch information
alejoe91 committed Aug 28, 2020
2 parents 05eb248 + 13c97f5 commit b444445
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 54 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ os:
python:
- '3.6'
install:
- pip install matplotlib==3.2.2
- pip install -r requirements.txt
- pip install -r requirements_rtd.txt
- pip install sphinx pillow sphinx-gallery
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ python setup.py develop
**Important**: installing with `python setup.py develop` DOES NOT install the latest version of the different modules.
In order to get the latest updates, clone the above-mentioned repositories and install them from source.

## Examples

For using SpikeInterface, please checkout these [examples](https://github.com/SpikeInterface/spikeinterface/tree/master/examples).

Also, you can checkout this [tutorial](https://github.com/SpikeInterface/spiketutorials/tree/master/Spike_sorting_workshop_2019) for getting started with SpikeInterface.

## Documentation

All documentation for SpikeInterface can be found here: https://spikeinterface.readthedocs.io/en/latest/.

You can also check out this 1-hour video tutorial for the NWB User Days 2019:
https://www.youtube.com/watch?v=nWJGwFB7oII


## Citation

If you find SpikeInterface useful in your research, please cite:
Expand Down
8 changes: 6 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ With SpikeInterface, users can:
whatisnew
authors

For more informatio, please have a look at:

- The bioRxiv `preprint <https://www.biorxiv.org/content/10.1101/796599v1>`_

- 1-hour `video tutorial <https://www.youtube.com/watch?v=nWJGwFB7oII>`_, recorded for the NWB User Days (May 2020)

Please have a look at the `preprint paper <https://www.biorxiv.org/content/10.1101/796599v1>`_ for more info.

- A collection of analysis notebook `spikeinterface report <https://spikeinterface.github.io/>`_

.. Indices and tables
.. ==================
Expand Down
2 changes: 1 addition & 1 deletion doc/sorting_extractor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The contributed extractors are in the **spikeextractors/extractors** folder. You
SortingExtractor.__init__(self)
## All file specific initialization code can go here.
# If your format stores the sampling frequency, you can overweite the self._sampling_frequency. This way,
# If your format stores the sampling frequency, you can overwrite the self._sampling_frequency. This way,
# the base method self.get_sampling_frequency() will return the correct sampling frequency
self._sampling_frequency = my_sampling_frequency
Expand Down
23 changes: 11 additions & 12 deletions doc/spike_sorter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,10 @@ Then, you can start creating a new class:
'param2': 2,
}
# (optional) rewrite the params as a list for the Spikely GUI to use
_extra_gui_params = [
{'name': 'param1', 'type': 'str', 'value': None, 'default': None,
'title': "My first param"},
{'name': 'param2', 'type': 'int', 'value': 2, 'default': 2,
'title': "My second param"},
]
sorter_gui_params = copy.deepcopy(BaseSorter.sorter_gui_params)
for param in _extra_gui_params:
sorter_gui_params.append(param)
_params_description = {
'param1': 'Description for param1',
'param1': 'Description for param1',
}
installation_mesg = """
>>> pip install myspikesorter
Expand All @@ -79,12 +72,18 @@ Now you can start filling out the required methods:
def get_sorter_version():
return myspikesorter.__version__
@classmethod
def is_installed(cls):
# Fill code to check sorter installation. It returns a boolean
return HAVE_MSS
def _setup_recording(self, recording, output_folder):
# Fill code to set up the recording: convert to required file, parse config files, etc.
# The files should be placed in the 'output_folder'
def _run(self, recording, output_folder):
def _run(self, recording, output_folder):
# Fill code to run your spike sorter based on the files created in the _setup_recording()
# You can run CLI commands (e.g. klusta, spykingcircus, tridescous), pure Python code (e.g. Mountainsort4,
Expand Down
14 changes: 7 additions & 7 deletions doc/supported.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,22 @@ First, import the spikesorters package,

.. code:: python
import spikesorters as sorters
import spikesorters as ss
Then you can check the installed Sorter list,

.. code:: python
sorters.installed_sorter_list
ss.installed_sorters()
which outputs,

.. parsed-literal::
[spikesorters.klusta.klusta.KlustaSorter,
spikesorters.tridesclous.tridesclous.TridesclousSorter,
spikesorters.mountainsort4.mountainsort4.Mountainsort4Sorter,
spikesorters.spyking_circus.spyking_circus.SpykingcircusSorter,
spikesorters.herdingspikes.herdingspikes.HerdingspikesSorter]
['herdingspikes',
'klusta',
'mountainsort4',
'spykingcircus',
'tridesclous']
When trying to use an sorter that has not been installed in your environment, an installation message will appear indicating how to install the given sorter,
Expand Down
6 changes: 3 additions & 3 deletions examples/getting_started/plot_getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@
# Let's first check which sorters are implemented and which are installed

print('Available sorters', ss.available_sorters())
print('Installed sorters', ss.installed_sorter_list)
print('Installed sorters', ss.installed_sorters())

##############################################################################
# The :code:`ss.installed_sorter_list` will list the sorters installed in the machine. Each spike sorter
# is implemented as a class. We can see we have Klusta and Mountainsort4 installed.
# The :code:`ss.installed_sorters()` will list the sorters installed in the machine.
# We can see we have Klusta and Mountainsort4 installed.
# Spike sorters come with a set of parameters that users can change. The available parameters are dictionaries and
# can be accessed with:

Expand Down
1 change: 0 additions & 1 deletion examples/modules/comparison/generate_erroneous_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import matplotlib.pyplot as plt

import spikeinterface.extractors as se
import spikeinterface.sorters as sorters
import spikeinterface.comparison as sc
import spikeinterface.widgets as sw

Expand Down
6 changes: 3 additions & 3 deletions examples/modules/comparison/plot_1_compare_two_sorters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import matplotlib.pyplot as plt

import spikeinterface.extractors as se
import spikeinterface.sorters as sorters
import spikeinterface.sorters as ss
import spikeinterface.comparison as sc
import spikeinterface.widgets as sw

Expand All @@ -27,8 +27,8 @@
#############################################################################
# Then run two spike sorters and compare their ouput.

sorting_KL = sorters.run_klusta(recording)
sorting_MS4 = sorters.run_mountainsort4(recording)
sorting_KL = ss.run_klusta(recording)
sorting_MS4 = ss.run_mountainsort4(recording)


#############################################################################
Expand Down
10 changes: 5 additions & 5 deletions examples/modules/comparison/plot_2_compare_multiple_sorters.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import matplotlib.pyplot as plt

import spikeinterface.extractors as se
import spikeinterface.sorters as sorters
import spikeinterface.sorters as ss
import spikeinterface.comparison as sc
import spikeinterface.widgets as sw

Expand All @@ -26,11 +26,11 @@
recording, sorting = se.example_datasets.toy_example(num_channels=4, duration=20, seed=0)

#############################################################################
# Then run 3 spike sorters and compare their ouput.
# Then run 3 spike sorters and compare their output.

sorting_KL = sorters.run_klusta(recording)
sorting_MS4 = sorters.run_mountainsort4(recording)
sorting_TDC = sorters.run_tridesclous(recording)
sorting_KL = ss.run_klusta(recording)
sorting_MS4 = ss.run_mountainsort4(recording)
sorting_TDC = ss.run_tridesclous(recording)

#############################################################################
# Compare multiple spike sorter outputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import seaborn as sns

import spikeinterface.extractors as se
import spikeinterface.sorters as sorters
import spikeinterface.sorters as ss
import spikeinterface.comparison as sc
import spikeinterface.widgets as sw

##############################################################################

recording, sorting_true = se.example_datasets.toy_example(num_channels=4, duration=10, seed=0)

sorting_MS4 = sorters.run_mountainsort4(recording)
sorting_MS4 = ss.run_mountainsort4(recording)

##############################################################################

Expand Down Expand Up @@ -108,7 +108,7 @@
##############################################################################
# Lets do the same for klusta

sorting_KL = sorters.run_klusta(recording)
sorting_KL = ss.run_klusta(recording)
cmp_gt_KL = sc.compare_sorter_to_ground_truth(sorting_true, sorting_KL, exhaustive_gt=True)

##############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import seaborn as sns

import spikeinterface.extractors as se
import spikeinterface.sorters as sorters
import spikeinterface.sorters as ss
import spikeinterface.comparison as sc
import spikeinterface.widgets as sw

Expand Down
6 changes: 3 additions & 3 deletions examples/modules/sorters/plot_1_sorters_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
print(ss.available_sorters())

##############################################################################
# This will list the sorters installed in the machine. Each spike sorter
# is implemented in a class. To access the class names you can run:
# This will list the sorters available through SpikeInterface. To see which sorters are installed on the machine
# you can run:

print(ss.installed_sorter_list)
print(ss.installed_sorters())

##############################################################################
# Change sorter parameters
Expand Down
5 changes: 3 additions & 2 deletions examples/modules/sorters/plot_3_sorting_by_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
# (using the :code:`set_channel_property` method), or by using a probe file. In this example we will create a 16 channel
# recording and split it in four channel groups (tetrodes).
#
# Let's create a toy example with 16 channels:
# Let's create a toy example with 16 channels (the :code:`dumpable=True` dumps the extractors to a file, which is
# required for parallel sorting):

recording_tetrodes, sorting_true = se.example_datasets.toy_example(duration=10, num_channels=16)
recording_tetrodes, sorting_true = se.example_datasets.toy_example(duration=10, num_channels=16, dumpable=True)

##############################################################################
# Initially there is no group information ('location' is loaded automatically when creating toy data):
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spikeextractors>=0.8.4
spiketoolkit>=0.6.3
spikesorters>=0.3.2
spikecomparison>=0.2.6
spikewidgets>=0.4.3
spikeextractors>=0.9.1
spiketoolkit>=0.7.0
spikesorters>=0.4.2
spikecomparison>=0.3.0
spikewidgets>=0.5.0
1 change: 1 addition & 0 deletions requirements_rtd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ klustakwik2==0.2.7

# tridesclous
pyqt5
hdbscan
tridesclous==1.6.0

0 comments on commit b444445

Please sign in to comment.