make_example_dataset

regions.make_example_dataset(data='simulated', config=None)[source]

Make example dataset.

This is a factory function for ExampleDataset objects.

The following config options are available (default values shown):

  • crval = 0, 0
  • crpix = 180, 90
  • cdelt = -1, 1
  • shape = 180, 360
  • ctype = 'GLON-AIT', 'GLAT-AIT'
Parameters:
data : {‘simulated’, ‘fermi’}

Which dataset to use

config : dict or None

Configuration options

Returns:
dataset : ExampleDataset

Example dataset object

Examples

Make an example dataset:

>>> from regions import make_example_dataset
>>> config = dict(crpix=(18, 9), cdelt=(-10, 10), shape=(18, 36))
>>> dataset = make_example_dataset(data='simulated', config=config)

Access properties of the dataset object:

>>> dataset.source_table   # doctest: +IGNORE_OUTPUT
>>> dataset.event_table   # doctest: +IGNORE_OUTPUT
>>> dataset.wcs   # doctest: +IGNORE_OUTPUT
>>> dataset.image   # doctest: +IGNORE_OUTPUT
>>> dataset.hdu_list   # doctest: +IGNORE_OUTPUT