    Set the cosmological parameters used by X-Spec models.

set_xscosmo(h0, q0, l0)
h0 - number
q0 - number
l0 - number

Set the cosmological parameters (H_0, q_0, lambda_0) used by X-Spec. It is equivalent to the X-Spec cosmo

command [1] . The default values are h0=70, q0=0, and l0=0.73

>>> set_xscosmo(73, 0, 0.73)

PARAMETERS

The parameters for this function are:

Parameter
Definition
h0
The Hubble constant in km/s/Mpc.
q0
The deceleration parameter.
l0
The cosmological constant. If this is non-zero then the q0 parameter is ignored and the Universe is assumed to be flat.

References

[1] https://heasarc.gsfc.nasa.gov/xanadu/xspec/manual/XScosmo.html Note that this may refer to a newer version than the compiled version used by Sherpa; use `get_xsversion` to check.

XSPEC version

CIAO 4.16 comes with support for version 12.13.1e of the XSPEC models. This can be checked with the following:

% python -c 'from sherpa.astro import xspec; print(xspec.get_xsversion())'12.13.1e

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

December 2023