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


ommergelists (ommergelists-1.2) [xmmsas_20230412_1735-21.0.0]


Algorithmn

The program is written in c++. Within the following description of the algorithm, the term 'table' refers to an XMM DAL (Data Acess Layer), API (Application Programmable Interface) structure that provides access (read, create or modify) to a FITS table.

The program works in the following way:

  1. Carry out the following tests on the input and output files given on the command-line

  2. Read in the RA and Dec values from the RA_CORR and DEC_CORR columns, respectively, in the SRCLIST table (srclist1) of the product observation source-list file obtained from the non-sky exposure images.

  3. Read in the RA and Dec values from the RA_CORR and DEC_CORR columns, respectively, in the SRCLIST table (srclist2) of the product observation source-list file obtained from the mosaiced sky-images.

  4. Produce a list of the sources that are found in both source-lists, by matching both lists using their celestial coordinates and using a maximum matching angular separation of tolerance, where tolerance is an input parameter and defaults to 2 arcsecs. matchedIndex1 will contain a list of the row numbers in srclist1 that have a match in srclist2, matchedIndex2 a corresponding list of the row numbers in srclist2 that have a match in srclist1 and unmatchedIndex2 a list of the row numbers in srclist2 that were not matched with any source in srclist1.

  5. Compute the RA $\backslash$ Dec offsets between the matched cooordinates of the two lists.

  6. Create the output file with a SRCLIST table (srclist3) by copying srclist1 to srclist3.

  7. Create a list of the OM filters that are found in both tables (maybe less in srclist2)

  8. increase the size of the srclist3 by the size of unmatchedIndex2. The column elements along each of these rows are initially set to null (indicating that the element has no value attached to it) and will be populated with the unmatched data in the next stage..

  9. Loop through all the filters that are present in srclist2 and

    1. For the current filter FILT
    2. Load the source raw-count rate from column FILT_RAW_RATE and significances from column FILT_SIGNIFICANCE in srclist2.

    3. Loop through from i=1 to i=the size of matchedIndex2
      1. Set j to matchedIndex1[i] and k to matchedIndex2[i].
      2. If source[k] in srclist2 has a non-null raw count-rate and a value no greater than 5 then- EITHER

        If the source parameters for source[j] in srclist1 have null values (ie not detected) then set the values in srclist3 to the corresponding values in srclist2. OR

      3. If the significance of source[k] in srclist2 has a greater significance then the source significance of source[j] in srclist1 then set the filter columns for filter filt for row matchedIndex1[i] in srclist3 to the corresponding values in srclist2.

    4. Loop through from i=1 to i=the size of unmatchedIndex2
      1. Set j to unmatchedIndex2[i]
      2. If the total raw count-rate of source[j] for filter FILT of srclist2 has a value no greater than the maxrawrate value then set the parameters for the FILT columns in srclist3 to the corresponding values to the FILT columns in srclist2.

    5. When a row is appended to the final table from the unmatched sources in source-list 2, and that row is populated with all NULLS because the count-rates for all filters $> \textbf{maxrawcountrate}$, then the row is deleted before the output table is written.

    6. Delete the RAW_RATE columns. Note that omsrclistcomb added these columns to srclist2 because the input source-lists originated from mosaiced sky-images.

    7. SRCID coming from the new merged mosaiced list are re-numbered and a new column (SRCMOS) containing the original mosaiced SRCID is created.

    8. For each filter present, add a string column FILT_SKY to srclist3. Each row of the new column will be set to YES if the data for that particular filter originated from a mosaiced-image, or NO otherwise.

  10. Change SRCID values for merged sources and create SRCMOS column containing original source identifiers from mosaiced list.

  11. Sort srclist3 into increasing RA order.

  12. If input parameter plotfile has a valid name, draw graphs that compare various properties of the matched sources in srclist1 and srclist2.

  13. If input parameter regionfile has a valid name, produce a ds9 region file that contains the matched sources (red regions), those unique to srclist2 (blue regions) and those unique to srclist1 (green regions).



Subsections
XMM-Newton SOC -- 2023-04-16