Last modified: December 2025

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

set_xscosmo

Context: modeling

Synopsis

Set the cosmological parameters used by X-Spec models.

Syntax

set_xscosmo(h0: float, q0: float, l0: float)

No return value.

Description

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


Example

>>> set_xscosmo(73, 0, 0.73)

PARAMETERS

The parameters for this function are:

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

References

[1] 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.18 comes with support for version 12.14.0k of the XSPEC models. This can be checked with the following:

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

Bugs

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

See Also

modeling
get_xscosmo