LEDAS  
Leicester Database and Archive Service
 
Mission
    Description
Products
    Databases
Raw Data
    Archive
Analysis Software
    Archive
Ginga Information
Ginga Gallery
Related Sites
Databases
GINGALAC
GINGABGD
GINGAFRF
GINGALOG
GINGAMODE
GINGARAW
View Ginga DBs
Line
Footer
e-mail
Downtime expected shortly as all LEDAS services are moved to a new server.

Background subtraction using a single local off-source observation

The following describes the separate steps involved in estimating and subtracting the background in a single on-source observation using a single off-source observation. A qcl procedure bgdlocal.qcl exists which will carry out steps (2) to (4) below with the minimum of effort. However, it is still necessary to read and understand the following:

  1. A suitable off-source observation should be selected via the GINGABGD database table which contains all the (nominally empty) blank-sky observations (these observations are made in MPC1 mode but are suitable for MPC2 and MPC3 modes as well). The total duration of the off-source observation must not be substantially less than 24 hours and it should include at least the same range of SUD values as the source observation. The source and off-source observations should be within a few days of each other, the closer the better. If a suitable off-source observation is not available within a few days of the source observation, then an off-source observation which is 37 days before or after the source observation can be used instead (Hayashida et al. 1989).

    If the source observation is at high Galactic latitudes (|b| > 25°) then a high Galactic off-source observation must be used. Similarly, a source observation at low Galactic latitudes (|b| < 25°) requires a spatially nearby off-source observation to remove possible soft X-ray emission from our Galaxy. If there are no spatially nearby off-source observations within a few days of the low Galactic source observation, then the backgound subtraction should proceed with a high Galactic off-source observation. The contaminent Galactic emission can be corrected for by making use of a background subtracted spectrum of a spatially nearby off-source observation from the GINGABGD database table. Spectral fitting packages such as xspec allow the user to include this background file which will remove the Galactic emission.

  2. It is necessary to insert one or more time counters describing the induced radiation into both the source and off-source data cubes. This can be performed using the program bgdsaa (an example of its use is given below). The recommended model has three radioactive decays with exponential decays time scales corresponding to half-lives of 8 hours, 41 minutes and 20 minutes (see Hayashida et al. 1989 and Nandra 1991; note that the program bgdsaa requires e-folding time scales rather than half-lives). For observations during the latter half of the mission (mid-1990 onwards), a model with only one decay of 8 hours half-life is recommended. In order that the time counter is well estimated at the start of the data it is necessary to track the passage of Ginga through the anomaly for some period before the start of data file. BGD_RETRO defines this period (in hours). Its value should be at least 24 hours and at least a factor of 3 greater than the largest decay.

    qcl>bgdsaa
    
    ** BGDSAA Version 1.6 Tue Jun 17 18:05:59 1997 **
     
    BGD_DATIN File name =mkn335_91a.cube_cl
    BGD_RETRO No. of hours before start time included = 240.000 =
    BGD_NDECAY Number of radioactive components = 3 =
    BGD_DECAY001 Decay time (Hrs) = 12.5000 =
    BGD_DECAY002 Decay time (Hrs) = 1.00000 =
    BGD_DECAY003 Decay time (Hrs) = 0.500000 =
    qcl>

  3. The program bgdmfit should then be used to parameterize the background in the off-source data cube. Program bgdmfit is normally used to perform a six parameter fit using a CONSTANT (representing the CXB component) and SUD, COR, SAA_1 (8 hour decay), SAA_2 (41 minute decay), SAA_3 (20 minute decay) time dependent parameters (4 parameters are used for mid-1990 onward). When bgdmfit is used to fit a single off-source observations with N specified parameters, it generates N coefficient files (i.e., bgd_constant001.phad, bgd_sud.phad, bgd_cor.phad and bgd_saa_n.phad, where n is the number of radioactive decays used). An example of its use is given below:

    qcl>bgdmfit
    
    ** BGDMFIT Version 1.5 Tue Jun 17 21:01:46 1997 **
     
    BGD_NFILE Number of data files fitted = 1 =1
    BGD_DATIN001 Data filenames =bgd_91a_01.cube_cl
    BGD_NPAR Number of fit coeffs. = 6 =
    BGD_PAR001 HK Parameter name = constant =
    BGD_PAR002 HK Parameter name = sud =
    BGD_PAR003 HK Parameter name = cor =
    BGD_PAR004 HK Parameter name = saa_1 =
    BGD_PAR005 HK Parameter name = saa_2 =
    BGD_PAR006 HK Parameter name = saa_3 =
               1           1 -5.592352238577564E-002  1.256583181091843E-002
      3.391663215882733E-004  2.382387309038824E-005 -1.942923849818913E-003
      3.337153060095251E-003  8.478112113953353E-00335        
               1           2  0.176216114973539      -7.076380496554778E-003
     -5.968617616055473E-003 -6.146241292033412E-004  4.193920756933500E-003
     -3.179189489113640E-003  1.526880385981079E-00287        
    
    qcl>

  4. The program bgdsim uses the coefficient files produced by bgdmfit to generate a model background data cube of the same shape as the source data cube. Program subcb can then be used to subtract the model background data cube from its associated source data cube to give a background subtracted data cube. The programs bgdsim and subcb should initially be used to check the the quality of the fitting process by generating and subtracting a model background from the off-source data cube that was used to check that was used to generate the coefficients. The resulting incestuously subtracted data cube should then be examined, using the qcl procedure pl_ginga.qcl (see section 6.3), to ensure that the subtraction has been successful (e.g., a 3-10 keV, PHA channels 8-20, background subtracted light curve can be examined for count rate enhancements on the Ginga orbital period). The program bgdchk has been written to calculate the total variance and statistical noise for each detector ident in the incestuously subtracted data cube. These are calculated as follows:

    [Equation 1]

    [Equation 2]

    The square root of these values are written to the screen. An output file is created containing the intrinsic variability (total variance minus statistical noise) and the statistical noise. When an aceptable set of background coefficient files have been obtained, programs bgdsim and subcb can be used to generate and subtract a model background from the on-source data cube. Examples of bgdsim, subcb and bgdchk are given below:

    qcl>bgdsim
    
    ** BGDSIM Version 1.1 Tue Jun 17 21:19:10 1997 **
     
    BGD_DATIN Sorted input Ginga file =  =mkn335_91a.cube_cl
    BGD_DATOUT Name of background file generated = mkn335_91a.bgen =
    BGD_NPAR number of components in model = 4 =6
    BGD_PFILE001 Name of file containing fitted coefficients = bgd_constant001.phad
    BGD_PFILE002 Name of file containing fitted coefficients = bgd_sud.phad
    BGD_PFILE003 Name of file containing fitted coefficients = bgd_cor.phad
    BGD_PFILE004 Name of file containing fitted coefficients = bgd_saa_1.phad
    BGD_PFILE005 Name of file containing fitted coefficients = bgd_saa_2.phad
    BGD_PFILE006 Name of file containing fitted coefficients = bgd_saa_3.phad
     BGDSIM generates variances from the statistical errors scaled by a
    user chosen multiplier
    BGD_EMULT  scale factor to multiply statistical sigma = 1.50000 =
    qcl>

    The program bgdsim generates variances according to the formula:

    [Equation 3]

    qcl>subcb
    
    ** SUBCB Version 1.0 Tue Jun 17 21:21:09 1997 **
     
    SCB_DATIN1 First input data file =  =mkn335_91a.cube_cl
    SCB_DATIN2 Second input data file =  =mkn335_91a.bgen   
    SCB_DATOUT File containing FILE1-FILE2 = mkn335_91a.sub =
     
         SCB_DATIN1: mkn335_91a.cube_cl
          Shape :    393 x    48 x     2   =  37728
                  TIME    PHA     IDENT   
     
         IDENT masks
           1  0101010101010101
           2  1010101010101010
     
     
         SCB_DATIN2: mkn335_91a.bgen
          Shape :    393 x    48 x     2   =  37728
                  TIME    PHA     IDENT   
     
         IDENT masks
           1  0101010101010101
           2  1010101010101010
     
     DATIN2 is a CUBE.
     DATIN1 is a CUBE. ALL of DATIN2 can be subracted from DATIN1,
     or a single time series or PHAD extracted from DATIN2 can be
     subtracted from each time series or PHAD in DATIN1
    SCB_TYPE Do you want to subract type TIME, PHAD, or ALL =all
    qcl>

    qcl>bgdchk 
     
    ** BGDCHK Version 1.1 Tue Sep  2 18:20:02 1997 **
     
    BGD_DATIN Sorted input Ginga file =bgd_91a_01.sub 
    BGD_DATOUT Output file containing accuracy =bgd_91a.chk
      0.120682  0.207154
      0.103009  0.181215
    qcl>

