From a38116d6331a286e0f224af28be0298182b6cb4b Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 19 Jul 2024 16:46:07 +0200 Subject: [PATCH] Some final docs/api/sphinx fixes --- doc/api.rst | 1 + doc/how_to/drift_with_lfp.rst | 1 + doc/index.rst | 4 ++-- doc/modules/postprocessing.rst | 4 ++-- src/spikeinterface/core/generate.py | 4 ++-- src/spikeinterface/curation/__init__.py | 2 +- .../sortingcomponents/motion/dredge.py | 12 ++++++------ .../sortingcomponents/motion/motion_cleaner.py | 4 ++-- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index afc3e38ab2..1966b48a37 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -336,6 +336,7 @@ spikeinterface.curation Deprecated ~~~~~~~~~~ .. automodule:: spikeinterface.curation + :noindex: .. autofunction:: apply_sortingview_curation .. autoclass:: CurationSorting diff --git a/doc/how_to/drift_with_lfp.rst b/doc/how_to/drift_with_lfp.rst index 0decc1058a..aa79c9e97b 100644 --- a/doc/how_to/drift_with_lfp.rst +++ b/doc/how_to/drift_with_lfp.rst @@ -64,6 +64,7 @@ Preprocessing Contrary to the **dredge_ap** approach, which needs detected peaks and peak locations, the **dredge_lfp** method is estimating the motion directly on traces. Importantly, the method requires some additional pre-processing steps: + * ``bandpass_filter``: to "focus" the signal on a particular band * ``phase_shift``: to compensate for the sampling misalignement * ``resample``: to further reduce the sampling fequency of the signal and speed up the computation. The sampling frequency of the estimated motion will be the same as the resampling frequency. Here we choose 250Hz, which corresponds to a sampling interval of 4ms. diff --git a/doc/index.rst b/doc/index.rst index c416764d38..ed443e4200 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -14,12 +14,12 @@ state-of-the-art spike sorters, post-process and curate the output, compute qual .. warning:: - Version 0.101.0 introduces a major API improvement: the :code:`SortingAnalyzer`.` + Version 0.101.0 introduces a major API improvement: the :code:`SortingAnalyzer`. To read more about the motivations, checkout the `enhancement proposal `_. Learn how to :ref:`update your code here ` and read more about the :code:`SortingAnalyzer`, please refer to the - :ref:`core ` and :ref:`postprocessing ` module + :ref:`core ` and :ref:`postprocessing ` module documentation. diff --git a/doc/modules/postprocessing.rst b/doc/modules/postprocessing.rst index ffb55d2929..cc2b064ed0 100644 --- a/doc/modules/postprocessing.rst +++ b/doc/modules/postprocessing.rst @@ -13,12 +13,12 @@ Extensions as AnalyzerExtensions -------------------------------- There are several postprocessing tools available, and all of them are implemented as a -:py:class:`~spikeinterface.core.ResultExtension`. If the :code:`SortingAnalyzer` is saved to disk, all computations on +:py:class:`~spikeinterface.core.AnalyzerExtension`. If the :code:`SortingAnalyzer` is saved to disk, all computations on top of it will be saved alongside the :code:`SortingAnalyzer` itself (sub folder, zarr path or sub dict). This workflow is convenient for retrieval of time-consuming computations (such as pca or spike amplitudes) when reloading a :code:`SortingAnalyzer`. -:py:class:`~spikeinterface.core.ResultExtension` objects are tightly connected to the +:py:class:`~spikeinterface.core.AnalyzerExtension` objects are tightly connected to the parent :code:`SortingAnalyzer` object, so that operations done on the :code:`SortingAnalyzer`, such as saving, loading, or selecting units, will be automatically applied to all extensions. diff --git a/src/spikeinterface/core/generate.py b/src/spikeinterface/core/generate.py index 62aa7f37c3..ff75789aab 100644 --- a/src/spikeinterface/core/generate.py +++ b/src/spikeinterface/core/generate.py @@ -1079,8 +1079,8 @@ class NoiseGeneratorRecording(BaseRecording): noise_block_size: int Size in sample of noise block. - Note - ---- + Notes + ----- If modifying this function, ensure that only one call to malloc is made per call get_traces to maintain the optimized memory profile. """ diff --git a/src/spikeinterface/curation/__init__.py b/src/spikeinterface/curation/__init__.py index add08ddb5e..657b936fb9 100644 --- a/src/spikeinterface/curation/__init__.py +++ b/src/spikeinterface/curation/__init__.py @@ -12,6 +12,6 @@ from .splitunitsorting import SplitUnitSorting, split_unit_sorting # curation format -from .curation_format import validate_curation_dict, curation_label_to_dataframe +from .curation_format import validate_curation_dict, curation_label_to_dataframe, apply_curation from .sortingview_curation import apply_sortingview_curation diff --git a/src/spikeinterface/sortingcomponents/motion/dredge.py b/src/spikeinterface/sortingcomponents/motion/dredge.py index 6cc3a8d8d0..ded4c257ab 100644 --- a/src/spikeinterface/sortingcomponents/motion/dredge.py +++ b/src/spikeinterface/sortingcomponents/motion/dredge.py @@ -182,8 +182,8 @@ def dredge_ap( matrix (or several, one for each nonrigid window). This matrix is used to solve for a motion estimate. - Arguments - --------- + Parameters + ---------- recording: BaseRecording The recording extractor peaks: numpy array @@ -518,8 +518,8 @@ def dredge_online_lfp( ): """Online registration of a preprocessed LFP recording - Arguments - --------- + Parameters + ---------- {} Returns @@ -1065,8 +1065,8 @@ def calc_corr_decent_pair( the normxcorrs at the best displacement, and the matrix of the best displacements. - Arguments - --------- + Parameters + ---------- raster : DxT array batch_size : int How many raster rows to xcorr against the whole raster diff --git a/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py b/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py index 6fe36a6193..2fc1a281a9 100644 --- a/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py +++ b/src/spikeinterface/sortingcomponents/motion/motion_cleaner.py @@ -9,8 +9,8 @@ def clean_motion_vector(motion, temporal_bins, bin_duration_s, speed_threshold=3 Also can apply a smoothing. - Arguments - --------- + Parameters + ---------- motion: numpy array 2d Motion estimate in um. temporal_bins: numpy.array 1d