ABC (Dec94)                   ftools.rosat                   ABC (Dec94)

NAME
    ABC - corrects  the  arrival  times  of  the  rosat  photon  at  the
    barycenter.
    
    
USAGE
       abc infile bcfile outfile ra dec
    
    
DESCRIPTION
    
    This  task  corrects  the arrival times of the photons, in the EVENT
    extension and the times in the GTI  extension,  for  the  spacecraft
    clock  to  UTC  relation  (SCC-UTC)  and  uses  the correction table
    created from the task  BCT  to  correct  the  arrival  time  to  the
    barycenter.   The  Barycenter  correction  is  computed  by a linear
    interpolation between the corrected orbit times (output  from  BCT).
    If  a photon falls outside of the orbit interval a warning is issued
    together with the photon time.
    
    This task takes as input: 1. A  photon  event  list  data  file  (in
    FITS)  in either RDF/REV2 format or older US REV0 format (the German
    REV0 formatted data is not supported).  To minimize  the  amount  of
    time  needed  for  ABC  to  run, we recommend that the event data be
    spatially screened so that it only contains photons from the  source
    for  which  the correction is required.  2. A correction table. This
    table, created  by  the  task  'BCT',  contains  the  corrected  and
    uncorrected  orbit  times.  The table is in FITS format. It consists
    of 4 columns, containing the integer and the fractional part of  the
    uncorrected  and  corrected times. The times are written as JD.  See
    also help on  BCT.   3.the  equatorial  coordinates  of  the  source
    (epoch  2000.0) given either as hh mm ss.s, dd mm ss.s (separated by
    a blank space) or in degrees.  The  coordinates  are  not  used  for
    computation   but   they   are   requested  in  order  to  test  the 
    compatability with the input correction table (from 'BCT').
    
    This task generates: 1. An output event file with the arrival  times
    of the photon corrected at the barycenter.
    
    Correction  of  photon  times to UTC: The ROSAT spacecraft clock was
    calibrated to UTC  by  dividing  the  ROSAT  mission  into  10  time
    intervals  and  fitting  the  SCC  - UTC relation with a fifth order
    polynomial.  The start and stop times of the intervals, and the  fit
    coefficients,   are   stored  in  a  file  called  scc_to_utc2.fits, 
    available either from the REFDATA  area  ($LHEASOFT/../refdata)  For
    each  photon,  the correction of the spacecraft clock times (SCC) to
    UTC is computed according to the following formula :
    UTC =  JDref(I) + (A(i,1)/86400.0 
                    + (A(i,2)*(SCC-SCCo(i))/86400.0
                    + (A(i,3)*(SCC-SCCo(i))**2/86400.0
                    + (A(i,4)*(SCC-SCCo(i))**3/86400.0
                    + (A(i,5)*(SCC-SCCo(i))**4/86400.0
    where
    i= the appropriate mission interval containing the SCC time of arrival for 
    that photon
    A(i,j)= the coefficient of the jth polynomial in the ith time interval
    SCCo = an offset time for the ith interval
    JDRef(i) = an offset time for the ith interval
    
    
    
PARAMETERS
    
    infile [filename]
        Input event file name. The ABC task accepts  RDF/REV2  formatted
        events  file (i.e. the formats available from the ROSAT archive)
        or old-style  US/REV0  formats  (originally  distributed  to  US
        PI's).  German  REV0  formatted data is not supported but may be
        converted to a supported format using the tool gevt2rdf.
    
    bcfile [filename]
        The name of  the  FITS  file  containing  the  correction  table
        generated  as output from the task BCT.  BCFILE should contain 4
        columns, respectively the integer and  the  fractional  part  of
        the  uncorrected  and  corrected  times for the orbit data.  The
        times are written as JD.
    
    outfile [filename]
        Name of the output file for the  event  file  produced  by  ABC,
        containing  the  corrected  times.   Note that the correction is
        applied to the extension containing the photon  events  AND  the
        extension containing the good time intervals.
    
    ra  [string]
        The  r.a.  of  the  source  given  either  in  hh mm ss.s or deg
        (equinox 2000).
    
    dec [string]
        The dec. of the source given  either  in   dd  mm  ss.s  or  deg
        (equinox 2000.0).
    
    (tchat = 10) [integer]
        Terminal chattiness level.  Higher means more chattiness.
    
    (lchat = 0) [integer]
        Log  file  chattiness level.  Enable logging by setting FLOGFILE
        environment variable to filename.  Prefix a + to  append  to  an
        existing file.
    
    (sccfile = scc_to_utc2.tfits) [filename]
        Name  of the SCC correction table, which is normally included in
        the HEASOFT REFDATA area
    
    
EXAMPLES
    % bct
    Name of input file [orbit file][] rp900176a01_anc.fits
    Name of output file[] bct.out
    RA in hh mm ss.s or degrees -- epoch 2000[] 10 45 13
    DEC in dd mm ss.s or degrees -- epoch 2000[] -59 44 20
    WARNING:  Defaulting to first FITS extension
     
     Extensions:
     
              HDU type     HDU name               Rows  Columns
    ____________________________________________________________
       2  Binary Table      EPHEM                  422     19
    
    
    % abc
    Name of input events file[] rp900176a01_bas.fits
    Name of barycenter correction table[] bct.out
    Name of output file[] abc.out
    RA in hh mm ss.s or degrees -- epoch 2000[] 10 45 13
    DEC in dd mm ss.s or degrees -- epoch 2000[] -59 44 20
    Copying to output file...
    ...done
     
     Extensions:
     
              HDU type     HDU name               Rows  Columns
    ____________________________________________________________
       2  Binary Table      STDEVT              283394      8
       1  Binary Table      STDGTI                  17      3
     
     
     Extensions:
     
              HDU type     HDU name               Rows  Columns
    ____________________________________________________________
       1  Binary Table      TIMEREF                422      4
    
    
BUGS
    For LHEASOFT version 5.1 and earlier, this tool  will  fail  if  the
    input photon events file is compressed.
    
    
SEE ALSO
     rosbary, bct