Friday, February 26, 2010

Plotting updates

The plotting in xspec has been restructured for greater flexibility. The main changes are as follows:

1. Up to six plots can be put on a single page. eg "plot data resid ratio model"

2. There are options for the units on both x- and y-axis. "setplot energy" can now be used to plot the x-axis in keV, MeV, GeV, or Hz. "setplot wave" as the unit options angstrom, cm, micron, or nm. y-axis units are mostly modified in the obvious way depending on the x-axis choice. For setplot energy options any energies in the y-axis unit will be the same as chosen for the y-axis. The exception is for the choice of Hz when emodel/eufspec is in Jy and eemodel/eeufspec in ergs/cm^2/s. For setplot wave options energies in the y-axis unit are in ergs. An additional choice is available for setplot wave : the command "setplot wave perhz" will put y-axis units in /Hz. In this case the emodel/eufspec and eemodel/eeufspec units are the same as for setplot energy hz. The option can be turned off by "setplot wave perhz off".

3. "setplot redshift" can be used to shift energies in plots to the source frame assuming the redshift given. Note that this is not connected in any way to redshift parameters in the model and should only be used for illustrative purposes.

These changes are available in the Goddard development version and will be included in the next HEAsoft release.

xspec power-law models

Added option to peg all the power-law models (ie powerlaw, bknpow, bkn2pow, cutoffpl) in the same way that the pegged power-law operates. If POW_EMIN and POW_EMAX are set (using xset) then all these models will have their normalizations adjusted to be the flux in (POW_EMIN,POW_EMAX) in units of 1e-12 erg/cm2/s or, if POW_EMIN=POW_EMAX, the flux density at POW_EMIN in units of micro-Jy.

A couple of things to watch out for are : POW_EMIN and POW_EMAX should lie within the energy range being calculated; the xset command doesn't automatically update the model so either POW_EMIN or POW_EMAX should be set before defining the model or a parameter value should be changed immediately after the xset.

These changes will be included in the next heasoft release.