iact_estimator.io

Functions for input / output operations.

Functions

read_yaml(input_file_path)

Load data from a YAML file as a dictionary.

load_ebl(ebl_file_path)

Load Extragalactic Background Light (EBL) data.

load_performance_ecsv(input_file_path)

Load performance data from an ECSV file as a dictionary.

save_fits_hdu(hdu, output_path, **kwargs)

Save and HDU to a new FITS file.

Module Contents

iact_estimator.io.read_yaml(input_file_path)[source]

Load data from a YAML file as a dictionary.

Parameters:
input_file_pathstr or pathlib.Path

Path to the input YAML file.

Returns:
datadict

Contents of the YAML file in form of a Python dictionary.

iact_estimator.io.load_ebl(ebl_file_path)[source]

Load Extragalactic Background Light (EBL) data.

Parameters:
ebl_file_pathstr or ~pathlib.Path

Path to an EBL data file.

Returns:
zznp.array

TBD.

energies~astopy.units.Quantity

Energy values.

tausnp.array

TBD.

Notes

This is a legacy function which works only with the default data file packages with iact-estimator.

iact_estimator.io.load_performance_ecsv(input_file_path)[source]

Load performance data from an ECSV file as a dictionary.

Parameters:
input_file_pathstr

Path to the input ECSV file.

Returns:
table~astropy.table.QTable

Contents of the YAML file in form of a Python dictionary.

iact_estimator.io.save_fits_hdu(hdu, output_path, **kwargs)[source]

Save and HDU to a new FITS file.

Parameters:
hduHDU-like class from astropy.io.fits

Primary, Image or Table-HDU.

output_pathstr or ~pathlib.Path

Complete path to the saved file.

**kwargsdict

Options for the ~astropy.io.fits.PrimaryHDU.writeto() method.