
#from numarray import * ## Changed to numpy Aug 2007
from numpy import *
import pyfits
#import random

from run_simpler_skymap_datons import *
from simpler_skymap_datons import *

FilesTupleList =[('ModelFluxPaddedHlfSquishICSPionBremss1-1000GeV.060912.fits',
                  'ExposrTimPaddedIntTime539.0.060529.fits',
                  'ModelDataPaddedHlfSquishICSPionBremss1-1000GeVIntTime539.0.060912.fits')
                 ]

# Do for each in the list:
for this_tuple in FilesTupleList:
    FluxModelFile,ExpAreaTimeFile,OutModelDataFile = this_tuple
#
# 1/ Get Input ModelFlux:
#
    FluxModelHDULst = pyfits.open(FluxModelFile)
    print FluxModelHDULst[0].header
    print FluxModelHDULst[0].data
#
# 2/ Get Input Exposure File:
#
    ExpAreaTimeHDULst = pyfits.open(ExpAreaTimeFile)
#   "touch"them to getthem read in properly:
    print ExpAreaTimeHDULst[0].header
    print ExpAreaTimeHDULst[0].data
#
# 3/ Now find model_data = exposure*model_flux for each image bin:
#
   
    this_modeldata_HDU = ExpectedDataModelHDU(FluxModelHDULst[0],ExpAreaTimeHDULst[0],OutModelDataFile)
