About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: 14 February 2007

URL: http://cxc.harvard.edu/sherpa3.4/bugs/sl_get_net_counts_sum.html
Hardcopy (PDF): A4 | Letter

S-lang-related Bugs: get_net_counts_sum


Bugs

  1. Incorrect results when multiple datasets are loaded [New](14 Feb 2007)


Bugs

  1. Incorrect results when multiple datasets are loaded [New](14 Feb 2007)

    When multiple datasets are read in, get_net_counts_sum uses the backscale value incorrectly, which leads to the wrong number of counts being returned.

    Workaround:

    Use the following procedure in place of the get_net_counts_sum command. In this example, we are finding the net counts for dataset 3.

    data 1 dat1.pha
    data 2 dat2.pha
    data 3 dat3.pha
    variable foo = get_flux_str();
    foo.range = [0.5,10];
    foo.dataset = 3;
    variable tot= (get_dcounts_sum(foo).value);
    variable bgd = (get_bdcounts_sum(foo).value);
    variable bscal=(get_backscale(3));
    variable bscalebg=(get_bbackscale(3));
    variable scale3=(bscal/bscalebg);
    variable net=(tot-(bgd*scale3));
    print(net);
    
Hardcopy (PDF): A4 | Letter
Last modified: 14 February 2007


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