Datasets

class gammapy.datasets.Datasets(config=None)[source]

Bases: object

Download and access for all built-in datasets.

TODO: this isn’t used much at the moment and not documented. I added this before I decided to add gammapy_extra, and then this class wasn’t needed to access datasets for tests.

We still need something like this to manage files that aren’t in gammapy-extra, e.g. large files from the web that we don’t want to stick in gammapy-extra.

This class has overlap with the gammapy.data.DataManager class … maybe it should be merged or maybe it’s better to keep that one focused on HESS (and Fermi?) data management?

Parameters:

config : OrderedDict

Data manager configuration.

Attributes

datasets (list of Dataset objects) List of datasets

Attributes Summary

DEFAULT_CONFIG_FILE
info_table

Methods Summary

fetch_all([tags]) Fetch all datasets that match one of the tags.
fetch_one(name) Fetch one dataset.
from_yaml(filename) Create a DataManager from a YAML config file.
info([verbose, file]) Print basic info.

Attributes Documentation

DEFAULT_CONFIG_FILE = '/Users/deil/code/gammapy-docs/build/0.7/gammapy/build/lib.macosx-10.13-x86_64-3.6/gammapy/datasets/datasets.yaml'
info_table

Methods Documentation

fetch_all(tags='catalog')[source]

Fetch all datasets that match one of the tags.

fetch_one(name)[source]

Fetch one dataset.

classmethod from_yaml(filename)[source]

Create a DataManager from a YAML config file.

Parameters:

filename : str

YAML config file

info(verbose=False, file=None)[source]

Print basic info.