bayspec.model.user package

Submodules

bayspec.model.user.user module

Template for user-defined spectral models.

Copy this file and customize the +++++++editable area+++++++ blocks to define new components; expr, type, config and params control how the model participates in composition and fitting.

class bayspec.model.user.user.user[source]

Bases: Model

Example user-defined model scaffold; edit to implement your spectrum.

func(E, T=None, O=None)[source]

Evaluate the model spectrum at energies E.

Parameters:
  • E – Energy grid in keV; redshift correction is applied internally.

  • T – Time array in seconds; required for tinv-type models.

  • O – Nested model passed by a convolution operator; unused here.

Returns:

Photon spectrum N(E, T) in photons/cm²/s/keV for add/tinv types, or dimensionless F(E, T) for mul/math types.

Module contents

User-model templates; import bayspec.model.user.user.user to subclass.