Code is conditional on the successful installation of Sherpa with access to XSpec models.
XSpec Installation: https://heasarc.gsfc.nasa.gov/xanadu/xspec/
Sherpa Installation: https://sherpa.readthedocs.io/en/latest/install.html
Source install with conda: https://sherpa.readthedocs.io/en/latest/developer/index.html#source-install-with-conda
Run example.py after installation and use it as a guide.