make_example_dataset

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

Make an 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’}

The dataset to use.

configdict or None

Configuration options.

Returns:
datasetExampleDataset

An 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   
>>> dataset.event_table   
>>> dataset.wcs   
>>> dataset.image   
>>> dataset.hdu_list