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


ommergelists (ommergelists-1.2) [xmmsas_20230412_1735-21.0.0]

SRCLIST table sorting algorithm

The algorithm for sorting a SRCLIST table into increasing Right Ascension order is designed to work with a table with any number of columns that contains either RA_CORR, DEC_CORR or RA, DEC columns, with the former taking precedence. The algorithm works as follows-

  1. Produce an index list of the sorted Right Ascensions positions that gives the row number that each source in the table should be placed to be in the correct order.
  2. Double the number of rows in the table.
  3. Copy the original rows of the table to a position starting at the the last row in the original table plus one.
  4. Loop through the number of rows in the original table and replace each one by the appropriate sorted row from the appended rows using the index list.
  5. Delete the appended rows from the table.



XMM-Newton SOC -- 2023-04-16