Skip to main content

Come analyze HEASARC, IRSA, and MAST data in the cloud! The Fornax Initiative is now welcoming all interested beta users.

Xspec Home Page

Loading a new model function

New model functions may be downloaded from the XSPEC additional models webpage at:
https://heasarc.gsfc.nasa.gov/docs/software/xspec/moremodels.html
or acquired privately. They are added using two commands:

  • initpackage, which prepares and compiles a library module containing them
  • lmod, which actually loads them into the program.
These commands are detailed in the XSPEC commands section of the manual, to which the user is referred. Any number of different model packages may be added to XSPEC from the prompt. The user has control over the directory from which models are loaded.

The lmod command requires write-access to the particular directory specified. This is because lmod uses the Tcl make package and package require mechanisms for automatic library loads and these require Tcl write an index file (pkgIndex.tcl) to the directory. Consequently we recommend using the Tcl load command instead of lmod if the library is being used by a number of users on a local network. Such a library can be loaded automatically by placing the command in the global_customize.tcl script (see the section “Customizing XSPEC” in the Overview (Chapter 4)).