diff --git a/src/calculate/optimize/CheKiPEUQ_from_Frhodo.py b/src/calculate/optimize/CheKiPEUQ_from_Frhodo.py index e968f85..d311152 100644 --- a/src/calculate/optimize/CheKiPEUQ_from_Frhodo.py +++ b/src/calculate/optimize/CheKiPEUQ_from_Frhodo.py @@ -102,7 +102,7 @@ def extract_larger_delta_and_make_sigma_values(initial_guess, lower_bound, upper upper_delta = np.abs(upper_bound[index]-initial_guess[index]) lower_delta = np.abs(lower_bound[index]-initial_guess[index]) max_delta = np.max([upper_delta,lower_delta]) - current_sigma = max_delta/float(sigma_multiple) + current_sigma = max_delta/np.float(sigma_multiple) sigma_values[index] = current_sigma return sigma_values diff --git a/src/calculate/optimize/CheKiPEUQ_local/InverseProblem.py b/src/calculate/optimize/CheKiPEUQ_local/InverseProblem.py index e4a8158..38799cc 100644 --- a/src/calculate/optimize/CheKiPEUQ_local/InverseProblem.py +++ b/src/calculate/optimize/CheKiPEUQ_local/InverseProblem.py @@ -176,8 +176,8 @@ def __init__(self, UserInput = None): if len(self.UserInput.responses['responses_observed_weighting']) > 0: UserInput.responses_observed_weighting = np.array(nestedObjectsFunctions.makeAtLeast_2dNested(UserInput.responses['responses_observed_weighting'])) UserInput.responses_observed_weighting = nestedObjectsFunctions.convertInternalToNumpyArray_2dNested(UserInput.responses_observed_weighting) - UserInput.responses_observed_weighting = UserInput.responses_observed_weighting.astype(float) - UserInput.responses_observed_weight_coefficients = copy.deepcopy(UserInput.responses_observed_weighting).astype(float) #initialize the weight_coefficients + UserInput.responses_observed_weighting = UserInput.responses_observed_weighting.astype(np.float) + UserInput.responses_observed_weight_coefficients = copy.deepcopy(UserInput.responses_observed_weighting).astype(np.float) #initialize the weight_coefficients #We'll apply it 1 response at a time. for responseIndex, responseWeightingArray in enumerate(UserInput.responses_observed_weighting): if 0 in responseWeightingArray: #we can't have zeros in weights. So if we have any zeros, we will set the weighting of those to 1E6 times less than other values. diff --git a/src/calculate/optimize/misc_fcns.py b/src/calculate/optimize/misc_fcns.py index 11c2097..ed3c640 100644 --- a/src/calculate/optimize/misc_fcns.py +++ b/src/calculate/optimize/misc_fcns.py @@ -79,7 +79,6 @@ def set_bnds(mech, rxnIdx, keys, coefNames): return coef_bnds - def set_arrhenius_bnds(x0, coefNames): bnds = [[], []] for n, coefName in enumerate(coefNames): diff --git a/src/error_window.py b/src/error_window.py index f86f943..6fcf2d3 100644 --- a/src/error_window.py +++ b/src/error_window.py @@ -80,10 +80,7 @@ def excepthook(type, value, tback): # call the default handler sys.__excepthook__(type, value, tback) - - if "Deprecat" in text or "deprecat" in text: # ignore deprecation warnings - pass - else: - Error_Window(app, path, text) + + Error_Window(app, path, text) return excepthook \ No newline at end of file diff --git a/src/mech_widget.py b/src/mech_widget.py index f3c3b7f..6c7ef01 100644 --- a/src/mech_widget.py +++ b/src/mech_widget.py @@ -97,6 +97,14 @@ def set_trees(self, mech): self._set_mech_tree(self.mech_tree_data) def _set_mech_tree_data(self, selection, mech): + def get_coef_abbreviation(coefName): + if 'activation_energy' == coefName: + return 'Ea' + elif 'pre_exponential_factor' == coefName: + return 'A' + elif 'temperature_exponent' == coefName: + return 'n' + parent = self.parent() data = [] for rxnIdx, rxn in enumerate(mech.gas.reactions()): @@ -130,7 +138,6 @@ def _set_mech_tree_data(self, selection, mech): data.append({'num': rxnIdx, 'eqn': rxn.equation, 'type': rxn_type, 'coeffs': coeffs, 'coeffs_order': coeffs_order}) else: - data.append({'num': rxnIdx, 'eqn': rxn.equation, 'type': rxn_type}) # raise Exception("Equation type is not currently implemented for:\n{:s}".format(rxn.equation))