What I have:
x = 0
while x <= image_number:
x = x + 1
(a%d % x) = pyfits.open("final_processed%d.fit" % x)
What I want:
To set variables (in this case, a1, a2, a3 etc.) = the opened images via Pyfits to numbers ranging from 1 - # of images in the directory. So basically:
a1 = pyfits.open("final_processed1.fit")
a2 = pyfits.open("final_processed2.fit")
a3 = pyfits.open("final_processed3.fit")
...
and so on for all of the images in the directory. I want to save them all under a different variable so I don't have to mess around with arrays etc.
Brandon