From 2673b5a99646ebc604b5c10a857bfe5fab857ad5 Mon Sep 17 00:00:00 2001 From: David Robert Verelst <dave@dtu.dk> Date: Fri, 8 Sep 2017 14:58:42 +0200 Subject: [PATCH] prepost.GenerateDLCs: set i_seed in case no variable tag seed is used --- wetb/prepost/GenerateDLCs.py | 3 +++ wetb/prepost/hawcstab2.py | 1 + 2 files changed, 4 insertions(+) diff --git a/wetb/prepost/GenerateDLCs.py b/wetb/prepost/GenerateDLCs.py index 0a08058..f4c8375 100644 --- a/wetb/prepost/GenerateDLCs.py +++ b/wetb/prepost/GenerateDLCs.py @@ -79,6 +79,8 @@ class GeneralDLC(object): cases_len.append(len(v)) cases_index = multi_for(list(map(range, cases_len))) + # when no seeds are used, otherwise i_seed is not set + i_seed = -1 if '[wsp]' in variables_order: i_wsp = variables_order.index('[wsp]') len_wsp = len(variables['[wsp]']) @@ -270,6 +272,7 @@ class GenerateDLCCases(GeneralDLC): self.add_constants_tag(dlc, constants) self.add_formulas(dlc, formulas) self.add_formulas(dlc, general_functions) + # TODO: before eval, check if all tags in formula's are present self.eval_formulas(dlc) df = pd.DataFrame(dlc) if not os.path.exists(folder): diff --git a/wetb/prepost/hawcstab2.py b/wetb/prepost/hawcstab2.py index 9eaaf88..65ac0b3 100644 --- a/wetb/prepost/hawcstab2.py +++ b/wetb/prepost/hawcstab2.py @@ -64,6 +64,7 @@ def ReadFileHAWCStab2Header(fname): return df, units +# FIXME: with gradients currently ind has columns width of 28 instead of 14!! class InductionResults(object): def __init__(self): pass -- GitLab