def axes_h(fig, naxes=4, x0=0.07, y0=0.03, width=0.87, ygap=0.04): dy = 1. / naxes return [ gr.add_axes(fig, axwin=(x0, y0 + i * dy, width, dy - ygap)) for i in range(naxes) ]
'Y1', 'Y2', 'MCP', 'XX', 'YY', ) dy = 1. / naxes lw = 1 w = 0.87 h = dy - 0.04 x0, y0 = 0.07, 0.03 fig = gr.figure(figsize=(15, 15), title='Image') fig.clear() ax = [gr.add_axes(fig, axwin=(x0, y0 + i * dy, w, h)) for i in range(naxes)] def array_of_selected_channels(a, ch=(2, 3, 4, 5, 6)): """converts shape:(8, 44000) -> shape:(5, 44000)""" return a[ch, :] def draw_waveforms(wfs, wts, nev): """Draws all waveforms on figure axes, one waveform per axis. Parameters: - wfs [np.array] shape=(NUM_CHANNELS, NUM_SAMPLES) - waveform intensities - wts [np.array] shape=(NUM_CHANNELS, NUM_SAMPLES) - waveform times """ t0_sec = time()