Commit 2b5659df authored by hm-lehmberg's avatar hm-lehmberg

Squashed 'Tools/SUQController/' changes from b56433db..285c69a1

285c69a1 Merge branch 'master' of gitlab.lrz.de:vadere/suq-controller
53a3d01a fix and minor release
a9c3d010 Handle case of NoDataKeyOutputFile.
b8085693 Merge branch 'master' of gitlab.lrz.de:vadere/suq-controller
b7b9518f Corrected small typo in map_outputtype2index - "NotDataKeyOutputFile".

git-subtree-dir: Tools/SUQController
git-subtree-split: 285c69a13cadbe6d0ab1593e12a755aae0bac5e8
parent cde3219d
......@@ -16,4 +16,4 @@ from suqc.parameter.postchanges import ScenarioChanges
from suqc.qoi import *
from suqc.request import *
__version__ = "1.0"
__version__ = "1.01"
......@@ -73,7 +73,7 @@ class ParameterVariation(metaclass=abc.ABCMeta):
ret = dict(row)
delete_keys = list()
for k, v in ret.items():
if np.isnan(v):
if isinstance(v, np.float) and np.isnan(v):
delete_keys.append(k)
for dk in delete_keys:
......
......@@ -26,7 +26,7 @@ class FileDataInfo(object):
# changes in Vadere. See also vadere issue #199 and #201.
map_outputtype2index = {"IdOutputFile": 1,
"LogEventOutputFile": 1,
"NotDataKeyOutputFile": 0,
"NoDataKeyOutputFile": 0,
"PedestrianIdOutputFile": 1,
"TimestepOutputFile": 1,
"TimestepPedestrianIdOutputFile": 2,
......@@ -125,9 +125,12 @@ class QuantityOfInterest(object):
nr_row_indices = req_qoi.nr_row_indices
df = pd.read_csv(filepath, delimiter=" ", header=[0], comment="#")
idx_keys = df.columns[:nr_row_indices]
return df.set_index(idx_keys.tolist())
if req_qoi.output_key.__eq__("NoDataKeyOutputFile"):
return df
else:
idx_keys = df.columns[:nr_row_indices]
return df.set_index(idx_keys.tolist())
def _add_parid2idx(self, df, par_id):
# from https://stackoverflow.com/questions/14744068/prepend-a-level-to-a-pandas-multiindex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment