Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 28 September 2015

URL: http://cxc.harvard.edu/sherpa/bugs/powlaw1d.html

Bugs: PowLaw1D


Bugs

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])
0.0

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

sherpa> print rmf.energ_lo[0]
1e-07

Last modified: 28 September 2015
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.