Synopsis
Two-dimensional box function.
Syntax
box2d
Description
The model is flat between the limits, where it is set to the ampl parameter. Outside this range the model is zero.
Example
>>> create_model_component("box2d", "mdl") >>> print(mdl)
Create a component of the box2d 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 0 -3.40282e+38 3.40282e+38 mdl.ylow thawed 0 -3.40282e+38 3.40282e+38 mdl.yhi thawed 0 -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 | The lower edge of the box ( x0 axis). |
xhi | The upper edge of the box ( x0 axis). |
ylow | The lower edge of the box ( x1 axis). |
yhi | The upper edge of the box ( x1 axis). |
ampl | The amplitude of the box. |
Notes
The functional form of the model for points is:
f(x0,x1) = ampl if xlow <= x0 <= xhi ylow <= x1 <= yhi = 0 otherwise
and for an integrated grid it is:
f(x0lo,x0hi,x1lo,x1hi) = 0 if x0hi <= xlow or x0lo >= xhi or x1hi <= ylow or x1lo >= yhi = ampl * g where g is the fraction of the pixel that falls within the region
This behavior is different to how the amplitude is handled in other models, such as const2d .
Bugs
See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.