Beispiel #1
0
def test_neighbor_peak_window_sum(camera_waveforms):
    waveforms, subarray = camera_waveforms
    extractor = NeighborPeakWindowSum(subarray=subarray)
    charge, pulse_time = extractor(waveforms, telid=1)
    assert_allclose(charge[0], 94.671, rtol=1e-3)
    assert_allclose(pulse_time[0], 54.116092, rtol=1e-3)

    extractor.lwt = 4
    charge, pulse_time = extractor(waveforms, telid=1)
    assert_allclose(charge[0], 220.418657, rtol=1e-3)
    assert_allclose(pulse_time[0], 48.717848, rtol=1e-3)
Beispiel #2
0
def test_neighbor_peak_window_sum(camera_waveforms):
    waveforms, camera = camera_waveforms
    nei = camera.neighbor_matrix_where
    extractor = NeighborPeakWindowSum()
    extractor.neighbors = nei
    charge, pulse_time = extractor(waveforms)
    assert_allclose(charge[0], 94.671, rtol=1e-3)
    assert_allclose(pulse_time[0], 54.116092, rtol=1e-3)

    extractor.lwt = 4
    charge, pulse_time = extractor(waveforms)
    assert_allclose(charge[0], 220.418657, rtol=1e-3)
    assert_allclose(pulse_time[0], 48.717848, rtol=1e-3)
Beispiel #3
0
def test_neighbor_peak_window_sum(camera_waveforms):
    waveforms, camera = camera_waveforms
    nei = camera.neighbor_matrix_where
    extractor = NeighborPeakWindowSum()
    extractor.neighbors = nei
    charge, pulse_time = extractor(waveforms)

    assert_allclose(charge[0][0], 94.671, rtol=1e-3)
    assert_allclose(charge[1][0], 426.887, rtol=1e-3)
    assert_allclose(pulse_time[0][0], 54.116092, rtol=1e-3)
    assert_allclose(pulse_time[1][0], 62.038344, rtol=1e-3)

    extractor.lwt = 4
    charge, pulse_time = extractor(waveforms)

    assert_allclose(charge[0][0], 220.418657, rtol=1e-3)
    assert_allclose(charge[1][0], 426.887, rtol=1e-3)
    assert_allclose(pulse_time[0][0], 48.717848, rtol=1e-3)
    assert_allclose(pulse_time[1][0], 62.038344, rtol=1e-3)