|
|
|
|
SynopsisHow to start SherpaCL, the CIAO 3.4-like interface to Sherpa and ChIPS in CIAO 4 Syntaxunix% sherpacl [options] [file1 .. fileN] Use the --help flag to list the available options. DescriptionThe SherpaCL application can be started using the "sherpacl" command, which will display a banner and then leave you at the prompt, at which you can enter commands: unix% sherpacl ------------------------------------------------------- Welcome to SherpaCL: CXC's Modeling and Fitting Program ------------------------------------------------------- Version: 0.1 - October 2009 Type AHELP for help. Type SYNTAX command for the syntax of the command. Type EXIT, QUIT, or BYE to leave the program. Solar Abundance Vector set to angr: Anders E. & Grevesse N. Geochimica et Cosmochimica Acta 53, 197 (1989) Cross Section Table set to bcmc: Balucinska-Church and McCammon, 1998 sherpacl> The application can be exited by using one of the following (noting that commands are case insensitive):
History fileCommands from previous runs of SherpaCL are stored in a history file - $HOME/.sherpacl-hist - which is loaded into SherpaCL at start up. This history can be accessed using the standard history mechanism: up arrow to scan through previous lines and control-r to start a search of the history. There is no logging to the $HOME/.sherpa-session-PID files that occured in CIAO 3.4. Filename completionThere is basic support for filename completion; it should be improved over that in CIAO 3.4. There is currently no support for command completion. Running scriptsA file of Sherpa and ChIPS commands can be run either by listing it after the SherpaCL command name, or via the USE command at the prompt. So, to execute the commands in sherpa.shp (the suffix need not be .shp) you can use either of the following: unix% sherpacl sherpa.shp sherpacl> USE sherpa.shp See the 'Command-line flags' and 'Batch mode' sections below for more information on controlling the behavior of SherpaCL when processing the files. Note that you can now provide multiple command files on the command line; in CIAO 3.4 you could only process one file. Command-line flagsA list of command-line flags supported by SherpaCL can be found by using the --help switch:
unix% sherpacl --help
Usage: sherpacl [options] [file1 .. fileN]
An interactive interface that allows users to use CIAO 3.4 syntax for Sherpa
and ChIPS commands in CIAO 4. The language that can be used is currently
somewhat limited. If the file ~/.sherpacl.rc exists then it will be processed
before any other file or user input.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-l LANG, --lang=LANG What language to use: python or slang [default:
python]
-b, --batch Run in batch mode? [default: False]
-d, --debug Run in debug mode? [default: False]
-c, --convert Should the converted command be displayed? [default:
False]
--lang and --convertThe sherpacl application can act as a "convertor", displaying the CIAO 4 version of the command a user has just entered. This can be turned on or off from within the application using the CONVERT command, but it can also be set by using the --convert command-line flag. The language to convert to (S-Lang or Python) is controlled by the --lang flag. --batchIf used, SherpaCL will process any command-line files and then exit the application. Without this flag the application will leave you at the interactive prompt after processing the files. Using the --batch flag will also stop the Sherpa banner from being displayed, and run ChIPS plots with the "REDRAW" setting turned off (so no on-screen output will be created). Resource files and customizing SherpaCLThe contents of $HOME/.sherpacl-state-rc and $HOME/.sherpacl.rc will be processed, in this order, before any command-line files or the interactive prompt is displayed. The .sherpacl-state-rc file can be created by the save_state() command (see 'AHELP SAVE_STATE' from within SherpaCL), and the .sherpacl.rc file can consist of anything that can be entered at the SherpaCL prompt: Sherpa or ChIPS commands and single-line S-Lang statements. A message will be displayed to the screen when the resource file is processed. So, with unix% cat ~/.sherpacl.rc # Aliases alias lpfd n= : lp fit $n delch $n alias lpfr n=1 : lp fit $n resid $n # Configure Sherpa set_log; unix% sherpacl ... Cross Section Table set to bcmc: Balucinska-Church and McCammon, 1998 ==> Processing contents of /home/sherpa/.sherpacl.rc Adding alias for lpfd Adding alias for lpfr sherpacl> where ALIAS is a new command that creates aliases for command commands (see 'AHELP ALIAS' frm within SherpaCL for more information). Unlike CIAO 3.4, only $HOME is searched for these files; the environment variables $SHERPARC and $SHERPA_STATE_RC, and the current working directory are not used to locate these resource files. No ChIPS resource fileThere is no atempt to load a ChIPS resource file in this version of SherpaCL. CHANGES FROM CIAO 3.4This section describes differences in starting the SherpaCL application to starting Sherpa in CIAO 3.4. For information on how using the applications differs, and what changes there are to commands, enter 'AHELP SHERPA' from within the SherpaCL application. Multiple command files can be processedMultiple command files can be given when sherpacl is started. New --convert and --lang flagsNew flags have been added to control the conversion to CIAO 4 syntax. See "AHELP CONVERT" from within SherpaCL for more information. At present there is no way to change the output for the converted commands to a file using command-line flags. No --slscript flagThere is no --slscript option. Resource files only loaded from $HOMEThe resource files, used to configure the application, are now only searched for in $HOME. The file names have also changed ("sherpa" to "sherpacl"). |
![]() |
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. |