calculate_required_additional_nsb
- lstchain.image.modifier.calculate_required_additional_nsb(simtel_filename, data_dl1_filename, config=None)
Calculates the additional NSB needed in the MC waveforms to match a real data DL1 file
- Parameters:
- simtel_filename: a simtel file containing showers, from the production
- (same NSB and telescope settings) as the one on which the correction will
- be applied. It must contain pixel-wise info on true number of p.e.’s from
- C-photons (will be used to identify pixels which only contain noise).
- data_dl1_filename: a real data DL1 file (processed with calibration
- settings corresponding to those with which the MC is to be processed).
- It must contain calibrated images, i.e. “DL1a” data. This file has the
- “target” NSB which we want to have in the MC files, for better
- agreement of data and simulations.
- config: configuration containing the calibration
- settings used for processing both the data and the MC files above
- Returns:
- extra_nsb: additional NSB rate in absolute units, p.e./ns (a.k.a. “GHz”),
- that has to be added in the MC to match the real data
- data_ped_variance: Pedestal variance from data
- mc_ped_variance: Pedestal variance from MC, AFTER THE TUNING!