|
|
|
|
SherpaCL - the CIAO 3.4-style command-line interface to Sherpa and ChIPS
This application is provided with limited support and testing; please check your results carefully. If you have questions about, or problems with, the SherpaCL application then please submit them to us via the CXC Helpdesk. The following information is available:
Starting SherpaCLFirst check that the latest version of the CIAO contributed scripts file is installed: if the date is earlier than shown below then follow the installation instructions to get the latest version. unix% cat $ASCDS_CONTRIB/VERSION.CIAO_scripts 03 Nov 2009 The application can then be started using the name sherpacl, and help is available using ahelp sherpacl. After displaying a banner, a prompt is displayed at which commands can be entered: 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> data src.pi => Loading dataset 1 from src.pi read ARF file src.arf read RMF file src.rmf read background file bgnd.pi sherpacl> subtract sherpacl> notice energy 0.5:6 sherpacl> source = xsphabs[gal] * xsmekal[clus] gal.nh parameter value [1.0] clus.kt parameter value [1.0] clus.nh parameter value [1.0] clus.abundanc parameter value [1.0] clus.redshift parameter value [0.0] clus.switch parameter value [1.0] clus.norm parameter value [0.73388922635] sherpacl> show source Expression: (gal * clus) xsphabs.gal (integrate: on) Param Type Value Min Max Units ----- ---- ----- --- --- ----- gal.nh thawed 1.00607 0 100000 10^22 atoms / cm^2 xsmekal.clus (integrate: on) Param Type Value Min Max Units ----- ---- ----- --- --- ----- clus.kt thawed 0.98284 0.0808 79.9 keV clus.nh frozen 1 1e-05 1e+19 cm-3 clus.abundanc frozen 1 0 1000 clus.redshift frozen 0 0 10 clus.switch frozen 1 0 1 clus.norm thawed 0.000733889 0.000733889 733.889 sherpacl> ahelp lp ... sherpacl> lp fit sherpacl> log sherpacl> fit ... Getting help within SherpaCLThe application provides the AHELP command, which accesses its own help documentation. You can use:
Using SherpaCL to convert to CIAO 4 syntaxThe CONVERT command is used to display the CIAO 4 version of any supported CIAO 3.4 command: sherpacl> paramprompt off Model parameter prompting is off sherpacl> convert on Convert setting is on, output to screen sherpacl> source = xsphabs[gal] * xsmekal[src] -> set_source(xsphabs.gal*xsmekal.src) sherpacl> notice energy 0.5:6 -> notice_id(1,0.5,6.0) sherpacl> The default is to print the converted commands to the screen, but they can also be sent to a file. So, to convert the contents of fit.shp to fit.py you would say
sherpacl> !cat fit.shp
#
# A simple test of Sherpa capabilities
#
data ../data/src.pi
subtract
notice energy 0.5:6
source = xsphabs[gal] * xsmekal[clus]
thaw clus.abundanc
fit
lplot fit
log
covar
sherpacl> convert to fit.py
Convert setting is on, output to fit.py
sherpacl> use fit.shp
...
sherpacl> convert off
Convert setting is off
sherpacl> !cat fit.py
# USE: Inserting contents of fit.shp
#
# A simple test of Sherpa capabilities
#
load_data("../data/src.pi")
subtract()
notice_id(1,0.5,6.0)
set_source(xsphabs.gal*xsmekal.clus)
thaw(clus.abundanc)
fit()
plot_fit()
log_scale()
covar()
Functionality and LimitationsSimple analysis sessions of PHA, ASCII, and image files are possible in SherpaCL. There is limited support for defining and using complicated instrument models, or for long-running sessions in which many datasets, models, and instrument models are created and then destroyed or over-written. SyntaxIn general the syntax is the same, but some changes have been made; mostly new capabailites have been added to commands - such as the "BY" option of the GROUP command - but some options or text that was valid in CIAO 3.4 will not be recognized by SherpaCL. CommandsThere are a number of Sherpa commands, and most ChIPS commands, that are not currently supported. Some of these may be supported in a later release, although not all functionality from CIAO 3.4 can be supported in CIAO 4. S-LangThere is limited support for using S-Lang within SherpaCL. S-Lang statements can be used, but many of the Sherpa and ChIPS S-Lang routines - such as get_par, run_fit, and curve - are not available in this release of SherpaCL. Future developmentThe SherpaCL application is provided as an aid for Sherpa and ChIPS users who wish to use CIAO 4 but have too many scripts for CIAO 3.4, or do not have the time to learn the new syntax. At present it has limited capabilites; if you find it useful and would like to see SherpaCL enhanced please contact the CXC Helpdesk. |
![]() |
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. |