asgardpy.analysis.analysis module¶
Config-driven high level analysis interface.
- class asgardpy.analysis.analysis.AsgardpyAnalysis(config)[source]¶
Bases:
objectConfig-driven high level analysis interface.
It is initialized by default with a set of configuration parameters and values declared in an internal high level interface model, though the user can also provide configuration parameters passed as a nested dictionary at the moment of instantiation. In that case these parameters will overwrite the default values of those present in the configuration file.
A specific example of an upgrade of the configuration parameters is when the Target Models information is provided as a path to a separate yaml file, which is readable with AsgardpyConfig. In this case, the configuration used in AsgardpyAnalysis is updated in the initialization step itself.
- Parameters:
config (dict or AsgardpyConfig) – Configuration options following AsgardpyConfig schema
- add_to_instrument_info(info_dict)[source]¶
Update the name, Degrees of Freedom and spectral energy ranges for each instrument Datasets, to be used for the DL4 to DL5 processes.
- get_correct_ebl_deabs_flux_points()[source]¶
After running the get_correct_intrinsic_model function, this function will use the intrinsic model as the reference spectral model to get the flux points for the intrinsic spectra. This function uses the workaround as described in Gammapy v1.3.
- get_correct_intrinsic_model()[source]¶
After running the Fit analysis step, one can retrieve the intrinsic or EBL-deabsorbed spectra. This function is just an accessory to the feature in Gammapy v1.3.
- run(steps=None, **kwargs)[source]¶
Main function to run the AnalaysisSteps provided.
Currently overwrite option is used from the value in AsgardpyConfig, and is True by default.
- run_dl3_dl4_steps(dl3_dl4_steps, kwargs)[source]¶
Distinct analysis steps for Dataset reduction from DL3 to DL4 data products.
- run_dl4_dl5_steps(dl4_dl5_steps, kwargs)[source]¶
Distinct analysis steps for Joint-Likelihood fitting and transforming DL4 to DL5 data products.
- update_dof_value()[source]¶
Simple function to update total Degrees of Freedom value in the instrument_spectral_info dict from a filled final_model object.
- update_models_list(models_list)[source]¶
This function updates the final_model object with a given list of models, only if the target source has a Spatial model included.
This step is only valid for 3D Datasets, and might need reconsideration in the future.
- property config¶
Analysis configuration (AsgardpyConfig)
- property models¶
Display the assigned Models.