示例#1
0
def test_camera_geom(example_event):
    t = list(example_event.r0.tels_with_data)[0]
    geom = example_event.inst.subarray.tel[t].camera
    c_display = CameraDisplay(geom)

    assert (c_display.cdsource.data['x'] == geom.pix_x.value).all()
    assert (c_display.cdsource.data['y'] == geom.pix_y.value).all()

    t = list(example_event.r0.tels_with_data)[1]
    geom = example_event.inst.subarray.tel[t].camera
    c_display.geom = geom
    assert (c_display.cdsource.data['x'] == geom.pix_x.value).all()
    assert (c_display.cdsource.data['y'] == geom.pix_y.value).all()
示例#2
0
def test_camera_geom(example_event, example_subarray):
    from ctapipe.visualization.bokeh import CameraDisplay

    t = list(example_event.r0.tels_with_data)[0]
    geom = example_subarray.tel[t].camera.geometry
    c_display = CameraDisplay(geom)

    assert (c_display.cdsource.data["x"] == geom.pix_x.value).all()
    assert (c_display.cdsource.data["y"] == geom.pix_y.value).all()

    t = list(example_event.r0.tels_with_data)[1]
    geom = example_subarray.tel[t].camera.geometry
    c_display.geom = geom
    assert (c_display.cdsource.data["x"] == geom.pix_x.value).all()
    assert (c_display.cdsource.data["y"] == geom.pix_y.value).all()
示例#3
0
def test_camera_geom(example_event):
    from ctapipe.visualization.bokeh import CameraDisplay

    t = list(example_event.r0.tels_with_data)[0]
    geom = example_event.inst.subarray.tel[t].camera
    c_display = CameraDisplay(geom)

    assert (c_display.cdsource.data['x'] == geom.pix_x.value).all()
    assert (c_display.cdsource.data['y'] == geom.pix_y.value).all()

    t = list(example_event.r0.tels_with_data)[1]
    geom = example_event.inst.subarray.tel[t].camera
    c_display.geom = geom
    assert (c_display.cdsource.data['x'] == geom.pix_x.value).all()
    assert (c_display.cdsource.data['y'] == geom.pix_y.value).all()