def test_waveform_values(): wf = np.ones(30) w_display = WaveformDisplay(wf) assert (w_display.cdsource.data['samples'] == wf).all() assert (w_display.cdsource.data['t'] == np.arange(wf.size)).all() wf[5] = 5 w_display.waveform = wf assert (w_display.cdsource.data['samples'] == wf).all() assert (w_display.cdsource.data['t'] == np.arange(wf.size)).all()
def test_waveform_values(): from ctapipe.visualization.bokeh import WaveformDisplay wf = np.ones(30) w_display = WaveformDisplay(wf) assert (w_display.cdsource.data["samples"] == wf).all() assert (w_display.cdsource.data["t"] == np.arange(wf.size)).all() wf[5] = 5 w_display.waveform = wf assert (w_display.cdsource.data["samples"] == wf).all() assert (w_display.cdsource.data["t"] == np.arange(wf.size)).all()
def test_waveform_values(): from ctapipe.visualization.bokeh import WaveformDisplay wf = np.ones(30) w_display = WaveformDisplay(wf) assert (w_display.cdsource.data['samples'] == wf).all() assert (w_display.cdsource.data['t'] == np.arange(wf.size)).all() wf[5] = 5 w_display.waveform = wf assert (w_display.cdsource.data['samples'] == wf).all() assert (w_display.cdsource.data['t'] == np.arange(wf.size)).all()
def test_span(): wf = np.ones(30) w_display = WaveformDisplay(wf) w_display.enable_time_picker() w_display.active_time = 4 assert w_display.span.location == 4 w_display.active_time = -3 assert w_display.active_time == 0 assert w_display.span.location == 0 w_display.active_time = wf.size + 10 assert w_display.active_time == wf.size - 1 assert w_display.span.location == wf.size - 1
def test_span(): from ctapipe.visualization.bokeh import WaveformDisplay wf = np.ones(30) w_display = WaveformDisplay(wf) w_display.enable_time_picker() w_display.active_time = 4 assert w_display.span.location == 4 w_display.active_time = -3 assert w_display.active_time == 0 assert w_display.span.location == 0 w_display.active_time = wf.size + 10 assert w_display.active_time == wf.size - 1 assert w_display.span.location == wf.size - 1
def test_waveform_display_create(): from ctapipe.visualization.bokeh import WaveformDisplay WaveformDisplay()
def test_waveform_display_create(): WaveformDisplay()