diff --git a/src/spikeinterface/comparison/groundtruthstudy.py b/src/spikeinterface/comparison/groundtruthstudy.py index d45956a07e..8929d6983c 100644 --- a/src/spikeinterface/comparison/groundtruthstudy.py +++ b/src/spikeinterface/comparison/groundtruthstudy.py @@ -45,7 +45,7 @@ class GroundTruthStudy: Parameters ---------- - study_folder : srt | Path + study_folder : str | Path Path to folder containing `GroundTruthStudy` """ diff --git a/src/spikeinterface/comparison/multicomparisons.py b/src/spikeinterface/comparison/multicomparisons.py index dccff6118d..f7d9782a07 100644 --- a/src/spikeinterface/comparison/multicomparisons.py +++ b/src/spikeinterface/comparison/multicomparisons.py @@ -43,9 +43,9 @@ class MultiSortingComparison(BaseMultiComparison, MixinSpikeTrainComparison): - "intersection" : spike trains are the intersection between the spike trains of the best matching two sorters verbose : bool, default: False - if True, output is verbose + If True, output is verbose do_matching : bool, default: True - if True, SOMETHING HAPPENS. + If True, the comparison is done when the `MultiSortingComparison` is initialized Returns ------- @@ -320,15 +320,15 @@ class MultiTemplateComparison(BaseMultiComparison, MixinTemplateComparison): chance_score : float, default: 0.3 Minimum agreement score to for a possible match verbose : bool, default: False - if True, output is verbose + If True, output is verbose do_matching : bool, default: True - if True, IT DOES SOMETHING + If True, the comparison is done when the `MultiSortingComparison` is initialized support : "dense" | "union" | "intersection", default: "union" The support to compute the similarity matrix. num_shifts : int, default: 0 Number of shifts to use to shift templates to maximize similarity. similarity_method : "cosine" | "l1" | "l2", default: "cosine" - Method for the similarity matrix. + Method for the similarity matrix. Returns ------- diff --git a/src/spikeinterface/comparison/paircomparisons.py b/src/spikeinterface/comparison/paircomparisons.py index 9566354918..f5e7cdcc1f 100644 --- a/src/spikeinterface/comparison/paircomparisons.py +++ b/src/spikeinterface/comparison/paircomparisons.py @@ -566,7 +566,7 @@ def count_false_positive_units(self, redundant_score=None): Parameters ---------- - redundant_score : float, default: None + redundant_score : float | None, default: None The agreement score below which tested units are counted as "false positive"" (and not "redundant"). """ @@ -747,7 +747,7 @@ class TemplateComparison(BasePairComparison, MixinTemplateComparison): List of units from sorting_analyzer_2 to compare. name1 : str, default: "sess1" Name of first session. - name2 : str, default: "sess1" + name2 : str, default: "sess2" Name of second session. similarity_method : "cosine" | "l1" | "l2", default: "cosine" Method for the similarity matrix. diff --git a/src/spikeinterface/core/generate.py b/src/spikeinterface/core/generate.py index 187103d031..f8ab8a2d3a 100644 --- a/src/spikeinterface/core/generate.py +++ b/src/spikeinterface/core/generate.py @@ -44,7 +44,7 @@ def generate_recording( The number of channels in the recording. sampling_frequency : float, default: 30000. (in Hz) The sampling frequency of the recording, default: 30000. - durations : List[float], default: [5.0, 2.5] + durations : list[float], default: [5.0, 2.5] The duration in seconds of each segment in the recording. The number of segments is determined by the length of this list. set_probe : bool, default: True @@ -1295,8 +1295,8 @@ def generate_recording_by_size( The seed for np.random.default_rng. strategy : "tile_pregenerated"| "on_the_fly", default: "tile_pregenerated" The strategy of generating noise chunk: - * "tile_pregenerated": pregenerate a noise chunk of noise_block_size sample and repeat it very fast and cusume only one noise block. - * "on_the_fly": generate on the fly a new noise block by combining seed + noise block index no memory preallocation but a bit more computaion (random) + * "tile_pregenerated": pregenerate a noise chunk of `noise_block_size` samples and repeat it quickly consuming only one noise block. + * "on_the_fly": generate on the fly a new noise block by combining seed + noise block index. No memory preallocation but a bit more computaion (random) Returns ------- @@ -2062,9 +2062,9 @@ def generate_ground_truth_recording( Parameters ---------- - durations : list of float, default: [10.] + durations : list[float], default: [10.] Durations in seconds for all segments. - sampling_frequency : float, default: 25000 + sampling_frequency : float, default: 25000.0 Sampling frequency. num_channels : int, default: 4 Number of channels, not used when probe is given. @@ -2085,7 +2085,7 @@ def generate_ground_truth_recording( * (num_units, num_samples, num_channels, upsample_factor): case with oversample template to introduce jitter. ms_before : float, default: 1.5 Cut out in ms before spike peak. - ms_after : float, default: 3 + ms_after : float, default: 3.0 Cut out in ms after spike peak. upsample_factor : None or int, default: None A upsampling factor used only when templates are not provided. diff --git a/src/spikeinterface/generation/hybrid_tools.py b/src/spikeinterface/generation/hybrid_tools.py index 12958649dd..747389a6d7 100644 --- a/src/spikeinterface/generation/hybrid_tools.py +++ b/src/spikeinterface/generation/hybrid_tools.py @@ -183,7 +183,7 @@ def scale_template_to_range( The minimum amplitude of the output templates after scaling. max_amplitude : float The maximum amplitude of the output templates after scaling. - amplitude_function : "ptp" | "min" | "max", default: "pip" + amplitude_function : "ptp" | "min" | "max", default: "ptp" The function to use to compute the amplitude of the templates. Can be "ptp", "min" or "max". Returns diff --git a/src/spikeinterface/postprocessing/template_similarity.py b/src/spikeinterface/postprocessing/template_similarity.py index 53df14ff8a..27214f32e6 100644 --- a/src/spikeinterface/postprocessing/template_similarity.py +++ b/src/spikeinterface/postprocessing/template_similarity.py @@ -17,8 +17,8 @@ class ComputeTemplateSimilarity(AnalyzerExtension): ---------- sorting_analyzer : SortingAnalyzer The SortingAnalyzer object - method : str, default: "cosine" - The method to compute the similarity. Can be in ["cosine", "l2", "l1"] + method : "cosine" | "l1" | "l2", default: "cosine" + The method to compute the similarity. In case of "l1" or "l2", the formula used is: - similarity = 1 - norm(T_1 - T_2)/(norm(T_1) + norm(T_2)). In case of cosine it is: diff --git a/src/spikeinterface/sortingcomponents/matching/main.py b/src/spikeinterface/sortingcomponents/matching/main.py index 88b31476a9..fa2f7c055e 100644 --- a/src/spikeinterface/sortingcomponents/matching/main.py +++ b/src/spikeinterface/sortingcomponents/matching/main.py @@ -16,7 +16,7 @@ def find_spikes_from_templates( ---------- recording : RecordingExtractor The recording extractor object - method : "naive" | "tridesclous" | "circus" | "circus-omp" | "wobble" + method : "naive" | "tridesclous" | "circus" | "circus-omp" | "wobble", default: "naive" Which method to use for template matching method_kwargs : dict, optional Keyword arguments for the chosen method