Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 28 September 2015

URL: http://cxc.harvard.edu/sherpa/bugs/set_analysis.html

Caveats: set_analysis


Caveats

In order to specify a value for the set_analysis() 'type' argument, 'quantity' must also be specified.

If one provides a 'type' value to set_analyis(), but not 'quantity', the value entered for 'type' gets misinterpreted as the data set 'id' argument. To avoid this error, the 'quantity' argument must also be specified.

For example, if one types:

sherpa> set_analysis("3c273", type="counts")
ArgumentTypeError: 'quantity' must be a string 

an error results because the syntax gets interpreted as 'set_analysis(id=1, quantity="3c273", type="counts")', which does not make sense; the default data set 'id=1' is assumed instead of the intended 'id="3c273"', and "3c273" is incorrectly entered as the 'quantity' value.

Workaround:

To avoid this set_analysis() error, both the 'quantity' and 'type' parameters should be provided; e.g.:

sherpa> set_analysis("3c273", "energy", "counts")

Last modified: 28 September 2015
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.