
Date: Fri, 10 Nov 2000 13:53:28 +0100 (MET)
From: Stefan Larsson <stefan@astro.su.se>
Subject: Source removal executable
To: smaisala@astro.helsinki.fi, Juhani.Huovelin@astro.helsinki.fi, allan@dsri.dk, oxborrow@dsri.dk, njw@dsri.dk, Peter.Kretschmar@obs.unige.ch
Cc: stefan@des.astro.su.se
MIME-Version: 1.0
Content-MD5: J4uiB+DKVG0eInYz5MCYKQ==
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by uhuru.dsri.dk id NAA21365


To SDAST,

Here is the summary of what the source removal executable should do.
I have added Niels-Joergens suggestion regarding the storage
of the produced source subtracted shadowgrams.

Comments are welcome as always.

Have a nice weekend,

Stefan


PRINCIPLE FOR SOURCE REMOVAL.

The executable will to most part be identical to j_src_lc/j_src_spectra.
It will work on one Science window.

Input param. is one (or more?) time-energy ranges.

INPUT Datastructures:   Identical to  j_src_lc/j_src_spectra. 

OUTPUT Datastructure: one or more source subtracted shadowgram(s).
		      WHERE SHOULD THIS/THEY BE STORED?
		      If there are multiple shadowgrams they should
		      probably be save according to the same
		      principles as NJ is using for his shadograms.
		      
--------------------------------------------------------------------
The program will do the following.
      
   1. Calculate eventweights etc -> source fluxes.
      [With or without background model applied]
   2. Loop throu all events and subtract a fraction corresponding to 
      the source contributions.
   3. Bin event weights to a shadowgram.
   
   Source fluxes and background model can be updated by iteration.
   The program would have to be called once for each iteration.

------------------------

Added by Niels Jrgen:


Format of shadowgrams where the source contribution has been subtracted:

Proposal 1: Same DS (-EVTS-SHD) as 'original' and added to the index
            table -EVTS-SHD-IDX. Keywords must contain information about
            the subtracted sources.
            Advantage: No new DS required and IDX table prepared.
            Drawback: The shadowgram format is 'long' and this program
               adds up fractional events. Way out: multiply with 1000
               before saving.
               The image format is fixed - no way out here.
Proposal 2: New DS with format 'float'. Still keywords must contain
            information about the subtracted sources. Index table
            with members is required (similar to EVTS-SHD).
            Advantage: DS can be taylored to the executables using it.
            Drawback: Another branch (or child) in the SWG.

At the moment I prefer proposal no. 2. It is a cleaner solution and avoids
the risk of mixing up shadowgrams.

--------------------

Me (Stefan) again:

For the data structure name it is maybe better to use something like
-SSUB-SHD [=source subtracted] rather than -EVTS-SHD which may
sound as if it contained events?

The format should also be such that it can be used directly as a
new "spatial component background", except maybe for the scaling?



