Response example

The following Python example reads RMF and ARF files, removes all elements smaller than from the RMF, multiplies the compressed RMF and the ARF, and writes out the result.

# read RMF and ARF
inputRMF = rmf("testin.rmf")
inputARF = arf("testin.arf")

# compress the RMF
inputRMF.compress(1.0e-6)

# if the RMF and ARF are compatible then multiply them and write
# the result adding extra keywords and extensions from testin.rmf.
if inputRMF.checkCompatibility(inputARF) == 0:
  inputRMF *= inputARF
  inputRMF.write("testout.rsp", "testin.rmf")