def aeff( filename ): data = c.read_table( filename, 2 ) energy = np.array( data[0] ) aeff = np.array( data[1] ) return interp1d( energy, aeff ) # keV vs cm^2
def get_spectrum( filename ): data = c.read_table( filename, 2 ) energy, flux = np.array( data[0] ), np.array( data[1] ) return energy, flux