NAME

ftgetmodeldata - Download spectral model data file(s)

USAGE

ftgetmodeldata modelname modelversion localdir remotedir dryrun clobber

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 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 using wget:

wget https://heasarc.gsfc.nasa.gov/FTP/software/xspec/spectral/modelData

More details can be found in the Spectral Model Files page

PARAMETERS

modelname [string]
Which model to retrieve files. Options are:
modelversion [string]
The version number for those models which have versions which require different files. Options are:
(localdir="default") [string]
A hidden parameter to specify the local directory to download the file(s) to.
(remotedir="default") [string]
A hidden parameter to specify the remote directory which hosts the spectral files.
(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 print out which files would be downloaded if trying to retrieve every version of the xseqpair files:

  ftgetmodeldata xseqpair dryrun=true

SEE ALSO

LAST MODIFIED

November 2025