r1_calibration

hipecta._calib.r1_calibration(waveform, pedestal, dc_to_pe, calibrated)

This calibrator correctly applies the pedestal subtraction and conversion from counts to photoelectrons for the Monte-Carlo data.

waveform : numpy ndarray
waveform signal a camera’s pixels’ telescope
pedestal : numpy ndarray
pedestal value of a camera’s pixels.
dc_to_pe : numpy ndarray
gain(s) value of a camera
calibrated : numpy ndarray
allocated, non initialised numpy array that is fill by the function
>>> ...
>>> samples  = event.r0.tel[tel_id].waveform
>>> calibrated = hipecta.empty(samples.shape, dtype=np.float32)
>>> n_samples = samples.shape[2]
>>> ped = event.mc.tel[tel_id].pedestal / n_samples
>>> dc_to_pe = event.mc.tel[tel_id].dc_to_pe
>>> hipecta.calib.r1_calibration(samples, ped, dc_to_pe, calibrated)