121 def plot(self, t0=None, tf=None, raw=True, chinds = ()):
127 tstart, tick = self.tickinfo[:2]
128 nticks = frame.shape[1]
129 tend = tstart + nticks*tick
131 if t0
is None or t0 < tstart
or t0 > tend:
134 if tf
is None or tf < t0
or tf > tend:
137 tick0 =
int((t0-tstart)/tick)
138 tickf =
int((tf-tstart)/tick)
144 ngroups = len(chinds)
145 fig, axes = plt.subplots(nrows=ngroups, ncols=1, sharex =
True)
149 for ax, chind
in zip(axes, chinds):
154 ch1 = self.channels[chind0]
155 ch2 = self.channels[chind1-1]
157 extent = (t0/units.ms, tf/units.ms, ch2, ch1)
158 print (
"exent: %s, chind=(%d,%d)" % (
str(extent), chind0, chind1) )
162 im = ax.imshow(frame[chind0:chind1,tick0:tickf],
163 aspect=
'auto', extent=extent, interpolation=
'none')
164 plt.colorbar(im, ax=ax)
166 ax.set_xlabel(
'time [ms]')
def plot(self, t0=None, tf=None, raw=True, chinds=())
def baseline_subtract(frame)
def group_channel_indices(channels, boundaries=())
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.