Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 13 March 2017

How can I plot my data in units of Counts versus Energy(keV)?


By default, Sherpa plots PHA data in units of Counts s-1keV-1 versus Energy(keV) when the chosen units for the spectral analysis is 'energy' ('set_analysis("energy")'). In order to plot data in Counts versus Energy(keV), change the unit type for the y-axis of a plot to "counts" with the set_analysis 'type' option, and set the 'factor' option to 0:

sherpa> set_analysis(2, "energy", "counts", factor=0)

This command sets the unit type for the axes of plots produced for data set 2, Energy (keV) for the x-axis and Counts for the y-axis. A 'factor' setting of 1 will produce plots in units of Counts*Energy(keV) versus Energy(keV), and a 'factor' setting of 2 will produce plots in units of Counts*Energy2(keV) versus Energy(keV).



Last modified: 13 March 2017
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.