Skip to content

Commit

Permalink
Merge branch 'SpikeInterface:main' into more-sphinx-docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishalcrow authored Aug 13, 2024
2 parents 2307c9b + 9d6ad5b commit c3f0f75
Show file tree
Hide file tree
Showing 20 changed files with 184 additions and 158 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
files: ^src/
58 changes: 35 additions & 23 deletions doc/modules/postprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ For dense waveforms, sparsity can also be passed as an argument.

.. code-block:: python
pc = sorting_analyzer.compute(input="principal_components",
n_components=3,
mode="by_channel_local")
pc = sorting_analyzer.compute(
input="principal_components",
n_components=3,
mode="by_channel_local"
)
For more information, see :py:func:`~spikeinterface.postprocessing.compute_principal_components`

Expand Down Expand Up @@ -243,9 +245,7 @@ each spike.

.. code-block:: python
amplitudes = sorting_analyzer.compute(input="spike_amplitudes",
peak_sign="neg",
outputs="concatenated")
amplitudes = sorting_analyzer.compute(input="spike_amplitudes", peak_sign="neg")
For more information, see :py:func:`~spikeinterface.postprocessing.compute_spike_amplitudes`

Expand All @@ -263,15 +263,17 @@ with center of mass (:code:`method="center_of_mass"` - fast, but less accurate),

.. code-block:: python
spike_locations = sorting_analyzer.compute(input="spike_locations",
ms_before=0.5,
ms_after=0.5,
spike_retriever_kwargs=dict(
channel_from_template=True,
radius_um=50,
peak_sign="neg"
),
method="center_of_mass")
spike_locations = sorting_analyzer.compute(
input="spike_locations",
ms_before=0.5,
ms_after=0.5,
spike_retriever_kwargs=dict(
channel_from_template=True,
radius_um=50,
peak_sign="neg"
),
method="center_of_mass"
)
For more information, see :py:func:`~spikeinterface.postprocessing.compute_spike_locations`
Expand Down Expand Up @@ -329,6 +331,12 @@ Optionally, the following multi-channel metrics can be computed by setting:
Visualization of template metrics. Image from `ecephys_spike_sorting <https://github.com/AllenInstitute/ecephys_spike_sorting/tree/v0.2/ecephys_spike_sorting/modules/mean_waveforms>`_
from the Allen Institute.


.. code-block:: python
tm = sorting_analyzer.compute(input="template_metrics", include_multi_channel_metrics=True)
For more information, see :py:func:`~spikeinterface.postprocessing.compute_template_metrics`


Expand All @@ -340,10 +348,12 @@ with shape (num_units, num_units, num_bins) with all correlograms for each pair

.. code-block:: python
ccg = sorting_analyzer.compute(input="correlograms",
window_ms=50.0,
bin_ms=1.0,
method="auto")
ccg = sorting_analyzer.compute(
input="correlograms",
window_ms=50.0,
bin_ms=1.0,
method="auto"
)
For more information, see :py:func:`~spikeinterface.postprocessing.compute_correlograms`

Expand All @@ -357,10 +367,12 @@ This extension computes the histograms of inter-spike-intervals. The computed ou

.. code-block:: python
isi = sorting_analyer.compute(input="isi_histograms"
window_ms=50.0,
bin_ms=1.0,
method="auto")
isi = sorting_analyer.compute(
input="isi_histograms"
window_ms=50.0,
bin_ms=1.0,
method="auto"
)
For more information, see :py:func:`~spikeinterface.postprocessing.compute_isi_histograms`

Expand Down
2 changes: 1 addition & 1 deletion doc/modules/qualitymetrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This code snippet shows how to compute quality metrics (with or without principa
# with PCs (depends on "pca" in addition to the above metrics)
qm_ext = sorting_analyzer.compute(input={"pca": dict(n_components=5, mode="by_channel_local"),
qm_ext = sorting_analyzer.compute(input={"principal_components": dict(n_components=5, mode="by_channel_local"),
"quality_metrics": dict(skip_pc_metrics=False)})
metrics = qm_ext.get_data()
assert 'isolation_distance' in metrics.columns
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "spikeinterface"
version = "0.101.0"
version = "0.101.1"
authors = [
{ name="Alessio Buccino", email="[email protected]" },
{ name="Samuel Garcia", email="[email protected]" },
Expand Down Expand Up @@ -125,16 +125,16 @@ test_core = [

# for github test : probeinterface and neo from master
# for release we need pypi, so this need to be commented
# "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
# "neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
"probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
"neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
]

test_extractors = [
# Functions to download data in neo test suite
"pooch>=1.8.2",
"datalad>=1.0.2",
# "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
# "neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
"probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
"neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
]

test_preprocessing = [
Expand Down Expand Up @@ -175,8 +175,8 @@ test = [

# for github test : probeinterface and neo from master
# for release we need pypi, so this need to be commented
# "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
# "neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
"probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
"neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
]

docs = [
Expand All @@ -199,8 +199,8 @@ docs = [
"datalad>=1.0.2",

# for release we need pypi, so this needs to be commented
# "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version
# "neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version
"probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git", # We always build from the latest version
"neo @ git+https://github.com/NeuralEnsemble/python-neo.git", # We always build from the latest version

]

Expand Down
4 changes: 2 additions & 2 deletions src/spikeinterface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
# This flag must be set to False for release
# This avoids using versioning that contains ".dev0" (and this is a better choice)
# This is mainly useful when using run_sorter in a container and spikeinterface install
# DEV_MODE = True
DEV_MODE = False
DEV_MODE = True
# DEV_MODE = False
4 changes: 2 additions & 2 deletions src/spikeinterface/comparison/basecomparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def compute_subgraphs(self):
Computes subgraphs of connected components.
Returns
-------
sg_object_names: list
sg_object_names : list
List of sorter names for each node in the connected component subgraph
sg_units: list
sg_units : list
List of unit ids for each node in the connected component subgraph
"""
if self.clean_graph is not None:
Expand Down
Loading

0 comments on commit c3f0f75

Please sign in to comment.