As mentioned above, the qcl procedure bgdlocal.qcl automatically background subtracts a Ginga data file using a nearby (in time) off-source observation (assumes that there is only one off-source observation). The procedure bgdlocal.qcl prompts for the names of two input files, a source cube (or time series) and a off-source cube (or time series). Both of these files should have been cleaned previously. The off-source cube is used to derive the background model described by six coefficient files (bgd_constant001.phad, bgd_sud.phad, bgd_cor.phad, bgd_saa_1.phad, bgd_saa_2.phad and bgd_saa_3.phad). The procedure also prompts for the names of at least two output files, one to contain the model background corresponding to the period covered by the source observation and the other to contain the background subtracted source observation. Optionally bgdlocal.qcl can subtract a model background from the off-source observation. If this option is selected bgdlocal.qcl will prompt for the names of two more output files, one containing the model background corresponding to the period covered by the off-source observation and the other containing the background subtracted off-source observation. The following is an example of its use:

qcl>.bgdlocal
 BGDLOCAL is a QCL procedure for subtracting Ginga background using
 a single nearby background observation.
 
QCL_CL Source observation cube or HELP = HDS_NODE =mkn335_91a.cube_cl
QCL_CL Background observation cube =  =bgd_91a_01.cube_cl
QCL_CL File containing model background of source cube =  =mkn335_91a.bgen
QCL_CL Background subtracted source cube =  =mkn335_91a.sub 
QCL_CL Background subtracted off-source cube required? = YES =
QCL_CL File containing model bkgd of off-source cube =  =bgd_91a_01.bgen
QCL_CL Background subtracted off-source cube =  =bgd_91a_01.sub 
 
