find_tailcuts
- lstchain.image.cleaning.find_tailcuts(input_dir, run_number)
This function uses DL1 files to determine tailcuts which are adequate for the bulk of the pixels in a given run. The script also returns the suggested NSB adjustment needed in the “dark-sky” MC to match the data. The function uses the median (for the whole camera, excluding outliers) of the 95% quantile of the pixel charge for pedestal events to deduce the NSB level. It is good to use a large quantile of the pixel charge distribution (vs. e.g. using the median) because what matters for having a realistic noise simulation is the tail on the right-side, i.e. for large pulses. For reasons of stability & simplicity of analysis, we cannot decide the cleaning levels (or the NSB tuning) on a subrun-by-subrun basis. We select values which are more or less valid for the whole run.
The script will process a subset of the subruns (~10, hardcoded) of the run, distributed uniformly through it.
- Parameters:
- input_dir: `Path`
directory where the DL1 files (subrun-wise, i.e., including DL1a) are stored
- run_numberint
run number to be processed
- Returns:
- additional_nsb_ratefloat
p.e./ns rate of NSB to be added to “dark MC” to match the noise in the data
- newconfigdict
cleaning configuration for running the DL1ab stage