diff options
Diffstat (limited to 'PyMca5/PyMcaIO/TextImageStack.py')
-rw-r--r-- | PyMca5/PyMcaIO/TextImageStack.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/PyMca5/PyMcaIO/TextImageStack.py b/PyMca5/PyMcaIO/TextImageStack.py index b42c254..0a66dc4 100644 --- a/PyMca5/PyMcaIO/TextImageStack.py +++ b/PyMca5/PyMcaIO/TextImageStack.py @@ -33,10 +33,12 @@ __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" import numpy import sys import os +import logging from PyMca5 import DataObject SOURCE_TYPE = "EdfFileStack" -DEBUG = 0 +_logger = logging.getLogger(__name__) + class TextImageStack(DataObject.DataObject): def __init__(self, filelist = None, imagestack=None, dtype=None): @@ -82,9 +84,9 @@ class TextImageStack(DataObject.DataObject): samplingStep = None i = 2 while samplingStep is None: - print("**************************************************") - print(" Memory error!, attempting %dx%d sampling reduction ") % (i,i) - print("**************************************************") + _logger.warning("**************************************************") + _logger.warning(" Memory error!, attempting %dx%d sampling reduction ", i, i) + _logger.warning("**************************************************") s1, s2 = arrRet[::i, ::i].shape try: self.data = numpy.zeros((self.__nFiles, s1, s2), @@ -178,8 +180,8 @@ class TextImageStack(DataObject.DataObject): prefix = name[0:n-i+1] prefix = os.path.join(os.path.dirname(filename),prefix) if not os.path.exists(prefix + number + suffix): - print("Internal error in EDFStack") - print("file should exist: %s " % (prefix + number + suffix)) + _logger.warning("Internal error in EDFStack") + _logger.warning("file should exist: %s ", prefix + number + suffix) return i = 0 if begin is None: @@ -216,7 +218,7 @@ class TextImageStack(DataObject.DataObject): sourceInfo["KeyList"]= self.__keyList def getKeyInfo(self, key): - print("Not implemented") + _logger.info("Not implemented") return {} def isIndexedStack(self): |