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 = '/home/docs/checkouts/readthedocs.org/user_builds/gammapy/conda/v0.6/lib/python3.5/site-packages/gammapy-0.6-py3.5-linux-x86_64.egg/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.