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_data, 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-data, e.g. large files from the web that we don’t want to stick in gammapy-data.

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 from a YAML config file.
info([verbose, file]) Print basic info.

Attributes Documentation

DEFAULT_CONFIG_FILE = '/Users/jer/git/gammapy/gammapy/build/lib.macosx-10.7-x86_64-3.7/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 from a YAML config file.

Parameters:
filename : str

YAML config file

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

Print basic info.