From 9af54a21ade15047c92c79bc1c61553e004ef710 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Mon, 1 Apr 2024 07:53:24 -0400 Subject: [PATCH] add .get_timestamps to tutorial (#1879) --- docs/gallery/general/plot_read_basics.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/gallery/general/plot_read_basics.py b/docs/gallery/general/plot_read_basics.py index 0d684e5f5..d800adbe5 100644 --- a/docs/gallery/general/plot_read_basics.py +++ b/docs/gallery/general/plot_read_basics.py @@ -213,7 +213,9 @@ after = 3.0 # Get the stimulus times for all stimuli -stim_on_times = stimulus_presentation.timestamps[:] +# get_timestamps() works whether the time is stored as an array of timestamps or as +# starting time and sampling rate. +stim_on_times = stimulus_presentation.get_timestamps() for unit in range(3): unit_spike_times = nwbfile.units["spike_times"][unit]