Command line Tools (tools)
Introduction
Tools to perform LST calibration and data analysis.
Reference/API
lstchain.tools.lstchain_create_calibration_file Module
Extract flat field coefficients from flasher data files.
Classes
|
Tool that generates a HDF5 file with camera calibration coefficients. |
lstchain.tools.lstchain_create_dl3_file Module
Create DL3 FITS file from given data DL2 file, selection cuts and IRF FITS files.
Change the selection parameters as need be using the aliases. The default values are written in the EventSelector and DL3Cuts Component and also given in some example configs in docs/examples/
For using IRF interpolation methods, to get IRF with sky pointing the same or closer (in the interpolation parameter space) to that of the data provided, one has to provide,
the path to the IRFs, and
glob search pattern for selecting the IRFs to be used
If instead of using IRF interpolation, one needs to add only the nearest IRF node to the given data, in the interpolation space, then one needs to pass the use-nearest-irf-node flag.
For the cuts on gammaness, the Tool looks at the IRF provided or the final interpolated/selected IRF, to either use global cuts, based on the header value of the global gammaness cut, GH_CUT, present in each HDU, or energy-dependent cuts, based on the GH_CUTS HDU.
To use a separate config file for providing the selection parameters, copy and append the relevant example config files, into a custom config file.
For source-dependent analysis, a source-dep flag should be passed. Similarly to the cuts on gammaness, the global alpha cut values are provided from AL_CUT stored in the HDU header. The alpha cut is already applied on this step, and all survived events with each assumed source position (on and off) are saved after the gammaness and alpha cut. To adapt to the high-level analysis used by gammapy, assumed source position (on and off) is set as a reco source position just as a trick to obtain survived events easily.
Classes
|
lstchain.tools.lstchain_create_dl3_index_files Module
Create HDU index files for HDU tables and Obs tables, from a given path of DL3 files and a glob pattern to select DL3 files The index filenames are the standard as per http://gamma-astro-data-formats.readthedocs.io/en/latest/
The Index files can be stored in a different path, but by default they are stored at the same place as the DL3 files.
Classes
|
lstchain.tools.lstchain_create_irf_files Module
Create FITS file for IRFs from given MC DL2 files and selection cuts taken either from command-line arguments or a config file.
MC gamma files can be point_like or diffuse. IRFs can be point_like or Full Enclosure. Background HDU maybe added if proton and electron MC are provided.
Change the selection parameters as need be using the aliases. The default values are written in the EventSelector, DL3Cuts and DataBinning Component and also given in some example configs in docs/examples/
By default, the Tool uses global cuts for gammaness and theta.
For using energy-dependent gammaness cuts, use the argument gh_efficiency for passing the gamma efficiency value to calculate the gammaness cuts for each reco energy bin and the flag energy-dependent-gh. Similarly, for energy-dependent theta cuts, use the argument theta_containment and the flag energy-dependent-theta.
The energy-dependent cuts are stored as HDUs - GH_CUTS and RAD_MAX, and saved with other IRFs.
To use a separate config file for providing the selection parameters, copy and append the relevant example config files, into a custom config file.
For source-dependent analysis, alpha cut can be used instead of theta cut. If you want to generate source-dependent IRFs, source-dep flag should be activated. The global alpha cut used to generate IRFs is stored as AL_CUT in the HDU header.
Modified IRFs with true energy scaled by a given factor can be created to evaluate the systematic uncertainty in the light collection efficiency. This can be done by setting a value different from one for the “scale_true_energy” argument present in the DataBinning Component of the configuration file of the IRF creation Tool. (The true energy of the MC events will be scaled before filling the IRFs histograms when pyirf commands are used. The effects expected are a non-diagonal energy dispersion matrix and a different spectrum).
Classes
|
lstchain.tools.lstchain_fit_intensity_scan Module
Classes
|
Tool that generates a HDF5 file with the results of the fit of the signal of an intensity scan (filter scan in the case of LST), this is useful to estimate the quadratic noise term to include in the standard F-factor formula |