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

rgscombine (rgscombine-1.4.1) [xmmsas_20211130_0941-20.0.0]


FOR EACH spectrum and response file: 

  totalexposure = totalexposure + EXPOSURE

  FOR EACH spectrum channel:
    IF ( acceptable QUALITY )
      channelexp =  EXPOSURE * AREASCAL
      backscalexp = BACKSCAL
      totalcounts = totalcounts + COUNTS 
      Accumulate counts, backscalexp and channelexp or staterrquad 
      do not add counts

  FOR EACH response bin (rows):
    FOR EACH response channel (columns):
      IF ( corresponding spectrum channel not discarded )
        newresponse = newresponse + MATRIX * EXPOSURE * AREASCAL

FOR EACH spectrum channel:      
  IF (all quality bad over all spectra files)
    Set quality flag to 1

Finalareascal = channelexp / totalexposure
Finalbackscal = backscalexp / totalexposure

Finalresponse = newresponse / Finalareascal

XMM-Newton SOC -- 2021-11-30