Beispiel #1
0
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()
Beispiel #2
0
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()
Beispiel #3
0
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()
Beispiel #4
0
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
Beispiel #5
0
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
Beispiel #6
0
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
Beispiel #7
0
def test_waveform_display_create():
    from ctapipe.visualization.bokeh import WaveformDisplay

    WaveformDisplay()
Beispiel #8
0
def test_waveform_display_create():
    WaveformDisplay()