Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Change ml_ms4alg to mountainsort4 #215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements_sorters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ tridesclous==1.6
# ms4
pybind11
isosplit5
ml_ms4alg==0.3.2
dask[complete]
mountainsort4

# herdingspikes
herdingspikes==0.3.7
Expand Down
12 changes: 6 additions & 6 deletions spikesorters/mountainsort4/mountainsort4.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..sorter_tools import recover_recording

try:
import ml_ms4alg
import mountainsort4

HAVE_MS4 = True
except ImportError:
Expand Down Expand Up @@ -60,7 +60,7 @@ class Mountainsort4Sorter(BaseSorter):
method and automatic curation procedures. For more information see https://doi.org/10.1016/j.neuron.2017.08.030"""

installation_mesg = """\nTo use Mountainsort4 run:\n
>>> pip install ml_ms4alg
>>> pip install mountainsort4

More information on mountainsort at:
* https://github.com/flatironinstitute/mountainsort
Expand All @@ -75,8 +75,8 @@ def is_installed(cls):

@staticmethod
def get_sorter_version():
if hasattr(ml_ms4alg, '__version__'):
return ml_ms4alg.__version__
if hasattr(mountainsort4, '__version__'):
return mountainsort4.__version__
return 'unknown'

def _setup_recording(self, recording, output_folder):
Expand Down Expand Up @@ -104,7 +104,7 @@ def _run(self, recording, output_folder):

# Check location no more needed done in basesorter

sorting = ml_ms4alg.mountainsort4(
sorting = mountainsort4.mountainsort4(
recording=recording,
detect_sign=p['detect_sign'],
adjacency_radius=p['adjacency_radius'],
Expand All @@ -119,7 +119,7 @@ def _run(self, recording, output_folder):
if p['noise_overlap_threshold'] is not None and p['curation'] is True:
if self.verbose:
print('Curating')
sorting = ml_ms4alg.mountainsort4_curation(
sorting = mountainsort4.mountainsort4_curation(
recording=recording,
sorting=sorting,
noise_overlap_threshold=p['noise_overlap_threshold']
Expand Down