From 80855c0c5841cc72396c84b9b82dfa93a0b72984 Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Thu, 3 Oct 2019 11:39:50 -0400 Subject: [PATCH] BUG: recalculate last step in case it has changed During optimization, we update the ranges before running the 4th and final step with all inputs. If the updating finds that two inputs are too close to optimize separately, they will be combined and the total number of optimization steps will decrease. This was improperly checked before. --- hnn_qt5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hnn_qt5.py b/hnn_qt5.py index d7e476c37..8da8bea7c 100644 --- a/hnn_qt5.py +++ b/hnn_qt5.py @@ -403,7 +403,8 @@ def optmodel (self): # reload opt_params for the last step in case the number of # steps was changed by updateoptparams() - self.opt_params = dconf['opt_info'][total_steps - 1] + final_step = len(dconf['opt_info']) - 1 + self.opt_params = dconf['opt_info'][final_step] txt = "Starting optimization step %d/%d"%(step+1,total_steps) self.updatewaitsimwin(txt)