Overview of asgardpy¶
Main structure¶
The package is structured in 2 ways -
Analysis Steps¶
The configuration-based pipeline separates the Gammapy-based High-Level Analysis into serialized intermediate steps.
Check analysis_step_base for more details.
The steps are:
datasets-3d
Datasets3DAnalysisStepdatasets-1d
Datasets1DAnalysisStepfit
FitAnalysisStepflux-points
FluxPointsAnalysisStep
The main purpose of this pipeline is accomplished for -
Reducing DL3 data from multiple gamma-ray astronomical instruments to a joint DL4 dataset.
update the joint DL4 data with appropriate Gammapy Models object.
perform DL4 to DL5 (SED only) after performing joint-likelihood fitting.
DL3 Data component¶
The “DL3 level” data files for any instrument is read by providing the path location and a search glob pattern in the Config file. These are read
by the DL3Files.
The main modules dealing with the 2 types of data being read are -
3D Dataset
dataset_3d1D Dataset
dataset_1d
They each build their Config components using classes defined with,
a base in
base,from distinct modules -
and from their own respective modules
The processing of Dataset creation is performed by Dataset3DGeneration and Dataset1DGeneration
For the DL3 files with energy-dependent directional (RAD_MAX) cuts, the ON region is defined by a PointSkyRegion whereas for files with global cuts, the ON region is defined by a CircleSkyRegion.
The usage of either of these can be generalized by providing the source sky position with a value of radius as 0 deg (by default) or a non-zero angular radius, respectively.
Following Gammapy v1.3 we have the usage of parallel processing for DL4 Dataset creation, Flux Points Estimation among others.
For the first two processes, here we have the parameters of n_jobs and parallel_backend defined in GeneralConfig as can be seen in AsgardpyConfig.
Models¶
The asgardpy.data.target module: Classes contains various classes for various Models objects and asgardpy.data.target module: Functions contains various functions for handling them.
The information regarding the model to be used for the target source is given by Target and the various input options are -
Include the model information in
componentsInclude the path for a separate model file in
models_fileUse
from_3d= True, if the model is included in the list of Models provided with the 3D Dataset
While combining DL4 datasets from multiple instruments, the positions of the target source, included within these data, may not be exactly the same.
This will cause computation issue for the binned analysis performed with Gammapy. To resolve this issue, use use_uniform_position = True.
The apply_selection_mask_to_models function is used to apply various selections on the given list of models.
High-level Analysis¶
The various Config components and Analysis steps for the high-level analysis can be found in dl4.
For the analysis step of flux-points FluxPointsAnalysisStep, the flux points are estimated for each instrument dataset, using the respective energy ranges
provided in the respective config section of spectral_energy_range.
For deriving the correct EBL-deabsorbed spectrum, one can use get_correct_intrinsic_model and
get_correct_ebl_deabs_flux_points after running the flux-points analysis step.
Statistics¶
The stats contains various functions to perform some statistics with the fitted DL4 datasets.
One can perform tests on the preference of the assumed spectral model of the target source, by using either check_model_preference_lrt or check_model_preference_aic.