Add n_jobs and total_memory to TDC
@@ -34,6 +34,8 @@ class TridesclousSorter(BaseSorter):
'detect_threshold': 5,
'common_ref_removal': False,
'nested_params': None,
+ 'total_memory': '500M',
+ 'n_jobs_bin': 1
}
_params_description = {
@@ -43,6 +45,8 @@ class TridesclousSorter(BaseSorter):
'detect_sign': "Use -1 (negative) or 1 (positive) depending "
"on the sign of the spikes in the recording",
'common_ref_removal': 'remove common reference with median',
+ 'total_memory': "Chunk size in Mb for saving to binary format (default 500Mb)",
+ 'n_jobs_bin': "Number of jobs for saving to binary format (Default 1)"
}
sorter_description = """Tridesclous is a template-matching spike sorter with a real-time engine.
@@ -105,7 +109,8 @@ class TridesclousSorter(BaseSorter):
dtype = recording.get_dtype().str
file_paths = [str(output_folder / f'raw_signals_{i}.raw') for i in range(num_seg)]
BinaryRecordingExtractor.write_recording(recording, file_paths=file_paths,
- dtype=dtype, total_memory="500M", n_jobs=-1,
+ dtype=dtype, total_memory=params["total_memory"],
+ n_jobs=params["n_jobs_bin"],
verbose=False, progress_bar=verbose)
file_offset = 0
