Skip to content

Commit

Permalink
Merge pull request #3279 from zm711/examples
Browse files Browse the repository at this point in the history
Proposal for adding Examples to docstrings
  • Loading branch information
samuelgarcia authored Aug 28, 2024
2 parents 77ac020 + 4668ab7 commit bcc47a1
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/spikeinterface/extractors/neoextractors/alphaomega.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AlphaOmegaRecordingExtractor(NeoBaseRecordingExtractor):
folder_path : str or Path-like
The folder path to the AlphaOmega recordings.
lsx_files : list of strings or None, default: None
A list of listings files that refers to mpx files to load.
A list of files that refers to mpx files to load.
stream_id : {"RAW", "LFP", "SPK", "ACC", "AI", "UD"}, default: "RAW"
If there are several streams, specify the stream id you want to load.
stream_name : str, default: None
Expand All @@ -28,6 +28,12 @@ class AlphaOmegaRecordingExtractor(NeoBaseRecordingExtractor):
use_names_as_ids : bool, default: False
Determines the format of the channel IDs used by the extractor. If set to True, the channel IDs will be the
names from NeoRawIO. If set to False, the channel IDs will be the ids provided by NeoRawIO.
Examples
--------
>>> from spikeinterface.extractors import read_alphaomega
>>> recording = read_alphaomega(folder_path="alphaomega_folder")
"""

NeoRawIOClass = "AlphaOmegaRawIO"
Expand Down
5 changes: 5 additions & 0 deletions src/spikeinterface/extractors/neoextractors/axona.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class AxonaRecordingExtractor(NeoBaseRecordingExtractor):
use_names_as_ids : bool, default: False
Determines the format of the channel IDs used by the extractor. If set to True, the channel IDs will be the
names from NeoRawIO. If set to False, the channel IDs will be the ids provided by NeoRawIO.
Examples
--------
>>> from spikeinterface.extractors import read_axona
>>> recording = read_axona(file_path=r'my_data.set')
"""

NeoRawIOClass = "AxonaRawIO"
Expand Down
5 changes: 5 additions & 0 deletions src/spikeinterface/extractors/neoextractors/ced.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class CedRecordingExtractor(NeoBaseRecordingExtractor):
use_names_as_ids : bool, default: False
Determines the format of the channel IDs used by the extractor. If set to True, the channel IDs will be the
names from NeoRawIO. If set to False, the channel IDs will be the ids provided by NeoRawIO.
Examples
--------
>>> from spikeinterface.extractors import read_ced
>>> recording = read_ced(file_path=r'my_data.smr')
"""

NeoRawIOClass = "CedRawIO"
Expand Down
8 changes: 7 additions & 1 deletion src/spikeinterface/extractors/neoextractors/intan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ class IntanRecordingExtractor(NeoBaseRecordingExtractor):
In Intan the ids provided by NeoRawIO are the hardware channel ids while the names are custom names given by
the user
Examples
--------
>>> from spikeinterface.extractors import read_intan
# intan amplifier data is stored in stream_id = '0'
>>> recording = read_intan(file_path=r'my_data.rhd', stream_id='0')
# intan has multi-file formats as well, but in this case our path should point to the header file 'info.rhd'
>>> recording = read_intan(file_path=r'info.rhd', stream_id='0')
"""

NeoRawIOClass = "IntanRawIO"
Expand Down
5 changes: 5 additions & 0 deletions src/spikeinterface/extractors/neoextractors/plexon.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ class PlexonRecordingExtractor(NeoBaseRecordingExtractor):
Example for wideband signals:
names: ["WB01", "WB02", "WB03", "WB04"]
ids: ["0" , "1", "2", "3"]
Examples
--------
>>> from spikeinterface.extractors import read_plexon
>>> recording = read_plexon(file_path=r'my_data.plx')
"""

NeoRawIOClass = "PlexonRawIO"
Expand Down
5 changes: 5 additions & 0 deletions src/spikeinterface/extractors/neoextractors/plexon2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class Plexon2RecordingExtractor(NeoBaseRecordingExtractor):
ids: ["source3.1" , "source3.2", "source3.3", "source3.4"]
all_annotations : bool, default: False
Load exhaustively all annotations from neo.
Examples
--------
>>> from spikeinterface.extractors import read_plexon2
>>> recording = read_plexon2(file_path=r'my_data.pl2')
"""

NeoRawIOClass = "Plexon2RawIO"
Expand Down
5 changes: 5 additions & 0 deletions src/spikeinterface/extractors/neoextractors/spikegadgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class SpikeGadgetsRecordingExtractor(NeoBaseRecordingExtractor):
use_names_as_ids : bool, default: False
Determines the format of the channel IDs used by the extractor. If set to True, the channel IDs will be the
names from NeoRawIO. If set to False, the channel IDs will be the ids provided by NeoRawIO.
Examples
--------
>>> from spikeinterface.extractors import read_spikegadgets
>>> recording = read_spikegadgets(file_path=r'my_data.rec')
"""

NeoRawIOClass = "SpikeGadgetsRawIO"
Expand Down
7 changes: 7 additions & 0 deletions src/spikeinterface/extractors/neoextractors/spikeglx.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ class SpikeGLXRecordingExtractor(NeoBaseRecordingExtractor):
use_names_as_ids : bool, default: False
Determines the format of the channel IDs used by the extractor. If set to True, the channel IDs will be the
names from NeoRawIO. If set to False, the channel IDs will be the ids provided by NeoRawIO.
Examples
--------
>>> from spikeinterface.extractors import read_spikeglx
>>> recording = read_spikeglx(folder_path=r'path_to_folder_with_data', load_sync_channel=False)
# we can load the sync channel, but then the probe is not loaded
>>> recording = read_spikeglx(folder_path=r'pat_to_folder_with_data', load_sync_channel=True)
"""

NeoRawIOClass = "SpikeGLXRawIO"
Expand Down

0 comments on commit bcc47a1

Please sign in to comment.