** BGDSAA Version 1.6 Tue Sep  2 22:20:30 1997 **
 
 
** BGDSAA Version 1.6 Tue Sep  2 22:20:38 1997 **
 
 
** BGDMFIT Version 1.5 Tue Sep  2 22:20:47 1997 **
 
           1           1  1.015324784972511E-002 1.949787346434621E-003
 -5.165750574002723E-004  1.143928973959272E-004 1.140377552317833E-003
 -3.351791787406837E-003  9.949005150241708E-00370        
           1           2 -0.200854484710677 7.124324348874261E-002
  2.358618226704543E-003  4.404957633253537E-004 1.337276329906780E-002
 -2.597219913905075E-002  5.900792367404825E-002344

** BGDSIM Version 1.1 Tue Sep  2 22:20:52 1997 **
 
 BGDSIM generates variances from the statistical errors scaled by a
user chosen multiplier
 
** SUBCB Version 1.0 Tue Sep  2 22:25:07 1997 **
 
 
     SCB_DATIN1: mkn335_91a.cube_cl
      Shape :    393 x    48 x     2   =  37728
              TIME    PHA     IDENT   
 
     IDENT masks
       1  0101010101010101
       2  1010101010101010
 
 
     SCB_DATIN2: mkn335_91a.bgen
      Shape :    393 x    48 x     2   =  37728
              TIME    PHA     IDENT   
 
     IDENT masks
       1  0101010101010101
       2  1010101010101010
 
 DATIN2 is a CUBE.
 DATIN1 is a CUBE. ALL of DATIN2 can be subracted from DATIN1,
 or a single time series or PHAD extracted from DATIN2 can be
 subtracted from each time series or PHAD in DATIN1
 
** BGDSIM Version 1.1 Tue Sep  2 22:25:09 1997 **
 
 BGDSIM generates variances from the statistical errors scaled by a
user chosen multiplier
 
** SUBCB Version 1.0 Tue Sep  2 22:25:16 1997 **
 
 
     SCB_DATIN1: bgd_91a_01.cube_cl
      Shape :    919 x    48 x     2   =  88224
              TIME    PHA     IDENT   
 
     IDENT masks
       1  0101010101010101
       2  1010101010101010
 
 
     SCB_DATIN2: bgd_91a_01.bgen
      Shape :    919 x    48 x     2   =  88224
              TIME    PHA     IDENT   
 
     IDENT masks
       1  0101010101010101
       2  1010101010101010
 
 DATIN2 is a CUBE.
 DATIN1 is a CUBE. ALL of DATIN2 can be subracted from DATIN1,
 or a single time series or PHAD extracted from DATIN2 can be
 subtracted from each time series or PHAD in DATIN1
 
overwrite /home/xra1/das/.qx_save.sdf? y
qcl>

A second qcl procedure bgdlocal91.qcl exists for observations taken after mid-1990. This procedure differs from bgdlocal.qcl as the number of radioactive decays following passage through the SAA includes only one coefficient.


[Top of page] [] [Back to Background Subtraction]
 
HOME
SEARCH
SERVICES INFO SOFTWARE ViZieR BLASTA DSS
ARCHIVES ASCA CHANDRA GINGA ROSAT ARNIE