Specifies whether to analyze datasets in energy, wavelength, or channel space.
sherpa> ANALYSIS [<dataset range> | ALLSETS] \
[{ ENERGY | WAVELENGTH | CHANNELS | BINS }]
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 for ANALYSIS is all datasets (ALLSETS).
The WAVELENGTH argument may be shortened to WAVE.
The analysis setting for each specified dataset is shown if the final
argument is omitted, e.g. "ANALYSIS ALLSETS".
The analysis setting is automatically determined when data are read
in. This setting can be altered with the ANALYSIS
command. In general, the analysis setting for non-PHA data is
CHANNELS (synonymous with BINS), while for
general PHA files it is ENERGY. When the columns
BIN_LO and BIN_HI are detected in a Type II
PHA file (such as can be the case for files containing
Chandra grating data), these are assumed to contain
wavelength information and the analysis is set to
WAVELENGTH.
PHA datasets for which there is an INSTRUMENT model
set may be analyzed in either ENERGY or WAVE
space. Setting ANALYSIS to WAVE or
ENERGY has no effect until an ARF and/or an RMF are read
in and an INSTRUMENT is
specified.
If the ANALYSIS setting is changed after the model
components and their parameter values and ranges have been set, issue
the GUESS command to reset the initial
values and ranges.
Some models, such as certain XSPEC models, expect that the x-values
will always be energy bins. When the analysis setting is using
non-energy bins (e.g., WAVE) and an XSPEC model is
defined, Sherpa converts the bins to energy before
sending them to the XSPEC model. After the XSPEC model finishes,
Sherpa converts back to the original units.
Sherpa also scales the model values appropriately (e.g.,
if counts/keV came out of the XSPEC model, and Sherpa is
working with wavelength bins, then Sherpa scales the
output of the XSPEC model to counts/Angstrom).
Read in Chandra grating data and a grating RMF. Analyze
the O VIII Lyman alpha line at 18.97 Angstroms in energy space,
in the dataset (# 9) containing MEG -1 order counts:
sherpa> DATA data_pha2.fits
The inferred file type is PHA Type II. If this is not what you want, please
specify the type explicitly in the data command.
Warning: could not find SYS_ERR column
WARNING: statistical errors specified in the PHA file.
These are currently IGNORED. To use them, type:
READ ERRORS "<filename>[cols CHANNEL,STAT_ERR]" fitsbin
WARNING: backgrounds UP and DOWN are being read from this file,
and are being combined into a single background dataset.
WARNING: multiple datasets have been input.
The next available dataset number is 13.
sherpa> PARAMPROMPT OFF
sherpa> RSP[a]
sherpa> a.rmf = meg1.rmf
sherpa> a.arf = meg1.arf
sherpa> INSTRUMENT 9 = a
sherpa> IGNORE 9 ALL
sherpa> NOTICE 9 WAVE 18.8:19.2
sherpa> SOURCE 9 = CONST[co] + GAUSS[g]
sherpa> FIT 9
LVMQT: V2.0
LVMQT: initial statistic value = 42730.9
LVMQT: final statistic value = 21.8345 at iteration 74
co.c0 0.000378496
g.fwhm 0.00194331
g.pos 18.9812
g.ampl 1.53444
sherpa> SHOW g
gauss1d[g] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm thawed 1.9433e-03 6.8361e-04 6.8361
2 pos thawed 18.9812 18.7975 19.1975
3 ampl thawed 1.5344 1.3713e-03 13.7131
sherpa> ANALYSIS 9 ENERGY
sherpa> GUESS SOURCE 9
sherpa> FIT 9
LVMQT: V2.0
LVMQT: initial statistic value = 43170.1
LVMQT: final statistic value = 21.7635 at iteration 66
co.c0 0.0112294
g.fwhm 0.000107187
g.pos 0.653184
g.ampl 27.7522
sherpa> SHOW g
gauss1d[g] (integrate: on)
Param Type Value Min Max Units
----- ---- ----- --- --- -----
1 fwhm thawed 1.0719e-04 2.3488e-05 0.2349
2 pos thawed 0.6532 0.6457 0.6594
3 ampl thawed 27.7522 3.9868e-02 398.6771
- sherpa
-
get_groups,
ignore,
notice,
set_filter,
set_groups,
set_ignore,
set_ignore2d,
set_ignore_all,
set_ignore_bad,
set_notice,
set_notice2d,
set_notice_all
|