Ancillary response file example

The following Python example reads in three ARF files and writes out a type II ARF file containing.

import os
from heap import *

# read the three type I ARF files
arf1 = arf(“first.arf”)
arf2 = arf(“second.arf”)
arf3 = arf(“third.arf”)

# load the the individual ARF objects into a type II ARF object
arfout = arfII()
arfout.push(arf1)
arfout.push(arf2)
arfout.push(arf3)

# and write it out
arffile = "output.arf"
if (os.path.exists(arffile)): os.remove(arffile)
status = arfout.write(arffile)
if status != 0: print("Failed to write output.arf: status = ", status)




HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Wednesday, 28-Aug-2024 16:49:36 EDT