Next, use Xspec to fit the spectrum. Again, since we will want to issue multiple commands, Hera GUI users are urged to use the Command Window.
To group the source spectrum using the Command Window, type:
A POW window will pop up and display the spectrum later on. Edit the parameters and file names as appropriate:
XSPEC> data mos1_grp.fits ! input data
XSPEC> ignore 0.0-0.2,6.6-** ! ignore unusable energy ranges, in keV
! set a range appropriate for the data
XSPEC> model wabs(pow+pow) ! set spectral model to two absorbed power laws
1:wabs:nH> 0.01 ! set model absorption column density to 1.e20
2:powerlaw:PhoIndex> 2.0 ! set the first model power law index to -2.0
3:powerlaw:norm> ! use the default model normalization
4:powerlaw:PhoIndex> 1.0 ! set the second model power law index to -1.0
5:powerlaw:norm> ! use the default model normalization
renorm ! renormalize the model spectrum
XSPEC> fit ! fit the model to the data
XSPEC> setplot energy ! plot energy along the X axis
XSPEC> plot ldata ratio ! plot two panels with the log of the data and
! the data/model ratio values along the Y axes
XSPEC> exit ! exit Xspec
Figure 7.6 shows the fit to the spectrum.