Skip to content

Commit

Permalink
More docstring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishalcrow committed Aug 13, 2024
1 parent c3f0f75 commit 117e0f6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/spikeinterface/core/analyzer_extension_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ class ComputeNoiseLevels(AnalyzerExtension):
----------
sorting_analyzer : SortingAnalyzer
A SortingAnalyzer object
**params : dict with additional parameters for the `spikeinterface.get_noise_levels()` function
**kwargs : dict
Additional parameters for the `spikeinterface.get_noise_levels()` function
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions src/spikeinterface/postprocessing/correlograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class ComputeCorrelograms(AnalyzerExtension):
Parameters
----------
sorting_analyzer : SortingAnalyzer
A SortingAnalyzer object
sorting_analyzer_or_sorting : SortingAnalyzer | Sorting
A SortingAnalyzer or Sorting object
window_ms : float, default: 50.0
The window around the spike to compute the correlation in ms. For example,
if 50 ms, the correlations will be computed at lags -25 ms ... 25 ms.
Expand Down
4 changes: 2 additions & 2 deletions src/spikeinterface/postprocessing/spike_amplitudes.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class ComputeSpikeAmplitudes(AnalyzerExtension):
In case channel_from_template=False, this is the peak sign.
method : "center_of_mass" | "monopolar_triangulation" | "grid_convolution", default: "center_of_mass"
The localization method to use
method_kwargs : dict, default: dict()
Other kwargs depending on the method.
**method_kwargs : dict, default: {}
Kwargs which are passed to the method function. These can be found in the docstrings of `compute_center_of_mass`, `compute_grid_convolution` and `compute_monopolar_triangulation`.
outputs : "numpy" | "by_unit", default: "numpy"
The output format, either concatenated as numpy array or separated on a per unit basis
Expand Down
6 changes: 3 additions & 3 deletions src/spikeinterface/postprocessing/template_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ class ComputeTemplateMetrics(AnalyzerExtension):
* spread_threshold: the threshold to compute the spread, default: 0.2
* spread_smooth_um: the smoothing in um to compute the spread, default: 20
* column_range: the range in um in the horizontal direction to consider channels for velocity, default: None
- If None, all channels all channels are considered
- If 0 or 1, only the "column" that includes the max channel is considered
- If > 1, only channels within range (+/-) um from the max channel horizontal position are used
- If None, all channels all channels are considered
- If 0 or 1, only the "column" that includes the max channel is considered
- If > 1, only channels within range (+/-) um from the max channel horizontal position are used
Returns
-------
Expand Down
6 changes: 3 additions & 3 deletions src/spikeinterface/postprocessing/unit_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class ComputeUnitLocations(AnalyzerExtension):
A SortingAnalyzer object
method : "center_of_mass" | "monopolar_triangulation" | "grid_convolution", default: "center_of_mass"
The method to use for localization
method_kwargs : dict, default: {}
Other kwargs depending on the method
**method_kwargs : dict, default: {}
Kwargs which are passed to the method function. These can be found in the docstrings of `compute_center_of_mass`, `compute_grid_convolution` and `compute_monopolar_triangulation`.
Returns
-------
Expand Down Expand Up @@ -94,7 +94,7 @@ def _run(self, verbose=False):
method_kwargs.pop("method")

if method not in _unit_location_methods:
raise ValueError(f"Wrong ethod for unit_locations : it should be in {list(_unit_location_methods.keys())}")
raise ValueError(f"Wrong method for unit_locations : it should be in {list(_unit_location_methods.keys())}")

func = _unit_location_methods[method]
self.data["unit_locations"] = func(self.sorting_analyzer, **method_kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def estimate_motion(
**method_kwargs,
):
"""
Estimate motion with several possible methods.
Most of methods except dredge_lfp needs peaks and after their localization.
Expand All @@ -56,7 +54,6 @@ def estimate_motion(
{method_doc}
rigid : bool, default: False
Compute rigid (one motion for the entire probe) or non rigid motion
Rigid computation is equivalent to non-rigid with only one window with rectangular shape.
Expand All @@ -82,6 +79,7 @@ def estimate_motion(
Display progress bar or not
verbose : bool, default: False
If True, output is verbose
**method_kwargs :
Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class InterpolateMotionRecording(BasePreprocessor):
Interpolation needs to convert to a floating dtype. If dtype is supplied, that will be used.
If the input recording is already floating and dtype=None, then its dtype is used by default.
If the input recording is integer, then float32 is used by default.
**spatial_interpolation_kwargs: dict
**spatial_interpolation_kwargs : dict
Spatial interpolation kwargs for `interpolate_motion_on_traces`.
Returns
Expand Down

0 comments on commit 117e0f6

Please sign in to comment.