Preparatory Steps
These steps must be run on the qpoe file before the dewobble scripts are implemented. In addition to the qpoe file, it is necessary to have the ancillary file (rh*_anc.fits).
a) Create a time sorted qpoe file using the task 'timsort'.
>xtiming
>timsort rh......qp
Do not specify a region, since we do not want to constrain the area of
the corrected file.
b) Run "qpphase" (also resident in 'xtiming') on the time-sorted qpoe
file with a 402 second period. This process adds a new column to the
event list with wobble phase. If your data include many obis, make
sure that the spacecraft clock was not reset during the observation.
If a reset occurs during the observation, one must divide the data
into two segments with a time filter and 'qpcopy' before running
'qpphase' on each segment. This is because the phase of the wobble is
fixed to the space craft clock.
c) Create an ASCII file with the listed obi start and end times.
If 'rarc2pros' has been run on the data files, then
tprint rh*_obi.tab > obi_times.asc
If rh*_obi.tab is not present, then
>xray
>xdataio
>xrfits rh*_anc.fits[1]
Take the 'iraf table name', OBSTABLE.tab
Note: For non-RDF files, the obi times might be included with a
different extension number in the ancillary file.
>tprint OBSTABLE.tab > obi_times.asc
Check the obi list file. Rarely, it will contain more obis than are
actually present in an observation, and any such must be deleted. You
may also delete very short obis. Make sure there are no blank lines at
the end of the file.
Edit this file: (a) to delete unwanted obis or blank lines at the end, and
(b) to get rid of all extraneous material so that the resulting file
appears as this example:
191309654 191313024 24/06/96 02:40:49.000 24/06/96 03:36:59.000
191315303 191315382 24/06/96 04:14:58.000 24/06/96 04:16:17.000
If you want to choose 'stable roll angle intervals' or some other time
segment which is not tied to individual obis, you can do it by
entering begin and end times in obi_times.asc; i.e. you are not
forced to stick to obis.
Phase bin analysis and source centroiding
The IRAF script 'phase_repos' breaks up each obi of the qpoe file
into a number of phase bins. Then a source centroid is calculated for
each binned qpoe file. The results are stored in an ASCII file
'bepos_output.asc'. Each binned qpoe file is labelled by two indices,
the obi and the phase number.
NOTE: Please choose a number of phase bins for which the inverse is
not an irrational number or a repeating decimal (e.g. num_bins=3
causes the script to crash).
You will need to know pixel coordinates for the source. This can
easily be obtained from the source list of SASS, or by using
'xexamine' in 'xplot'.
Run phase_repos:
>xplot
>xspatial
>detect
>task phase_repos=phase_repos.cl
>epar phase_repos
With the parameters set as follows:
qpfile = "rh70088100_ph.qp" Qpoe file produced by 'qpphase'
obi_list = "obi_times.asc" File name containing the obi times
out_files = "rh70088100" Root name for output files: root_obi??_ph??.qp
num_phase = 10 Number of phase bins
xpos = 4101 X source coordinate
ypos = 4068 Y source coordinate
cellx = 24 Detect cell size(X) in arcsecs
celly = 24 Detect cell size(Y) in arcsecs
(aper_factor = 3) Aperture factor used with bepos
(flist = "")
(mode = "ql")
A cell size of 12'' can be used if you think that individual
phase bins will contain a distribution of source counts reasonably
close to that of the PRF.
A more critical parameter is aper_factor. The pros task ``bepos'' is
normally preceeded by 'lpeaks' which determies a rough position for a
source, and then ``bepos'' uses precisely the same distribution
of photons to find the best position via a maximum likelihood
algorithm. However, we feed ``bepos'' with a position from the whole
observation, but then mercilessly divide the data into many segments.
To include the photons of interest, it is here necessary to
substantially increase the area of the circle used by ``bepos''.
Hence we have changed the normal PROS default of opt_radius(aka
aper_factor) from 1.8 to 3.0. This means that the radius for
accepting source photons =
; for ROSAT HRI,
(on-axis). For some cases involving
displaced obis, it was necessary to set opt_radius = 10.
>phase_repos
Sort the source detect output
a) Run the Perl script 'detect_sort.sh' from a unix prompt in the
same directory as you are currently working. This script sorts the
output ASCII file 'bepos_output.asc' and creates the sorted file
'detect_sorted_results.asc'.
>detect_sort.sh
Note: You might need to change the first line of the script to
point to your location of perl.
b)The ASCII file 'detect_sorted_results.asc' containing the image
centroids for each phase binned qpoe file might have some blank
lines. The blanks are due to the lack of enough counts in the qpoe
file to calculate an image centroid. We advise the omission of these
data by deleting the blank lines in the file
'detect_sorted_results.asc'. These blank lines must be removed for the script
to run without errors.
Restack the binned images
The final step restacks all the individual qpoe files according to the
x,y centroid shifts. The user must set the common x,y position to
where all the qpoe files will be shifted. The signal-to-noise ratio
(SNR) is listed next to each image centroid position in the file
'detect_sorted_results.asc'. The task will ask the user for a
minimum SNR threshold for which all binned images above this value
will be included in the build. If you want to use all the data, set
this threshold to zero. A smoothed image of the resultant file will
be sent to the screen or printer.
Note: The observation time in the header will be incorrect. When
using qpcopy while filtering on phase, the livetime is not correctly
calculated.
Shift and restack the qpoe files using the script 'restack.cl'
>xdataio
>xspatial
>xplot
>task restack=restack.cl
Parameter list for restack.cl:
rootname = "3C120" Root name for input files: root_obi??_ph??
.qp
out_file = "120restack" Root name for ouput file: root.qp
cent_list = "detect_sorted_results.asc" File containing the individua
l centroids
xcenter = 4105.3 X center coordinate
ycenter = 4070.7 Y center coordinate
cutoff = 5 Minimun s/n to be stacked
dotsi = 0 Include TSI records from all qpoe's?(n=0;y=1)
gauss_sm = 2.54 Gaussian smooth sigma in pixels
cntr_lv = "5 25 50 75 95" Contour levels (percent of peak)
(flist = "")
(mode = "ql")
>restack