Esempio n. 1
0
def test_global_peak_integration(camera_waveforms):
    waveforms, _ = camera_waveforms
    integrator = GlobalPeakIntegrator()
    charge, _, _ = integrator.extract_charge(waveforms)

    assert_allclose(charge[0][0], 232.559, rtol=1e-3)
    assert_allclose(charge[1][0], 425.406, rtol=1e-3)
Esempio n. 2
0
def test_global_peak_integration(example_event):
    telid = list(example_event.r0.tel)[0]
    data = example_event.r0.tel[telid].waveform
    nsamples = data.shape[2]
    ped = example_event.mc.tel[telid].pedestal
    data_ped = data - np.atleast_3d(ped / nsamples)
    data_ped = np.array([data_ped[0], data_ped[0]])  # Test LG functionality

    integrator = GlobalPeakIntegrator()
    integration, peakpos, window = integrator.extract_charge(data_ped)
Esempio n. 3
0
def test_global_peak_integration(example_event):
    telid = 11
    data = example_event.r0.tel[telid].waveform
    nsamples = data.shape[2]
    ped = example_event.mc.tel[telid].pedestal
    data_ped = data - np.atleast_3d(ped / nsamples)
    data_ped = np.array([data_ped[0], data_ped[0]])  # Test LG functionality

    integrator = GlobalPeakIntegrator()
    integration, peakpos, window = integrator.extract_charge(data_ped)

    assert_almost_equal(integration[0][0], 58, 0)
    assert_almost_equal(integration[1][0], 58, 0)
    assert peakpos[0][0] == 14
    assert peakpos[1][0] == 14
Esempio n. 4
0
def test_global_peak_integration():
    telid = 11
    event = get_test_event()
    data = event.r0.tel[telid].adc_samples
    nsamples = data.shape[2]
    ped = event.mc.tel[telid].pedestal
    data_ped = data - np.atleast_3d(ped/nsamples)
    data_ped = np.array([data_ped[0], data_ped[0]])  # Test LG functionality

    integrator = GlobalPeakIntegrator(None, None)
    integration, peakpos, window = integrator.extract_charge(data_ped)

    assert_almost_equal(integration[0][0], 58, 0)
    assert_almost_equal(integration[1][0], 58, 0)
    assert peakpos[0][0] == 14
    assert peakpos[1][0] == 14
Esempio n. 5
0
 def setup(self):
     kwargs = dict(config=self.config, tool=self)
     self.dl0 = CameraDL0Reducer(**kwargs)
     self.dl1 = CameraDL1Calibrator(**kwargs)
     self.cal = CameraCalibrator(r1_product=self.calibrator)
     self.cross = CrossCorrelation()
     self.glob_peak = GlobalPeakIntegrator()
     self.local_peak = LocalPeakIntegrator()
     self.neighbour = NeighbourPeakIntegrator()
     self.aver = AverageWfPeakIntegrator()
Esempio n. 6
0
    SCT_list = []
    SST_list = []

    for event in source:
        for i in event.inst.telescope_ids:
            if event.inst.num_pixels[i] == 11328:
                SCT_list.append(i)
            elif event.inst.num_pixels[i] == 1855:
                LST_list.append(i)
            # elif event.inst.num_pixels[i] ==

    # camera calibrator
    cal = CameraCalibrator(None, None)

    # trace integrator
    integ = GlobalPeakIntegrator(None, None)

    # energy reconstructor
    energy_reco = EnergyRegressor(cam_id_list=map(str, SCT_list))

    # direction reconstructor
    hillas_reco = HillasReconstructor()

    # impact reconstructor

    # load all SCT data from simtel file
    source = hessio_event_source(args.data_file,
                                 allowed_tels=SCT_list,
                                 max_events=100)

    pedestal_start = 48