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/truncate.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 truncate Context: sherpa

Synopsis

Resets negative model amplitudes to zero.

Syntax

sherpa> TRUNCATE [<dataset range> | ALLSETS] [{ON | OFF}]

where <dataset range> = #, or more generally #:#,#:#,..., such that #
specifies a dataset number, and #:# represents an inclusive range of
datasets; one may specify multiple inclusive ranges by separating them
with commas. The default dataset is dataset number 1.

Description

The command TRUNCATE resets any negative model amplitudes to zero (actually, 1.e-25); truncation is necessary for the Poisson-likelihood-based statistics of Sherpa (BAYES, CASH, and CSTAT) to work properly (none of these statistics allows negative model amplitudes). Note that:

  • if neither ON nor OFF is specified, the truncation setting for the specified dataset(s) is displayed;
  • truncation is automatically turned on if the assigned STATISTIC is BAYES, CASH, or CSTAT; and
  • truncation is never automatically turned off.

Example

Fitting with a linear model, using the Cash statistic:

sherpa> READ DATA example1.dat
sherpa> PARAMPROMPT OFF
Model parameter prompting is off
sherpa> SOURCE = POLYNOM1D[my]
sherpa> THAW my.c1
sherpa> my.c0.min = -10
sherpa> METHOD SIMPLEX
sherpa> STATISTIC CASH
sherpa> TRUNCATE OFF
sherpa> FIT
 smplx: v1.3
 smplx:  initial statistic value =    -9.05568E+02
Error: predicted data are zero or negative.
  --   Apply commands RESET and TRUNCATE ON, and refit.
sherpa> RESET
sherpa> TRUNCATE
Model Truncation for Dataset 1: off
sherpa> TRUNCATE ON
sherpa> FIT
 smplx: v1.3
 smplx:  initial statistic value =    -9.05568E+02
 smplx:     converged to minimum =    -1.05814E+03 at iteration =     67
 smplx:    final statistic value =    -1.05814E+03
            my.c0  -6.61366     
            my.c1  7.16072     

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.