About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/nestedmodel.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 nestedmodel Context: sherpa

Synopsis

Nested models define the function argument on which a model expression is evaluated to be another model expression. A nested model, <nested_model>, appears as an element of a model expression, <modelExpr>.

Syntax

<sherpa_modelname>{<model_stackname>}
<sherpa_modelname>[<modelname>]{<model_stackname>}
<modelname>{<model_stackname>}

where <model_stackname> must be enclosed in curly braces, { }, and
where the model stack defines the model expression for the function
argument.

Example 1

Create a nested model that defines one model component as the argument for another:

sherpa> ERASE ALL
sherpa> oscillation = SIN
sherpa> SRC = SHLOGE{oscillation}

The user first assigns a model stackname to the Sherpa default model SIN. The final command establishes the nested model, SHLOGE, and assigns it to the source model for dataset number 1. This nested model defines the function argument SIN, over which the model component SHLOGE is to be evaluated. Note that the following syntax is not allowed: SRC = SHLOGE{SIN}.

Example 2

Create two layers of nested models:

sherpa> stackA = POLY
sherpa> stackB = GAUSS{stackA}
sherpa> SIN[modeli]
sherpa> SOURCE = modeli{stackB}

The command stackA = POLY creates the first model stack. The next command creates a second model stack, using the nested model construction, GAUSS{stackA}, where the function argument on which the model component GAUSS is evaluated is the first model stack. Finally, the source model expression is defined as the nested model modeli{stackB} (i.e., modeli evaluated upon the second model stack).

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.