diff --git a/xray/utils.py b/xray/utils.py index 066435b..864d844 100644 --- a/xray/utils.py +++ b/xray/utils.py @@ -69,11 +69,11 @@ def timeToStr(delay,fmt="%+.0f"): def removeExt(fname): """ special remove extension meant to work with compressed files.edf and .edf.gz files """ - if fname[-3:] == ".gz": fname = fname[-3:] + if fname[-3:] == ".gz": fname = fname[:-3] return os.path.splitext(fname)[0] def getBasename(fname): - return removeExt(os.path.basename(fname)); + return os.path.basename(removeExt(fname)); def findSlice(array,lims): start = np.ravel(np.argwhere(array>lims[0]))[0]