fixed bug in removeExt, it did not work with .gz files
This commit is contained in:
parent
8a92ce981b
commit
0ad7587ede
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue