示例#1
0
def test_baseline_subtracted_neighbor_peak_window_sum(camera_waveforms):
    waveforms, camera = camera_waveforms
    nei = camera.neighbor_matrix_where
    extractor = BaselineSubtractedNeighborPeakWindowSum()
    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)
示例#2
0
def test_baseline_subtracted_neighbor_pw_sum_2chan(camera_waveforms_2chan):
    waveforms, camera = camera_waveforms_2chan
    nei = camera.neighbor_matrix_where
    extractor = BaselineSubtractedNeighborPeakWindowSum()
    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)
示例#3
0
def test_baseline_subtracted_neighbor_peak_window_sum(camera_waveforms):
    waveforms, subarray = camera_waveforms
    extractor = BaselineSubtractedNeighborPeakWindowSum(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)