Last modified: December 2023

URL: https://cxc.cfa.harvard.edu/sherpa/ahelp/create_arf.html
AHELP for CIAO 4.16 Sherpa

create_arf

Context: data

Synopsis

Create an ARF.

Syntax

create_arf(elo, ehi, specresp=None, exposure=None, ethresh=None,
name='test-arf')

elo - numpy.ndarray
ehi - numpy.ndarray
specresp - None or array, optional
exposure - number or None, optional
ethresh - number or None, optional
name - str, optional

Description


Examples

Example 1

Create a flat ARF, with a value of 1.0 cm^2 for each bin, over the energy range 0.1 to 10 keV, with a bin spacing of 0.01 keV.

>>> egrid = np.arange(0.1, 10, 0.01)
>>> arf = create_arf(egrid[:-1], egrid[1:])

Example 2

Create an ARF that has 10 percent more area than the ARF from the default data set:

>>> arf1 = get_arf()
>>> elo = arf1.energ_lo
>>> ehi = arf1.energ_hi
>>> y = 1.1 * arf1.specresp
>>> arf2 = create_arf(elo, ehi, y, exposure=arf1.exposure)

PARAMETERS

The parameters for this function are:

Parameter Definition
elo The energy bins (low and high, in keV) for the ARF. It is assumed that ehi_i > elo_i, elo_j > 0, the energy bins are either ascending - so elo_i+1 > elo_i - or descending (elo_i+1 < elo_i), and that there are no overlaps.
ehi The energy bins (low and high, in keV) for the ARF. It is assumed that ehi_i > elo_i, elo_j > 0, the energy bins are either ascending - so elo_i+1 > elo_i - or descending (elo_i+1 < elo_i), and that there are no overlaps.
specresp The spectral response (in cm^2) for the ARF. It is assumed to be >= 0. If not given a flat response of 1.0 is used.
exposure If not None, the exposure of the ARF in seconds.
ethresh Passed through to the DataARF call. It controls whether zero-energy bins are replaced.
name The name of the ARF data set

Changes in CIAO

Added in CIAO 4.11


Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

data
create_rmf
sherpaish
save_arf