Skip to the navigation links
Last modified: 26 October 2020


Bugs: PowLaw1D


PowLaw1D model evaluation fails at x=0.0

As the Sherpa powlaw1d (1-D power law) model is not defined at x=0.0, an attempt to evaluate this model at this value will result in a "model evaluation failed" error; the variable x is assumed to be > 0 for this model. For example, this will occur if the first energy bin (ENERG_LO) in the RMF response file being used in the spectral analysis is "0.0". In this case, the work-around is to alter the energy bin such that it is very close to, but greater than, 0. For example:

sherpa> rmf = unpack_rmf('xmm-mos1-thin-ao10.rmf') 

sherpa> print(rmf.energ_lo[0])

sherpa> rmf.energ_lo[0] = 1e-7 

sherpa> print rmf.energ_lo[0]