HDUIndexTable¶
-
class
gammapy.data.HDUIndexTable(data=None, masked=None, names=None, dtype=None, meta=None, copy=True, rows=None, copy_indices=True, **kwargs)[source]¶ Bases:
astropy.table.TableHDU index table.
See HDU index table.
Attributes Summary
VALID_HDU_CLASSValid values for HDU_CLASS.VALID_HDU_TYPEValid values for HDU_TYPE.base_dirBase directory. hdu_class_uniqueHDU classes (unique). hdu_type_uniqueHDU types (unique). obs_id_uniqueObservation IDs (unique). Methods Summary
hdu_location(obs_id[, hdu_type, hdu_class])Create HDULocationfor a given selection.location_info(idx)Create HDULocationfor 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([file])Print some summary info to stdout. Attributes Documentation
-
VALID_HDU_CLASS= ['events', 'gti', 'aeff_2d', 'edisp_2d', 'psf_table', 'psf_3gauss', 'psf_king', 'bkg_2d', 'bkg_3d']¶ Valid values for
HDU_CLASS.
-
VALID_HDU_TYPE= ['events', 'gti', 'aeff', 'edisp', 'psf', 'bkg']¶ 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)[source]¶ Create
HDULocationfor a given selection.Parameters: obs_id : int
Observation ID
hdu_type : str
HDU type (see
VALID_HDU_TYPE)hdu_class : str
HDU class (see
VALID_HDU_CLASS)Returns: location :
HDULocationHDU location
-
location_info(idx)[source]¶ Create
HDULocationfor a given row index.
-
classmethod
read(filename, **kwargs)[source]¶ Read HDU index table.
Parameters: filename :
Path, strFilename
-
row_idx(obs_id, hdu_type=None, hdu_class=None)[source]¶ Table row indices for a given selection.
Parameters: obs_id : int
Observation ID
hdu_type : str
HDU type (see
VALID_HDU_TYPE)hdu_class : str
HDU class (see
VALID_HDU_CLASS)Returns: idx : list of int
List of row indices matching the selection.
-