From 33698d31aec2f0e1926fab426772b6df90799764 Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Fri, 4 Nov 2016 13:55:42 +0100 Subject: [PATCH] wetb.prepost.GenerateDLCs: also update formula field --- wetb/prepost/GenerateDLCs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wetb/prepost/GenerateDLCs.py b/wetb/prepost/GenerateDLCs.py index 4563ccb..5cb2fe9 100644 --- a/wetb/prepost/GenerateDLCs.py +++ b/wetb/prepost/GenerateDLCs.py @@ -134,11 +134,16 @@ class GeneralDLC(object): if formula[0] == '"': if key == '[wsp]' or key == '[gridgustdelay]': fmt = '%2.2i' + formula = formula.replace(key, fmt%int(dlc[key][i])) elif key == '[wdir]' or key == '[G_phi0]': fmt = '%3.3i' + formula = formula.replace(key, fmt%int(dlc[key][i])) + elif key == '[sign]': + fmt = '%s' + formula = formula.replace(key, fmt%dlc[key][i]) else: fmt = '%4.4i' - formula = formula.replace(key, fmt % int(dlc[key][i])) + formula = formula.replace(key, fmt % int(dlc[key][i])) elif key in formula: formula = formula.replace(key, '%s' % dlc[key][i]) formula = formula.replace(',', '.') @@ -269,4 +274,5 @@ if __name__ == '__main__': dest='folder', help='Destination folder name') opt = parser.parse_args() DLB = GenerateDLCCases() - DLB.execute(filename=opt.filename, folder=opt.folder) \ No newline at end of file + DLB.execute(filename=opt.filename, folder=opt.folder) + -- GitLab