implemented idl into sfcf-read method

This commit is contained in:
jkuhl-uni 2021-12-17 15:16:17 +01:00
commit c5292f8342
2 changed files with 105 additions and 167 deletions

View file

@ -1,14 +1,13 @@
import fnmatch
"""Utilities for the input"""
def check_missing(idl,che):
def check_idl(idl,che):
missing = []
for ind in che:
if not ind in idl:
missing.append(ind)
if(len(missing) == 0):
print("There are no measurements missing.")
else:
print(len(missing),"measurements missing")
for c in che:
if not c in idl:
missing.append(c)
#print missing such that it can directly be parsed to slurm terminal
if not (len(missing) == 0):
print(len(missing),"configs missing")
miss_str = str(missing[0])
for i in missing[1:]:
miss_str += ","+str(i)