Last modified: December 2018

URL: http://cxc.harvard.edu/sherpa/ahelp/box1d.html
Jump to: Description · Example · ATTRIBUTES · Notes · Bugs · See Also


AHELP for CIAO 4.11 Sherpa v1

box1d

Context: models

Synopsis

One-dimensional box function.

Syntax

box1d

Description

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.


Example

>>> 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            0 -3.40282e+38  3.40282e+38           
   mdl.ampl     thawed            1           -1            1           

ATTRIBUTES

The attributes for this object are:

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 .


Bugs

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

See Also

models
box2d, const1d, delta1d, stephi1d, steplo1d