XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


omsrclistcomb (omsrclistcomb-2.24) [xmmsas_20230412_1735-21.0.0]


Algorithm

subroutine omsrclistcomb


Read in all OSW source lists 


Collate all sources into a main list

For each source in the list, i 

  if this source has not been identified with other sources
         list-of-same-sources(1) = i
         no-of-same-sources = 1
   endif

   Loop over all other sources in the main list, j 

          if ( i /= j) then

          If the position of source i is the same as position of source j 
          (to within  tolerance nsigma and systematic error) then 

                no-of-same-sources++
                list-of-same-source(no-of-same-sources) = j

          Endif   
   End loop   

   Loop over same sources list, m

      Loop over rest of same source list, n
 
         if source m and n are in the same OSW

             flag as being in the same OSW

         endif
      end loop
   end loop

   Loop over sources in same OSW

        use nearest source and delete others from list_of_same_sources

   end loop

   now we have a list of sources that are the same


end for

create an index array giving the order of the sources in increasing
Right-Ascension. 


create a matrix of magnitudes containing n independent sources and m filters

set matrix to NaN

Loop over all independent sources

   find weighted mean of source position

   For each filter

     if source has been observed in filter more than once
        find mean position and magnitude.
     endif

     add entry to magnitude matrix

   end for

end loop


Loop over matrix

    compute colours in standard system from CAL colour transformation
    matrices

end loop


define possible colours (mag1-mag2) e.g. (B-V) and (U-B) etc

for each colour combination

      if ANY(matrix(mag1) /= NaN) and ANY(matrix(mag2) /= NaN) then
           compute colour and error
       endif

endfor


for each independent source

  Convert any undetermined (eg standard magnitude, colour) parameter value
  to NULL and then insert the source information at its correct Right-Ascension 
  position in table.      
 
Endfor

add a SRC-ID column to each OSW source list
for each OSW source
 write the appopriate source number from the observation source list
endfor

end subroutine omsrclistcomb



XMM-Newton SOC -- 2023-04-16