S-Lang(ID:2508/sla011)Stack-based postfix scripting language, first used in the JED editor, later elsewher besides. Later versions no longer stack-based John E. Davis Places Structures: References: External link: Online copy Extract: Introduction: What Are Sherpa And S-Lang? Introduction: What Are Sherpa And S-Lang? Sherpa is the modeling and fitting tool of CIAO software package. We have developed it with the primary goal that a user should be able to take full advantage of Chandra's unprecedented observational capabilities and be able to analyze data in up to four dimensions (energy E or wavelength , time t, and spatial location [x,y]) with a wide variety of models, optimization methods, and fit statistics. We have also made it as general as possible, so that users can analyze data from other X{ray missions (e.g., ROSAT, XMM) and from other wavebands. S-Lang is an interpreted language created by John Davis of the Center for Space Research at MIT. S-Lang is a popular language, with several hundred users, and several applications that use it as an extension language. Embedding such a language into an application can enhance its exibility and power by allowing users to more easily extend its capabilities. We have added S-Lang to CIAO, where it is currently used most heavily in ChIPS (Chandra Imaging and Plotting Software) and Sherpa. Extract: S-Lang Access To Sherpa Data S-Lang Access To Sherpa Data Embedding S-Lang in Sherpa was an important first step. This allows users to call their own S-Lang functions from Sherpa. But simply calling new S-Lang functions is of limited use unless such functions can analyze data that have already been read into Sherpa. Thus, we have added S-Lang functions that provide interfaces to Sherpa data structures. Among them are functions that copy Sherpa data from C++ to S-Lang variables. S-Lang scripts can now obtain copies of Sherpa data sets, and their associated errors and weights, as well as model values calculated from models fit to the data. Data residing in S-Lang variables can also be copied back into Sherpa. S-Lang scripts can now copy data from a Sherpa data set, perform some analysis on the data, and then copy the data back into Sherpa. A Sherpa model can then be fit to this modified data set. We also provide other S-Lang functions to access other Sherpa information (e.g., values and ranges or model parameters). The Sherpa documentation1 has a complete list of the S-Lang functions we provide, including examples using these functions. These functions are available from the Sherpa command line; they are also available from a S-Lang module we distribute along with Sherpa itself. S-Lang modules are shared objects which can be dynamically linked to other S-Lang applications. Sherpa S-Lang functions, and thus, a Sherpa fitting session, can be run from any other S-Lang application (e.g., ChIPS, slsh). Extract: User Models in S-Lang User Models in S-Lang Sherpa provides a number of mathematical and physical models to which data can be fit. But Sherpa cannot possibly provide every model that every user might want. Therefore, we provide an interface to models written in S-Lang. Users can write their own models in S-Lang and then load the model into Sherpa. Once the model is in Sherpa, it can be used just as a native Sherpa model would be - the syntax is identical. Resources
|