HDUIndexTable#
- class gammapy.data.HDUIndexTable[source]#
Bases:
Table
HDU index table.
See HDU index table.
Attributes Summary
Valid values for
HDU_CLASS
.Valid values for
HDU_TYPE
.Base directory.
HDU classes (unique).
HDU types (unique).
Observation IDs (unique).
Methods Summary
hdu_location
(obs_id[, hdu_type, hdu_class, ...])Create
HDULocation
for a given selection.location_info
(idx)Create
HDULocation
for a given row index.read
(filename, **kwargs)Read HDU index table.
row_idx
(obs_id[, hdu_type, hdu_class])Table row indices for a given selection.
summary
()Summary report as a string.
Attributes Documentation
- VALID_HDU_CLASS = ['events', 'gti', 'aeff_2d', 'edisp_2d', 'psf_table', 'psf_3gauss', 'psf_king', 'bkg_2d', 'bkg_3d', 'rad_max_2d', 'pointing']#
Valid values for
HDU_CLASS
.
- VALID_HDU_TYPE = ['events', 'gti', 'aeff', 'edisp', 'psf', 'bkg', 'rad_max', 'pointing']#
Valid values for
HDU_TYPE
.
- base_dir#
Base directory.
- hdu_class_unique#
HDU classes (unique).
- hdu_type_unique#
HDU types (unique).
- obs_id_unique#
Observation IDs (unique).
Methods Documentation
- hdu_location(obs_id, hdu_type=None, hdu_class=None, warn_missing=True)[source]#
Create
HDULocation
for a given selection.- Parameters:
- obs_idint
Observation ID.
- hdu_typestr, optional
HDU type (see
VALID_HDU_TYPE
). Default is None.- hdu_classstr, optional
HDU class (see
VALID_HDU_CLASS
). Default is None.- warn_missingbool, optional
Warn if no HDU is found matching the selection. Default is True.
- Returns:
- location
HDULocation
HDU location.
- location
- classmethod read(filename, **kwargs)[source]#
Read HDU index table.
- Parameters:
- filename
pathlib.Path
or str Filename.
- **kwargsdict, optional
Keyword arguments passed to
read
.
- filename
- row_idx(obs_id, hdu_type=None, hdu_class=None)[source]#
Table row indices for a given selection.
- Parameters:
- obs_idint
Observation ID.
- hdu_typestr, optional
HDU type (see
VALID_HDU_TYPE
). Default is None.- hdu_classstr, optional
HDU class (see
VALID_HDU_CLASS
). Default is None.
- Returns:
- idxlist of int
List of row indices matching the selection.
- __init__(data=None, masked=False, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True, units=None, descriptions=None, **kwargs)#
- classmethod __new__(*args, **kwargs)#