    One-dimensional box function.

box1d

The model is flat between xlow and xhi (both limits are inclusive), where it is set to the ampl parameter. Outside this range the model is zero.

>>> create_model_component("box1d", "mdl")
>>> print(mdl)

Create a component of the box1d model and display its default parameters. The output is:

mdl Param Type Value Min Max Units ----- ---- ----- --- --- ----- mdl.xlow thawed 0 -3.40282e+38 3.40282e+38 mdl.xhi thawed 1 -3.40282e+38 3.40282e+38 mdl.ampl thawed 1 -3.40282e+38 3.40282e+38

ATTRIBUTES

The attributes for this object are:

Attribute
Definition
xlow
Coordinate of the lower cut-off.
xhi
Coordinate of the upper cut-off.
ampl
The amplitude of the box.

Notes

The functional form of the model for points is:

f(x) = ampl if xlow <= x <= xhi = 0 otherwise

and for an integrated grid it is:

f(lo,hi) = ampl if lo >= xlow and hi <= xhi = 0 if hi <= xlow or lo >= xhi = ampl * g where g is the fraction of lo,hi that falls within xlo,xhi

This behavior is different to how the amplitude is handled in other models, such as const1d .

Changes in CIAO

The default value for the xhi parameter has been changed from 0 to 1, and the range of ampl now matches xlow and xhi rather than being set to -1 to 1.

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

December 2023