Causes Sherpa to apply a read-in bin grouping scheme to
source or background data.
sherpa> [B]GROUP [# [ID]]
GROUP is used to group source data, while BGROUP is used to group
background data.
# specifies the number of the dataset to which the grouping scheme is
to be applied (default dataset number is 1). The ID modifier is used if
and only if the Sherpa state object variable multiback is set to 1,
i.e., if more than one background dataset is to be associated with a
single source dataset. The ID modifier may be any unreserved string
(e.g., A, foo, etc.), i.e., a string that is not a parsable command.
The commands GROUP and
UNGROUP
allow a user to toggle back and forth between the analysis
of grouped and ungrouped data, after grouping assignments have been
read into Sherpa via the command
READ GROUPS.
(In a future version of Sherpa, the GROUP
may be issued automatically upon the reading in of groups.)
Note the issuing the GROUP causes Sherpa
to delete any defined filters for the specified dataset.
Also note that even if the data are grouped, the user may continue to read in
filters, weights, etc.,
whose values map to the ungrouped data; Sherpa
will do the grouping automatically:
- weights are averaged within groups;
- statistical and systematic errors are added in
quadrature within groups;
- a grouped bin is noticed if any of its ungrouped component bins is
noticed.
The user may also read in filters, weights, etc., whose
values map to the grouped data; these values are used directly.
NOTE:
in CIAO 3.0,
the commands GROUP and UNGROUP may
not be used with PHA data that has a GROUPING column.
This is because these data are grouped before Sherpa ever
has control of them, and Sherpa thus has no knowledge
of how the ungrouped data are distributed among bins. This will be
changed in a future version of Sherpa.
Input data from an ASCII file; input a grouping scheme; group and ungroup
the data:
sherpa> ERASE ALL
sherpa> $more spec_short.dat
1 59.0000 0 1 1 .05 0
2 46.0000 0 1 1 .05 0
3 49.0000 0 1 1 .05 5
4 65.0000 0 -1 1 .05 0
5 60.0000 2 -1 1 .05 0
6 60.0000 2 1 .1 .05 0
7 74.0000 2 -1 .1 .05 0
8 58.0000 2 -1 .1 .05 0
9 55.0000 2 1 .1 .05 0
10 70.0000 1 -1 .1 .05 5
11 61.0000 1 -1 .1 .05 0
12 75.0000 1 1 1 .05 0
13 56.0000 1 -1 1 .05 0
14 60.0000 1 -1 1 .05 0
15 45.0000 1 1 1 .05 0
16 63.0000 1 -1 1 .05 5
17 63.0000 1 -1 1 .05 0
18 56.0000 0 1 1 .05 0
19 58.0000 0 -1 1 .05 0
20 54.0000 0 -1 1 .05 0
sherpa> DATA spec_short.dat
sherpa> READ GROUPS spec_short.dat 1 4
sherpa> GROUP
WARNING: any applied filters are being deleted!
sherpa> WRITE DATA
Write X-Axis: Bin Y-Axis: Flux (Counts)
1 59
2 46
3 174
6 192
9 186
12 191
15 171
18 168
sherpa> UNGROUP
WARNING: any applied filters are being deleted!
- chandra
-
guide
- sherpa
-
autoest,
back,
berrors,
bsyserrors,
coord,
data,
dataspace,
fakeit,
feffile,
guess,
is_subtracted,
load,
load_arf,
load_ascii,
load_back_from,
load_backset,
load_dataset,
load_fitsbin,
load_image,
load_inst,
load_inst_from,
load_pha,
load_pha2,
load_rmf,
read,
set_analysis,
set_axes,
set_backscale,
set_coord,
set_data,
set_exptime,
set_subtract,
set_weights,
setback,
setdata,
subtract,
ungroup,
unsubtract,
use
|