Skip to content

Commit 4999d64

Browse files
committed
docs: 📝 add | update docstrings
1 parent efca82e commit 4999d64

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

element_array_ephys/plotting/probe_level.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@
44
import seaborn as sns
55

66

7-
def plot_raster(units, spike_times) -> matplotlib.figure.Figure:
7+
def plot_raster(units: np.ndarray, spike_times: np.ndarray) -> matplotlib.figure.Figure:
8+
"""Population raster plots.
89
10+
Args:
11+
units (np.ndarray): Recorded units.
12+
spike_times (np.ndarray): Spike timestamps in seconds.
13+
14+
Returns:
15+
matplotlib.figure.Figure: matplotlib figure object.
16+
"""
917
units = np.arange(1, len(units) + 1)
1018
x = np.hstack(spike_times)
1119
y = np.hstack([np.full_like(s, u) for u, s in zip(units, spike_times)])
@@ -26,6 +34,16 @@ def plot_raster(units, spike_times) -> matplotlib.figure.Figure:
2634
def plot_driftmap(
2735
spike_times: np.ndarray, spike_depths: np.ndarray, colormap="gist_heat_r"
2836
) -> matplotlib.figure.Figure:
37+
"""Plot unit activity drift map all units recorded in a given shank of a probe.
38+
39+
Args:
40+
spike_times (np.ndarray): Spike timestamps in seconds.
41+
spike_depths (np.ndarray): The depth of the electrode where the spike was found in μm.
42+
colormap (str, optional): Colormap. Defaults to "gist_heat_r".
43+
44+
Returns:
45+
matplotlib.figure.Figure: matplotlib figure object.
46+
"""
2947

3048
spike_times = np.hstack(spike_times)
3149
spike_depths = np.hstack(spike_depths)
@@ -81,4 +99,4 @@ def plot_driftmap(
8199
ax_spkcount.set_ylim(depth_edges[0], depth_edges[-1])
82100
sns.despine()
83101

84-
return fig
102+
return fig

element_array_ephys/plotting/unit_level.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def plot_depth_waveforms(
9999
"""Plot waveforms
100100
101101
Args:
102-
ephys (Module): Imported ephys module.
102+
ephys (Module): Imported ephys module object.
103103
unit_key (dict[str, Any]): Key dictionary from ephys.CuratedClustering.Unit table.
104104
y_range (float, optional): Vertical range to show waveforms relative to the peak waveform in μm. Defaults to 60.
105105

0 commit comments

Comments
 (0)