private XAS scripts
These scripts reside in ~lucio/bin () unless otherwise stated
(variants of official scripts may reside in /ut/Xas/scripts ();
specific scripts () may reside together with
the relevant data, but they would not be generally listed here.
by topic
[general]
[MECS]
[PDS]
[HPGSPC]
[virtualop] [fudgeobs]
[fitfilter] [gridfilter]
[makehr]
[removenull]
virtualop
creates links for a virtual OP in current directory, i.e links all files
present in olddir for nobs observations starting at the one numbered oldstart,. renumbering them from newstart onward.
For first OP oldstart and newstart will be equal. For the next OP
newstart will be incremented. For the last OP it is likely that the outgoing
slew files will be numbered wrongly and will have to be renumbered.
- virtualop olddir oldstart nobs newstart
fudgeobs
is the workhorse used by virtualop (never called directly)
fitfilter, gridfilter
Template scripts to invoke the fitting programs, filtering the data with smask
so that each bin has at least nsigma signficance. They should be copied
to personalize the initial guesses of the fit case by case.
Sample version in /poseidon/lucio/sax/CP/BLsteep/Data/Pks2155
- fitfilter spectrum matrix nsigma
- gridfilter spectrum matrix nsigma
makehr
Produces an hardness ratio file hrsuffix from two time profiles.
- makehr file1 file2 suffix
removenull
will remove null characters from file. Typically used with obsdir, expconf
and alike to allow "dxdiff" to see them as ASCII, not binary files.
[autotimewindow]
[makenet]
[mecslightcurve]
[mecsnetlightcurve]
[mecsvarlightcurve]
[mecsvarnetlightcurve]
[fixvarnetlightcurve]
[orbitlightcurve]
autotimewindow
set automatically a time window or merge current time window with a safe time window
where the current gain history is defined.
- autotimewindow
- autotimewindow MERGE
makenet
generates a net spectrum from pre-existing gross and bkg spectra, scaling for
the ratio of targetarea to bkgarea. The files are assumed or will
be named netunit, grossunit, bkgunit,
where unit is usually 2 or 3.
- makenet unit targetarea bkgarea
mecslightcurve
generates gross and bkg light curves for a MECS unit in given channel range and with
given binsize. Use default BL limits and pixel sizes. Require a nooccult time window and munits and munitb
region files.
- mecslightcurve unit elow ehigh binsize
mecsnetlightcurve
subtracts a bkg light curve from a gross one, using a given area ratio. The
unit can actually be any suffix, and the optional prefix can be
used to deal with any files named prefixgrossunit (gross,
bkg and net are standard names).
- mecsnetlightcurve unit arearatio [prefix]
mecsvarlightcurve
generates gross and bkg light curves as mecslightcurve, but uses variable
bins described in a varbinfile set by a separate xasset. The files are
prefixed by an s, and suffixed by the channel range (e.g. sbkg2_10-210)
- mecsvarlightcurve unit elow ehigh binsize
mecsvarnetlightcurve
Combines mecsvarlightcurve and mecsnetlightcurve in
a single call, generating net variable-bin light curves with consistent naming.
- mecsvarnetlightcurve unit elow ehigh arearatio
fixvarnetlightcurve
Operates on the output of mecsvarlightcurve, and, before invoking
mecsnetlightcurve, it eliminates bins which do not exist in all
light curves.
Working version in /poseidon/lucio/sax/CP/BLsteep/Data/Pks2155
- fixvarnetlightcurve unit elow ehigh arearatio
orbitlightcurve
(obsolescent) generates an ASCII file with an orbit by orbit light curve for
source or background, in given energy limits, for given MECS unit
and using given time window (specify none if unwanted).
- orbitlightcurve rootname mecsunit s|b elow ehigh window obschain
[fudgepdsmatrix]
[fixpdsbinsizes]
[makeoccultnospike]
[onoffchecks]
[pds_dir_lightcurve]
[pds_dir..parts]
[pdslcstyle]
fudgepdsmatrix
fudges a PDS XAS response matrix generated by pdsmaccum, multiplying it for
the fixed input energy grid width (0.5 keV) to make it consistent with private
fitting programs.
fixpdsbinsizes
(obsolescent) inserted correct bin sizes in HK time profiles generated by
pds_hk_dir when they where wrong (which is no longer the case)
makeoccultnospike
Creates no_occultation.window from a pre-existing nooccult.window,
intersecting it with the result an analysis on the products of script pds_hk_dir,
taking the intervals where the scientific rate in the p*dir files is below a given
threshold in cts/s.
- makeoccultnospike threshold
onoffcheck(2)
procedures used to check background subtraction, making the difference of individual
unit bkg spectra, and combining them into a 4-unit spectrum as done in the usual reduction by
pds_logsum nchan elow ehigh (use same values used for the extraction
of net source spectra). There are two variants :
- onoffcheck nchan elow ehigh
- onoffcheck2 nchan elow ehigh +|-
The first produces totalBD_grp.spectrum, making the difference between plus
and minus offset bkg (i.e. unitiB+off - unitiB+off).
The second one produces either totalBDp_grp.spectrum or totalBDm_grp.spectrum,
and makes the difference between the plus or minus bkg and the mean
bkg (e.g. unitiB - unitiB+off).
pds_dir_lightcurve
Accumulates the all-unit light curve unitallS.time with variable bins described
in varbinfile, between given energy ranges, with or without PSA correction, in
a manner similar to spectral script pds_dir (same naming for intermediate products).
- pds_dir_lightcurve obschain elow ehigh varbinfile enabled|disabled
- pds_dir_lightcurve_byhalf obschain elow ehigh varbinfile enabled|disabled
The variant pds_dir_lightcurve_byhalf produces halfallS.time and tries
to be faster, accumulating data by couple of units (PDS halves) directly.
pds_dir_part*
This is a split of main script pds_dir in separate parts to simplify repeats
- pds_dir_part1 obschain dirmode [verbose]
- pds_dir_part2 obschain dirmode [verbose]
- pds_dir_part3 obschain dirmode [verbose]
Part 1 just accumulates collimator positions and relevant time windows.
Part 2 merges them with no_occultation
Part 3 performs the accumulations.
pdslcstyle
(obsolescent) generates single-unit bkg subtracted spectra lcunitiS
similar to unitiS generated by the last step of pds_dir, using an alternate
program (soperate).
[hp_dir*]
[hplightcurve]
[hpfixlightcurve]
hp_dir*
Adaptions or renames of original scripts in the XAS distributions 2.1 and 2.2
(in turn adaptions to HPGSPC by MG of PDS scripts).
The functional version is currently hp_dir_2.1, while
hp_dir is just a reminder of the existence of two versions. The verbose
argument seems compulsory. Recommended BL limits are 80 115.
- hp_dir ...
- hp_dir_2.1 obschain dirmode bl1 bl2 verbose
- hp_dir_2.2 obschain dirmode bl1 bl2 verbose
- hp_dir_2.1.lastpart obschain dirmode bl1 bl2 verbose
The hp_dir_2.1.lastpart is just the last part of the main script, which avoids
to repeat the collimator position profile and related time windows (but does the merging
with [a new] no_occultation and the accumulation) in case of repeats.
hplightcurve
Accumulates the net light curve onbs.time with variable bins described
in varbinfile (use xasset to define it), between given energy ranges, in
a manner similar to spectral hp_dir_* (same naming for intermediate products). One need to
define the obschain with concatenate, while the script assumes standard BL range.
hpfixlightcurve
Accumulates the net light curve fonbs.time with a fixed binsize.
It supposes hplightcurve has already been run, since it relies on a
difference spectra created by it.
Working version in /poseidon/lucio/sax/CP/BLsteep/Data/Pks2155
- hpfixlightcurve elow ehigh binsize
sax.iasf-milano.inaf.it/~lucio/WWW/Personal/saxscripts.html
:: original creation 2001 gen 22 18:14:44 CET ::
last edit 2001 Jan 22 18:14:44 CET