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

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/get_paramestint.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 get_paramestint Context: sherpa

Synopsis

Module functions to retrieve the value and statistic arrays from the most recent run of a parameter estimation method

Syntax

Struct_Type get_intunc()
Struct_Type get_intproj()

Error Return Value: NULL

Description

These functions retrieve information from the most recent run of the INTERVAL-UNCERTAINTY or run_intunc, and INTERVAL-PROJECTION or run_intproj parameter estimation methods, respectively.

Each returns a structure with five fields:

  • x0: the grid of parameter values;
  • y: the statistics as a function of parameter value;
  • name: the name of the parameter;
  • bfit: the best-fit value of the parameter; and
  • config: a Struct_Type variable containing the parameters used to calculate x0 and y.

These functions can be used to retrieve information similar to that provided by the XSPEC command steppar.

Example

Fit a dataset; get information about chi-square as a function of power-law amplitude p.ampl after running INTERVAL-PROJECTION:

sherpa> DATA example.pha
sherpa> SUBTRACT
sherpa> PARAMPROMPT OFF
sherpa> SOURCE = POW[p]
sherpa> FIT
...
sherpa> INTERVAL-PROJECTION p.ampl
Interval-Projection: computing grid size with covariance...done.
                     outer grid loop 20% done...
                     outer grid loop 40% done...
                     outer grid loop 60% done...
                     outer grid loop 80% done...
[...plot displayed...]
sherpa> intproj = get_intproj()
sherpa> print(intproj)
x0               =  Float_Type[20]
y                =  Float_Type[20]
name             =  p.ampl
bfit             =  0.000191983
config           =  sherpa_VisParEst_State
sherpa> printarr(intproj.x0,3)
0.000158651
0.000162159
0.000165668
sherpa> printarr(intproj.y,3)
197.622
195.83
194.238

The second-to-last call displays the first three values of the p.ampl grid, while the last call displays the best-fit statistic given those p.ampl values.

CHANGES IN CIAO 3.1

The structures returned by these functions contain additional fields - name, bfit, and config - which are described above.

Bugs

See the Sherpa bug pages online for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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.