Skip to content

Commit 0980242

Browse files
committed
Fix docstrings
1 parent 96bb6fa commit 0980242

File tree

5 files changed

+171
-178
lines changed

5 files changed

+171
-178
lines changed

element_array_ephys/ephys_acute.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -718,15 +718,18 @@ class ClusteringTask(dj.Manual):
718718
"""
719719

720720
@classmethod
721-
def infer_output_dir(cls, key: dict, relative: bool = False, mkdir: bool = False):
721+
def infer_output_dir(
722+
cls, key: dict, relative: bool = False, mkdir: bool = False
723+
) -> pathlib.Path:
722724
"""Infer output directory if it is not provided.
723725
724726
Args:
725727
key (dict): ClusteringTask primary key.
726728
727729
Returns:
728-
Pathlib.Path: Expected clustering_output_dir based on the following convention: processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
729-
e.g.: sub4/sess1/probe_2/kilosort2_0
730+
Expected clustering_output_dir based on the following convention:
731+
processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
732+
e.g.: sub4/sess1/probe_2/kilosort2_0
730733
"""
731734
processed_dir = pathlib.Path(get_processed_root_data_dir())
732735
session_dir = find_full_path(
@@ -1325,7 +1328,7 @@ class Waveform(dj.Part):
13251328
recovery_slope (float): Slope of the regression line fit to first 30 microseconds from peak to tail.
13261329
spread (float): The range with amplitude over 12-percent of maximum amplitude along the probe.
13271330
velocity_above (float): inverse velocity of waveform propagation from soma to the top of the probe.
1328-
velocity_below (float) inverse velocity of waveform propagation from soma toward the bottom of the probe.
1331+
velocity_below (float): inverse velocity of waveform propagation from soma toward the bottom of the probe.
13291332
"""
13301333

13311334
definition = """

element_array_ephys/ephys_chronic.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,15 +651,16 @@ class ClusteringTask(dj.Manual):
651651
"""
652652

653653
@classmethod
654-
def infer_output_dir(cls, key, relative=False, mkdir=False):
654+
def infer_output_dir(cls, key, relative=False, mkdir=False) -> pathlib.Path:
655655
"""Infer output directory if it is not provided.
656656
657657
Args:
658658
key (dict): ClusteringTask primary key.
659659
660660
Returns:
661-
Pathlib.Path: Expected clustering_output_dir based on the following convention: processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
662-
e.g.: sub4/sess1/probe_2/kilosort2_0
661+
Expected clustering_output_dir based on the following convention:
662+
processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
663+
e.g.: sub4/sess1/probe_2/kilosort2_0
663664
"""
664665
processed_dir = pathlib.Path(get_processed_root_data_dir())
665666
sess_dir = find_full_path(get_ephys_root_data_dir(), get_session_directory(key))
@@ -1256,7 +1257,7 @@ class Waveform(dj.Part):
12561257
recovery_slope (float): Slope of the regression line fit to first 30 microseconds from peak to tail.
12571258
spread (float): The range with amplitude over 12-percent of maximum amplitude along the probe.
12581259
velocity_above (float): inverse velocity of waveform propagation from soma to the top of the probe.
1259-
velocity_below (float) inverse velocity of waveform propagation from soma toward the bottom of the probe.
1260+
velocity_below (float): inverse velocity of waveform propagation from soma toward the bottom of the probe.
12601261
"""
12611262

12621263
definition = """

element_array_ephys/ephys_no_curation.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ class ClusteringParamSet(dj.Lookup):
614614
ClusteringMethod (dict): ClusteringMethod primary key.
615615
paramset_desc (varchar(128) ): Description of the clustering parameter set.
616616
param_set_hash (uuid): UUID hash for the parameter set.
617-
params (longblob)
617+
params (longblob): Set of clustering parameters
618618
"""
619619

620620
definition = """
@@ -724,15 +724,18 @@ class ClusteringTask(dj.Manual):
724724
"""
725725

726726
@classmethod
727-
def infer_output_dir(cls, key, relative: bool = False, mkdir: bool = False):
727+
def infer_output_dir(
728+
cls, key, relative: bool = False, mkdir: bool = False
729+
) -> pathlib.Path:
728730
"""Infer output directory if it is not provided.
729731
730732
Args:
731733
key (dict): ClusteringTask primary key.
732734
733735
Returns:
734-
Pathlib.Path: Expected clustering_output_dir based on the following convention: processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
735-
e.g.: sub4/sess1/probe_2/kilosort2_0
736+
Expected clustering_output_dir based on the following convention:
737+
processed_dir / session_dir / probe_{insertion_number} / {clustering_method}_{paramset_idx}
738+
e.g.: sub4/sess1/probe_2/kilosort2_0
736739
"""
737740
processed_dir = pathlib.Path(get_processed_root_data_dir())
738741
session_dir = find_full_path(
@@ -1265,7 +1268,7 @@ class Waveform(dj.Part):
12651268
recovery_slope (float): Slope of the regression line fit to first 30 microseconds from peak to tail.
12661269
spread (float): The range with amplitude over 12-percent of maximum amplitude along the probe.
12671270
velocity_above (float): inverse velocity of waveform propagation from soma to the top of the probe.
1268-
velocity_below (float) inverse velocity of waveform propagation from soma toward the bottom of the probe.
1271+
velocity_below (float): inverse velocity of waveform propagation from soma toward the bottom of the probe.
12691272
"""
12701273

12711274
definition = """

element_array_ephys/ephys_precluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ class ClusteringParamSet(dj.Lookup):
702702
ClusteringMethod (dict): ClusteringMethod primary key.
703703
paramset_desc (varchar(128) ): Description of the clustering parameter set.
704704
param_set_hash (uuid): UUID hash for the parameter set.
705-
params (longblob)
705+
params (longblob): Paramset, dictionary of all applicable parameters.
706706
"""
707707

708708
definition = """
@@ -723,7 +723,7 @@ def insert_new_params(
723723
"""Inserts new parameters into the ClusteringParamSet table.
724724
725725
Args:
726-
clustering_method (str): name of the clustering method.
726+
processing_method (str): name of the clustering method.
727727
paramset_desc (str): description of the parameter set
728728
params (dict): clustering parameters
729729
paramset_idx (int, optional): Unique parameter set ID. Defaults to None.
@@ -1245,7 +1245,7 @@ class Waveform(dj.Part):
12451245
recovery_slope (float): Slope of the regression line fit to first 30 microseconds from peak to tail.
12461246
spread (float): The range with amplitude over 12-percent of maximum amplitude along the probe.
12471247
velocity_above (float): inverse velocity of waveform propagation from soma to the top of the probe.
1248-
velocity_below (float) inverse velocity of waveform propagation from soma toward the bottom of the probe.
1248+
velocity_below (float): inverse velocity of waveform propagation from soma toward the bottom of the probe.
12491249
"""
12501250

12511251
definition = """

0 commit comments

Comments
 (0)