diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-31 21:50:16 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-31 21:50:16 +0800 |
commit | fcb344b61c0b92e617068956d17e86cae83dd96a (patch) | |
tree | 8fbf4071ca29a5dda39f67c2c9ee57f6da3af24e | |
parent | 261d80f7272bedea0c26d660fdf1e104fcad7b4f (diff) | |
download | atoolbox-fcb344b61c0b92e617068956d17e86cae83dd96a.tar.bz2 |
astro/fitscube.py: Fix conflict on property "slices"
-rwxr-xr-x | astro/fits/fitscube.py | 14 |
1 files changed, 7 insertions, 7 deletions
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) |