small bug fix in sfcf read method

This commit is contained in:
jkuhl-uni 2022-02-06 18:08:01 +01:00
parent a839592ea8
commit 02872bc461

View file

@ -184,16 +184,16 @@ def read_sfcf(path, prefix, name, quarks='.*', noffset=0, wf=0, wf2=0,
break break
# print(sub_ls) # print(sub_ls)
for exc in sub_ls: if compact:
if compact: for exc in sub_ls:
if not fnmatch.fnmatch(exc, prefix + '*'): if not fnmatch.fnmatch(exc, prefix + '*'):
sub_ls = list(set(sub_ls) - set([exc])) sub_ls = list(set(sub_ls) - set([exc]))
sub_ls.sort(key=lambda x: sub_ls.sort(key=lambda x: int(re.findall(r'\d+', x)[-1]))
int(re.findall(r'\d+', x)[-1])) else:
else: for exc in sub_ls:
if not fnmatch.fnmatch(exc, 'cfg*'): if not fnmatch.fnmatch(exc, 'cfg*'):
sub_ls = list(set(sub_ls) - set([exc])) sub_ls = list(set(sub_ls) - set([exc]))
sub_ls.sort(key=lambda x: int(x[3:])) sub_ls.sort(key=lambda x: int(x[3:]))
# print(sub_ls) # print(sub_ls)
rep_idl = [] rep_idl = []
no_cfg = len(sub_ls) no_cfg = len(sub_ls)