Hello, I have very little experience with Python and am having trouble figuring out how to change clip size when sorting. So far I have been using a jupyter notebook that I modeled after the example provided (ms4_jupyter_example.ipynb) and it has been working. I would like to change the clip_size parameter used in sorting from the default 50 to a different value. Is there a simple way to do this, based on the code I'm using below? Thank you!
#Python module imports + initialization
%load_ext autoreload
%autoreload 2
def append_to_path(dir0):
if dir0 not in sys.path:
sys.path.append(dir0)
import os, sys, json
import numpy as np
from matplotlib import pyplot as plt
from mountainlab_pytools import mlproc as mlp
from mountainlab_pytools import mdaio
import spikeforestwidgets as SFW
append_to_path(os.getcwd()+'/../python')
from mountainsort4_1_0 import sort_dataset as ms4_sort_dataset
#Initialize the pipeline object and job monitor widget
Pipeline=mlp.initPipeline()
#Set dataset + output directories
dsdir=os.getcwd()+'/Gy146_344'
output_dir=os.getcwd()+'/Gy146_344_results'
if not os.path.exists(output_dir):
os.mkdir(output_dir)
#Run the spike sorting
with Pipeline:
ms4_sort_dataset(dataset_dir=dsdir,output_dir=output_dir,freq_min=300,freq_max=5000,adjacency_radius=-1,detect_threshold=3)
Hello, I have very little experience with Python and am having trouble figuring out how to change clip size when sorting. So far I have been using a jupyter notebook that I modeled after the example provided (ms4_jupyter_example.ipynb) and it has been working. I would like to change the clip_size parameter used in sorting from the default 50 to a different value. Is there a simple way to do this, based on the code I'm using below? Thank you!
#Python module imports + initialization %load_ext autoreload %autoreload 2 def append_to_path(dir0): if dir0 not in sys.path: sys.path.append(dir0) import os, sys, json import numpy as np from matplotlib import pyplot as plt from mountainlab_pytools import mlproc as mlp from mountainlab_pytools import mdaio import spikeforestwidgets as SFW append_to_path(os.getcwd()+'/../python') from mountainsort4_1_0 import sort_dataset as ms4_sort_dataset
#Initialize the pipeline object and job monitor widget Pipeline=mlp.initPipeline()
#Set dataset + output directories dsdir=os.getcwd()+'/Gy146_344' output_dir=os.getcwd()+'/Gy146_344_results' if not os.path.exists(output_dir): os.mkdir(output_dir)
#Run the spike sorting with Pipeline: ms4_sort_dataset(dataset_dir=dsdir,output_dir=output_dir,freq_min=300,freq_max=5000,adjacency_radius=-1,detect_threshold=3)