Analysis

class gammapy.analysis.Analysis(config)[source]

Bases: object

Config-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.

For more info see analysis - High-level interface.

Parameters
configdict or AnalysisConfig

Configuration options following AnalysisConfig schema

Attributes Summary

config

Analysis configuration (AnalysisConfig)

Methods Summary

get_datasets(self)

Produce reduced datasets.

get_flux_points(self)

Calculate flux points for a specific model component.

get_observations(self)

Fetch observations from the data store according to criteria defined in the configuration.

read_models(self, path)

Read models from YAML file.

run_fit(self[, optimize_opts])

Fitting reduced datasets to model.

set_models(self, models)

Set models on datasets.

update_config(self, config)

Attributes Documentation

config

Analysis configuration (AnalysisConfig)

Methods Documentation

get_datasets(self)[source]

Produce reduced datasets.

get_flux_points(self)[source]

Calculate flux points for a specific model component.

get_observations(self)[source]

Fetch observations from the data store according to criteria defined in the configuration.

read_models(self, path)[source]

Read models from YAML file.

run_fit(self, optimize_opts=None)[source]

Fitting reduced datasets to model.

set_models(self, models)[source]

Set models on datasets.

Parameters
modelsModels or str

Models object or YAML models string

update_config(self, config)[source]