accumulate gain [gainfile ncounts {packet} {range range ...}This accumulates a gain history collecting a sequence of spectra from the on-board calibration sources. Each spectrum has a statistics of about ncounts events. The spectrum is fitted to determine the gain (channel of the peak), and the gain relative to an appropriate reference is written to the output time profile (which has one time bin per spectrum). The syntax is in general similar to the spectrum accumulation command, except that the selection of calibration events is done automatically.
There are a variety of options which can be used to control the behaviour of the program which are documented elsewhere . Here we report only two environment variables used to control the amount of terminal output produced:
xasset quiet Yes|No
xasset verbose Yes|NoA quiet=YES (default) run produces the gain history file and no significant terminal output.
Note that spectra are accumulated until enough counts are collected (in an entire number of packets). Spectra with less counts can be accumulated in the case of data gaps. The fitting procedure is run only on spectra with significant statistics. The fitting uses a CURFIT routine stepping on the peak position and fitting the Gaussian normalization and FWHM. The errors are 90% confidence errors for one interesting parameter. The result of all fits is reported in the log files, but only non-suspicious ones are included in the gain history (ANY trouble during fitting, including an open confidence contour, flags a fit as suspicious). The gain vs time correction will then duly interpolate.
Note that no provision for interpolation or smoothing are made IN the gain history generation itself. If one wants to, it may manipulate the gain history (e.g. in IDL) and apply the manipulated version.
NB : the LECS section is not part of the official distribution
As for the MECS, there are a variety of identical options documented elsewhere, although the default values are different than for the MECS . The environment variables used to control the amount of terminal output produced are identical to the MECS case.
The following are the main differences between the LECS and MECS cases.
item | LECS | MECS |
---|---|---|
default number of counts in spectrum | 3000 | 1500 |
box size around calibration sources | 20 raw pixels | 12 natural pixels |
corrections | must be (and automatically are) disabled, including gain correction itself (unless one is using the "secret" verification mode ) and those which must be always performed | must be enabled, gain correction itself is automatically disabled (unless one is using the "secret" verification mode ) |
linearization | positions are not linearized (linearization not defined outside of FOV) | positions are linearized |
report gain to detector centre | done in ad-hoc way (see explanation below) | done with standard corrections |
calfact: using for fit values above this percentage of peak | 30% | 50% |
error weight in fitting | CURFIT mode 1 (weigh on errors) | CURFIT mode 0 (no weight) |
caljump: begin chi-square grid for peak position at maximum minus | 12 PHA channels | 3 PHA channels |
calpass: step for grid (100 passes) is | 0.2 PHA channels | 0.05 PHA channels |
About the gain spatial correction, there is to note a difference between the way
this is handled for MECS, for LECS in XAS and for LECS in SAXDAS.
For MECS there is a gain correction map defined for a region including the FOV and
the calibration sources. For LECS the gain correction map is defined only in the FOV, and
the calibration sources are located quite far out. The method described in the
A&AS 122,309 paper
and presumably implemented in SAXDAS is to fit the two calibration sources separately
and scale the average to the nominal PHA channel 410. For analogy with MECS we instead
accumulate a single spectrum with gain corrected to detector centre. This is done
pre-scaling the gain by 396/410 or 420/410 respectively for photons coming from either sources,
where 396 and 420 is the gain at 20 °C, i.e. the intercepts read from the plot in
fig. 10 of the A&A paper.
The purpose of this program is not quite to keep track of fast time variability of the gain, but to normalize "recent" observations (after July 1999, with PMT HVs adjusted so that the gain is about 0.5 the previous nominal one) to same PI channel scale in use before.
As for the MECS, there are a variety of identical options documented elsewhere, although the default values are different than for the MECS . The environment variables used to control the amount of terminal output produced are identical to the MECS case.
The following are the main differences between the HPGSPC and MECS cases.
item | HPGSPC | MECS |
---|---|---|
default number of counts in spectrum | 10000 | 1500 |
implied data selection | only correlated events used | 12 natural pixel box around cal sources |
corrections | must be (and automatically are) disabled, including gain correction itself (unless one is using the "secret" verification mode ) | must be enabled, gain correction itself is automatically disabled (unless one is using the "secret" verification mode ) |
calfact: using for fit values above this percentage of peak | 30% | 50% |
error weight in fitting | CURFIT mode 1 (weigh on errors) | CURFIT mode 0 (no weight) |
caljump: begin chi-square grid for peak position at maximum minus | 5 PHA channels | 3 PHA channels |
calpass: step for grid (100 passes) is | 0.1 PHA channels | 0.05 PHA channels |
There is to note a difference between the way
this is handled for the HPGSPC in XAS and in SAXDAS.
While SAXDAS derives an initial estimate of the gain using the mean position
of the peak of the Xe Kalpha line on a first block of data, and then keeps a software AGC updated using further Xe correlated events, XAS uses the same method of the
MECS, i.e. fitting the spectrum of the Xe K-alpha line
with a Gaussian.