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

Synopsis

Call Sherpa commands from S-Lang

Syntax

Integer_Type sherpa_eval(String_Type)

Description

The sherpa_eval() function allows S-Lang code to execute Sherpa commands. To do this, you create a string which contains the command to execute and pass it to sherpa_eval(), which returns a 0 on success and a -1 on failure.

In CIAO 3.0 there are a large number of commands that have equivalent S-Lang functions, so the need for this function has been reduced.

Example

() = sherpa_eval("method powell");

Here we change the method setting of Sherpa to "powell" from within a S-Lang script (the Sherpa module must have already been imported using 'require("sherpa");').

We use "() = " to ignore the return value of the call (i.e. whether it succeeded or not).

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.