From fcb344b61c0b92e617068956d17e86cae83dd96a Mon Sep 17 00:00:00 2001
From: Aaron LI <aly@aaronly.me>
Date: Tue, 31 Oct 2017 21:50:16 +0800
Subject: astro/fitscube.py: Fix conflict on property "slices"

---
 astro/fits/fitscube.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'astro')

diff --git a/astro/fits/fitscube.py b/astro/fits/fitscube.py
index 5616c2d..2c9a4fc 100755
--- a/astro/fits/fitscube.py
+++ b/astro/fits/fitscube.py
@@ -39,20 +39,20 @@ class FITSCube:
         # The Z-axis step/spacing between slices.
         self.zstep = self.header["CDELT3"]
 
-    def add_slices(self, slices, zbegin=0.0, zstep=1.0):
+    def add_slices(self, infiles, zbegin=0.0, zstep=1.0):
         """
         Create a FITS cube from input image slices.
         """
-        self.slices = slices
+        self.infiles = infiles
         self.zbegin = zbegin
         self.zstep = zstep
-        nslice = len(slices)
-        header, image = self.open_image(slices[0])
+        nslice = len(infiles)
+        header, image = self.open_image(infiles[0])
         shape = (nslice, ) + image.shape
         data = np.zeros(shape, dtype=image.dtype)
-        for i, s in enumerate(slices):
-            print("[%d/%d] Adding image slice: %s ..." % (i+1, nslice, s))
-            hdr, img = self.open_image(s)
+        for i, fn in enumerate(infiles):
+            print("[%d/%d] Adding image slice: %s ..." % (i+1, nslice, fn))
+            hdr, img = self.open_image(fn)
             data[i, :, :] = img
         self.data = data
         self.header = header.copy(strip=True)
-- 
cgit v1.2.2