Simulate a PHA dataset with faked counts using Poisson noise
fake_pha( id; arf, rmf, exposure, [backscal=NULL, areascal=NULL,
grouping=NULL, grouped=1, quality=NULL, bkg=NULL] );
The fake_pha command creates a PHA dataset with faked counts
given a source model and a grid (e.g. ARF and RMF). The
generated counts will contain Poisson noise.
Before fake_pha can be run, a model with the same id as the
faked dataset must be defined; see
"ahelp set_model"
-
id - id for the faked dataset. Any existing id will be
overwritten, so use different values to compare results from
more than one simulation or to compare a simulation to real
data.
-
arf - ARF data
-
rmf - RMF data
-
exposure - length of observation in seconds
-
backscal - background scaling factor;
default=NULL
-
areascal - area scaling factor;
default=NULL
-
grouping - integer array of grouping flags;
default=NULL
-
grouped - boolean to indicate if data is grouped;
default=1
-
quality - integer array of quality flags;
default=NULL
-
bkg - PHA data for the background;
default=NULL
If a source data set by
data set ID is used and contains no grouping flags then
'grouped' should be negated.
sherpa> fake_pha(1; arf=get_arf, rmf=get_rmf, exposure=50000);
Using the ARF and RMF associated with dataset 1 - obtained
via the get_arf and get_rmf commands - simulate a 50ks
dataset. The faked data overwrites the existing dataset
with id=1.
sherpa> set_model("faked",const1d.c1*powlaw1d.p1);
sherpa> fake_pha("faked"; arf=get_arf(), rmf=get_rmf(), exposure=10000,
grouped=0, bkg=get_bkg());
A model is defined for the dataset id "faked", then
fake_pha is run to simulate an ungrouped 10ks dataset.
sherpa> rmf = unpack_rmf("3c273.rmf");
sherpa> set_model(xsphabs.abs1*powlaw1d.p1);
sherpa> fake_pha(1; arf=NULL, rmf=rmf, exposure=10000, grouped=0);
A 10ks dataset is faked with just an RMF (no ARF).
|