NAME
ftgetmodeldata - Download spectral model data file(s)
USAGE
ftgetmodeldata modelname modelversion
DESCRIPTION
This tool will download spectral data files from the HEASARC to a local computer. These files are necessary for loading some of the Xspec models.
The spectral model data files were previously included in the HEASoft distribution, stored in heasoft/Xspec/src/spectral/modelData and installed in heasoft/spectral/modelData. Starting with HEASoft version 6.37, the distribution no longer includes the spectral model files. With this tool ftgetmodeldata, users and administrators now download the requested files after HEASoft installation.
To determine if a desired model requires a spectral model data file, reference https://heasarc.gsfc.nasa.gov/FTP/software/xspec/spectral/modelDataFiles.csv. Models listed in that CSV do require a file.
The tool uses the curl library in order to download files. If curl is not available on the user's machine, then the files can be downloaded from tarballs or using wget.
More details and alternatives can be found in the spectral model data files page.
PARAMETERS
- modelname [string]
- Which model to retrieve files. Options are:
- <model name> - to retrieve only files required by that specific model
- "all" - to retrieve files for all models which require files
- modelversion [string]
- The version number for those models which have versions which require different files. Options are:
- <version number> - to retrieve only this specific version files for the specified modelname
- "latest" - to retrieve all files valid for the latest release. The "latest release" is the version of heasoft being used to call this tool
- "all" - to retrieve all files, including obsolete versions. Most users do not need this option.
- (xspecversion="none") [string]
- The Xspec version number to download files for a specific Xspec release. Options are:
- "none" - Default. Does not filter by Xspec version; instead, uses the modelname and modelversion parameters.
- <version> - e.g. "12.14.0" to retrieve all model files that were included in that specific Xspec release. Note that this works in conjunction with the modelname parameter and independently of the modelversion parameter. If xspecversion is entered, then the modelversion parameter is ignored.
- (localdir="default") [string]
- A hidden parameter to specify the local directory to download the file(s) to.
- </path/to/desired/dir> - where the files will be dowloaded to. If the directory doesn't exist, the tool will attempt to create it.
- "default" - the historical location of the installed model data files. In most cases, that is $HEADAS/../spectral/modelData. In conda and docker installations, that is $HEADAS/spectral/modelData.
- (remotedir="default") [string]
- A hidden parameter to specify the remote directory which hosts the spectral files.
- <URL> - a URL which hosts the files
- "default" - https://heasarc.gsfc.nasa.gov/FTP/software/xspec/spectral/modelData
- (dryrun=no) [bool]
- A hidden parameter which enables testing the command. Only prints to standard output what would be downloaded. Does not download anything.
- (clobber=no) [bool]
- A hidden parameter which tells the tool if any existing files should be overwritten.
EXAMPLES
To download all the latest release files for all models:
ftgetmodeldata modelname="all" modelversion="latest"
To download all the files for all the models, including obsolete versions:
ftgetmodeldata modelname="all" modelversion="all"
To download only the 3.0.9 versions of the apec files:
ftgetmodeldata modelname="apec" modelversion="3.0.9"
To download the current release files of the apec files:
ftgetmodeldata modelname="apec" modelversion="latest"
To download every version of the apec files:
ftgetmodeldata modelname="apec" modelversion="all"
To download all model files that were included in XSPEC 12.14.0:
ftgetmodeldata modelname="all" xspecversion="12.14.0"
To download the apec family of model files that were included in XSPEC 12.13.0:
ftgetmodeldata modelname="apec" xspecversion="12.13.0"
To print out, without downloading, which files would be downloaded if trying to retrieve every version of the eqpair files:
ftgetmodeldata eqpair dryrun=true
SEE ALSO
More details and alternatives can be found in the spectral model data files page.
LAST MODIFIED
April 2026