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/create_model.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 create_model Context: sherpa

Synopsis

Module functions to instantiate new source or instrument models.

Syntax

Integer_Type create_model(String_Type[,String_Type])
Integer_Type create_inst_model(String_Type[,String_Type])

Success/Error Return Values: 1/0

Arguments:

(1) Name of Sherpa model component (e.g., GAUSS)

(2) ID applied to that component (e.g., g)

Description

See the related Sherpa command CREATE for more information.

NOTE: In CIAO 3.1 the definition of INSTRUMENT BACK is required for fitting PHA data if either background file or background models have been defined. INSTRUMENT BACK is set automatically when the PHA data file is input to Sherpa, however it is deleted if the NEW background file is input for a given data set. Thus the new INSTRUMENT BACK has to be defined on the command line before starting a simultaneous fit with the new background file.

Example 1

Instantiate a polynomial model, and name it p:

sherpa> () = create_model("POLY","p")

Example 2

Instantiate an rsp instrument model, and name it a:

sherpa> () = create_inst_model("RSP","a")

Example 3

Instantiate a Gaussian model with default ID:

sherpa> () = create_model("GAUSS1D")
sherpa> SHOW
...
gauss1d[GAUSS1D]  (integrate: on)
    Param   Type      Value        Min        Max                 Units
    -----   ----      -----        ---        ---                 -----
 1   fwhm thawed         10 1.1755e-38 3.4028e+38                      
 2    pos thawed          0 -3.403e+38 3.4028e+38                      
 3   ampl thawed          1 -3.403e+38 3.4028e+38                      

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.