get_intensity_threshold
- lstchain.reco.utils.get_intensity_threshold(data)
Obtain from a dl2 data table the peak of the differential intensity (I) spectrum, i.e. dR/dI = dN/dt/dI (events/s/p.e.), and determine from it the intensity at which the 50% of the peak rate is reached on the rising edge.
- Parameters:
- data: pandas DataFrame or astropy.table.QTable of dl2 events.
- Returns:
- xmax: (float) Intensity (in p.e.) at which the peak of dR/dI is reached
- ymax: (float) Value of dR/dI at peak (events/s/p.e.)
- x50: (float) Intensity (in p.e.) at which 50% ofthe peak of dR/dI is reached
- on the rising edge of the peak. Will be nan if not found in the search range
- y50: (float) 50% of the peak dR/dI (events/s/p.e.). Will be nan if not found
- in the search range
- bincenters: (array) the centers (in log10(intensity)) of the bins of
- the intensity histogram used in the calculation (p.e.)
- drdi: (array) the dR/dI values (events/s/p.e.) at the intensity values
- in bincenters