Skip to content

Commit

Permalink
Adjust XSPEC parameter names
Browse files Browse the repository at this point in the history
XSPEC 12.10.0 was released with two parameter names that can not be
mapped directly to Python: log(A) for grbcomp and log(mdot) for jet.
The XSPEC team plan to rename them to log_A and log_mdot (as done
with other parameters), so switch to this naming scheme.

The xilconv and rfxconv models contain log(xi) parameter names, but
we currently do not provide a Python class for these models, so are
not an issue for this update.
  • Loading branch information
DougBurke committed May 21, 2018
1 parent cb113fb commit 9ad6639
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sherpa/astro/xspec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ class XSgrbcomp(XSAdditiveModel):
If set to 0 then only the first-order bulk Comptonization term is
considered, otherwise if set to 1 then the second-order term
is computed (see [1]_ for more details).
logA
log_A
The geometrical covering factor which determines the relative
weights of the seed and comptonized spectra to the total flux.
z
Expand Down Expand Up @@ -2597,11 +2597,11 @@ def __init__(self, name='grbcomp'):
self.tau = Parameter(name, 'tau', 5.0, 0.0, 200., 0.0, 200.)
self.beta = Parameter(name, 'beta', 0.2, 0.0, 1.0, 0.0, 1.0)
self.fbflag = Parameter(name, 'fbflag', 0.0, 0.0, 1.0, 0.0, 1.0, frozen=True)
self.logA = Parameter(name, 'logA', 5.0, -8., 8., -8., 8., frozen=True)
self.log_A = Parameter(name, 'log_A', 5.0, -8., 8., -8., 8., frozen=True)
self.z = Parameter(name, 'z', 0.0, 0.0, 10., 0.0, 10., frozen=True)
self.a_boost = Parameter(name, 'a_boost', 5.0, 0., 30., 0., 30., frozen=True)
self.norm = Parameter(name, 'norm', 1.0, 0.0, 1.0e24, 0.0, hugeval)
XSAdditiveModel.__init__(self, name, (self.kTs, self.gamma, self.kTe, self.tau, self.beta, self.fbflag, self.logA, self.z, self.a_boost, self.norm))
XSAdditiveModel.__init__(self, name, (self.kTs, self.gamma, self.kTe, self.tau, self.beta, self.fbflag, self.log_A, self.z, self.a_boost, self.norm))


class XSgrbm(XSAdditiveModel):
Expand Down Expand Up @@ -9466,7 +9466,7 @@ class XSjet(XSAdditiveModel):
Black hole mass, in solar masses.
Dco
Comoving distance, as in XSoptxagnf.
logmdot
log_mdot
log (accretion power / Eddington luminosity), in units of
log L / logLEdd. See [1]_ for a full discussion of this parameter.
thetaobs
Expand Down Expand Up @@ -9522,7 +9522,7 @@ def __init__(self, name='jet'):
units='solar', frozen=True)
self.Dco = Parameter(name, 'Dco', 3350.6, 1., 1e8, 1., 1e8,
units='Mpc', frozen=True)
self.logmdot = Parameter(name, 'logmdot', -1., -5., 2., -5., 2.,
self.log_mdot = Parameter(name, 'log_mdot', -1., -5., 2., -5., 2.,
units='logL/lEdd')
self.thetaobs = Parameter(name, 'thetaobs', 3., 0., 90., 0., 90.,
units='deg', frozen=True)
Expand All @@ -9540,10 +9540,12 @@ def __init__(self, name='jet'):
self.s1 = Parameter(name, 's1', 1., -1., 1., -1., 1., frozen=True)
self.s2 = Parameter(name, 's2', 2.7, 1., 5., 1., 5., frozen=True)
self.z = Parameter(name, 'z', 0.0, 0., 10., 0., 10., frozen=True)
# Note: alwaysfrozen is set for norm based on the documentation,
# since there's no way to determine this from the model.dat file
self.norm = Parameter(name, 'norm', 1.0, 0.0, 1.0e24, 0.0, hugeval,
alwaysfrozen=True)
XSAdditiveModel.__init__(self, name,
(self.mass, self.Dco, self.logmdot, self.thetaobs,
(self.mass, self.Dco, self.log_mdot, self.thetaobs,
self.BulkG, self.phi, self.zdiss, self.B, self.logPrel,
self.gmin_inj, self.gbreak, self.gmax, self.s1,
self.s2, self.z, self.norm))
Expand Down

0 comments on commit 9ad6639

Please sign in to comment.