I have an array of filenames, and I want to open each file with pyfits. So my code should be something like:
import pyfits
files=array(["1131lc.fits+2","1132lc.fits+2","1134lc.fits+2","1136lc.fits+2","1137lc.fits+2","1138lc.fits+2"])
for file in files:
data = pyfits.open(files)
print data
print len(data)
But in this way, the last two commands, print out: "[]" and "0". Where is the problem?