bayspec.model.xspec package

Module contents

Bayspec wrappers for XSPEC additive and multiplicative models.

Walks the available xspec_models_cxc model list and synthesizes a bayspec Model subclass for each one under an XS_<name> alias. Additive XSPEC models get a logNorm parameter on top of the XSPEC-native parameter set. Helper functions (chatter, abund, xsect, cosmo) expose the XSPEC global state through wrappers.

bayspec.model.xspec.list_xspec_models()[source]

Return the XS_<name> aliases of every wrapped XSPEC model.

bayspec.model.xspec.chatter(val=None)[source]

Read or write XSPEC’s verbosity level; returns the current value when called with no argument.

bayspec.model.xspec.abund(val=None)[source]

Read or set the XSPEC elemental abundance table.

Parameters:

val – One of 'angr', 'aspl', 'feld', 'aneb', 'grsa', 'wilm', 'lodd', 'lpgp'. None returns the current table.

Raises:

ValueError – If val is not in the allowed list.

bayspec.model.xspec.xsect(val=None)[source]

Read or set the XSPEC photoelectric cross-section table.

Parameters:

val – One of 'bcmc', 'obcm', 'vern'; None returns the current table.

Raises:

ValueError – If val is not in the allowed list.

bayspec.model.xspec.cosmo(val=None)[source]

Read or set the XSPEC cosmology.

Parameters:

val – Dict with keys h0, lambda0, q0; None returns the current cosmology.

Raises:

ValueError – If val does not carry exactly those keys.