Mercurial > hg > cfcfd3
changeset 2579:e962723600a6
app/pitot: fixed small bug in pitot condition builder mode
the check which allowed the driver conditions to be specified in
a few different ways (by changing 0.8 to 0.80 etc. in the driver input
strings) didn't actually work for the condition builder. I fixed that now
author | Chris James (c.james4@uq.edu.au) |
---|---|
date | Sun, 26 May 2019 14:43:23 +1000 |
parents | 4b054874569c |
children | 0088711aecbf |
files | app/pitot/pitot.py app/pitot/pitot_input_utils.py |
diffstat | 2 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/app/pitot/pitot.py Sat Jan 12 16:18:56 2019 +1000 +++ b/app/pitot/pitot.py Sun May 26 14:43:23 2019 +1000 @@ -315,7 +315,7 @@ from pitot_output_utils import * from pitot_area_ratio_check import * -VERSION_STRING = "12-Jan-2019" +VERSION_STRING = "26-May-2019" DEBUG_PITOT = False
--- a/app/pitot/pitot_input_utils.py Sat Jan 12 16:18:56 2019 +1000 +++ b/app/pitot/pitot_input_utils.py Sun May 26 14:43:23 2019 +1000 @@ -261,6 +261,22 @@ cfg['driver_gas'] = 'He:1.0' elif cfg['driver_gas'] == 'He:0.6,Ar:0.4': cfg['driver_gas'] = 'He:0.60,Ar:0.40' + elif not cfg['facility'] == 'custom' and condition_builder: + # go through the list of driver conditions and do the same check... + for i, driver_condition in enumerate(cfg['driver_condition_list']): + if ' ' in driver_condition: + driver_condition = driver_condition.replace(" ", "") + print "Kindly removed a rogue space from the driver gas input string." + if driver_condition == 'He:0.8,Ar:0.2': + driver_condition = 'He:0.80,Ar:0.20' + elif driver_condition == 'He:0.9,Ar:0.1': + driver_condition = 'He:0.90,Ar:0.10' + elif driver_condition == 'He:1': + driver_condition = 'He:1.0' + elif driver_condition == 'He:0.6,Ar:0.4': + driver_condition = 'He:0.60,Ar:0.40' + + cfg['driver_condition_list'][i] = driver_condition if 'test_gas' not in cfg: print "No 'test_gas' specified. You need to specify a test gas. Bailing out."