skip to content
 
Swift Science Center Italian site Italian site U.K. site U.K. site

Apply Aspect Correction to UVOT Data


Overview:

Aspect correction is essential to obtain correct sky coordinates of UVOT sources and to ensure that individual exposures
are added without offsets. This thread gives a brief instruction on how to use the Swift FTOOLS aspect correction tool.

Read this thread if you want to:

Apply an aspect correction to UVOT data.

Last update:  May 23, 2006



Aspect corrections (i.e., shifts and rotations) can be applied to UVOT sky coordinate images using the Swift tool "uvotskycorr".
As in other threads, we will use Swift observations of GRB050525A (sequence 00130088000) as an example.

Make sure that you have installed the WCSTools on your machine, which are needed to run the UVOT aspect correction.
In particular, make sure that the WCSTool "scat" is installed.

The "uvotskycorr" tool needs to be run twice to obtain aspect corrected UVOT images:

1) First the aspect corrections need to be computed by comparing UVOT source positions with those of catalogued sources.
2) In the next step the computed aspect corrections need to be applied to the image(s).

You can obtain a list of the parameters and default settings of the "uvotskycorr" task by typing:

$   plist uvotskycorr

Help on "uvotskycorr" is available by typing

$   fhelp uvotskycorr

The parameters are:

            what                      Whether  to  find  corrections  (what=ID)  or apply corrections
                                          (what=SKY)
            skyfile                    Input SKY image file name(s)
            corrfile                   Input corrections file for what=SKY
            attfile                      Input attitude file
            outfile                     Output file name. For what=ID, the aspect corrections will be
                                          written to this file.
            (starid)                    Parameters to pass to star identification
            (catspec)                Catalog descriptor file (catspec = usnob1.spec)
            (cleanup)                Delete temporary files?
            (history)                 Write history keywords?
            (clobber)                Overwrite existing files?
            (chatter)                 Standard HEAdas chatter parameter (min=0, max=5)

Optional parameters are given in parenthesis.

The "what" parameter switches between computing ("what=ID") and applying ("what=SKY") aspect corrections.
If aspect corrections are computed, the "outfile" parameter specifies the file used to write the aspect corrections.
That file is read in the next step, when the aspect solutions are applied to the image(s) ("what=SKY"). The "starid"
parameters sets the values passed to a subroutine which control the star identification settings. The default parameters
for "starid" are optimized to give best results.

Star catalog information is required to perform the aspect correction. The "catspec" parameter gives the catalog descriptor
which describes how catalog information is to be loaded.  It  can  point to a local catalog installed on your computer or
one that is to be queried over the web. More information on how to access the catalog information is available here:

$   fhelp catspec

You can set "catspec=usnob1.spec" to read the parameter file usnob1.spec, which looks like this:

$   more usnob1.spec
# partition summary
type => StarID::SearchCat
fields => ID,RA,DEC,MAG,TYPE
packed => 0
data => GSC
catalog/type => Indexed
catalog/n => 4

envvar => UB1_PATH
# Local star catalog: on your machine:
#location => /ssdc/usnob1
# USNO A server from ESO:
#location => http://archive.eso.org/skycat/servers/usnoa-server
# USNO B1 server from Harvard:
location => http://tdc-www.harvard.edu/cgi-bin/scat
limit => 10000

In this case the USNO star catalog is retrieved over the web from Harvard.

1. Calculate the Aspect Correction:

To aspect-correct V-band UVOT images for our example (GRB050525A), the aspect solution has to be calculated first:

$   uvotskycorr what=ID \
skyfile=00130088000/uvot/image/sw00130088000uvv_sk.img \ attfile=00130088000/auxil/sw00130088000sat.fits \ outfile=00130088000/out/CORR.00035227003.ALL 'starid=mag.err=5 rot.error=60' \
chatter=5 catspec=usnob1.spec clobber=yes history=yes cleanup=yes corrfile=NONE

This command reads the input image and the spacecraft attitude file, and writes the output into a directory which
needs to be created first. In addition, we opted to pass two parameters for the star identification, using matching
magnitudes between UVOT and catalogued sources to within 5 mag and allow a rotation of the UVOT image of
up to 60-arcmin. The "catspec" command gives the location of the star catalog as described above.
You can give a comma-delimited list of UVOT images to be aspect-corrected or you can provide a file which lists
all images to be aspect-corrected using "skyfile=@<file>".

2. Apply the Aspect Correction:

To apply the aspect corrections "uvotskycorr" needs to read in the aspect solution file created above.

$  uvotskycorr "what=SKY" \
skyfile=00130088000/uvot/image/sw00130088000uvv_sk.img \ attfile=00130088000/auxil/sw00130088000sat.fits \ corrfile=00130088000/out/CORR.00035227003.ALL \
chatter=5 catspec=usnob1.spec \ clobber=yes history=yes cleanup=yes

3. Check the Aspect Correction:

Check which header extensions were modified by "uvotskycorr" by inspecting the headers of the file extensions:

$  ftlist sw00130088000uvv_sk.img  K  include=EXTNAME,ASPCORR

Next, all individual exposures less the settling images (header extensions 1 and 2 in our example) and less the file
extensions which were not corrected (none in our example) need to be added by running the command "uvotimsum":

$  uvotimsum  sw00130088000uvv_sk.img  uvv_sum.fits  exclude=1,2  chatter=1

Open the added image "uvv_sum.fits" with DS9 or FV and visually inspect the improvement in the aspect solution.

The images below give the un-corrected (left) and corrected (right) summed V-band images of GRB050525A.
The XRT error position of GRB050525A is marked by a circle with a radius of 6-arcsec as reported in GCNs.
Note that the un-corrected image shows significant offsets between individual exposures, which have been
corrected for in the aspect-corrected image. The afterglow candidate to the GRB (marked by two lines)
is much fainter in the uncorrected image due to the offsets of the individual exposures. The aspect-corrected
image also shows updated centroid positions of all UVOT sources, which also appear more point-like.

uncorrectced and aspect corrected V-band image


If you have a question about Swift, please contact us via the Feedback form.

This page was last modified on Wednesday, 03-May-2006 17:14:21 EDT.

Science Mission Directorate Universe Division
Beyond Einstein | Origins

  • Questions/Comments/Feedback
  • Find helper applications like Adobe Acrobat
  • Learn about black holes, astronomy & more!
  • A service of the Astrophysics Science Division at NASA/ GSFC

    Swift PI: Neil Gehrels,
    Responsible NASA Official: Phil Newman
    Web Curator: J.D. Myers
    PAO Contact: Susan Hendrix (301-286-1707)
    Privacy Policy and Important Notices.