diff --git a/hexrd/wppf/WPPF.py b/hexrd/wppf/WPPF.py index 45a326925..b93ee0fab 100644 --- a/hexrd/wppf/WPPF.py +++ b/hexrd/wppf/WPPF.py @@ -2287,7 +2287,7 @@ def _set_params_vals_to_class(self, params, init=False, skip_phases=False): if updated_lp or updated_atominfo: self.calcsf() - self.phases.phase_fraction = pf + self.phases.phase_fraction = pf/np.sum(pf) def _update_shkl(self, params): """ diff --git a/hexrd/wppf/phase.py b/hexrd/wppf/phase.py index fe6c81505..48f9dc08c 100644 --- a/hexrd/wppf/phase.py +++ b/hexrd/wppf/phase.py @@ -1558,7 +1558,8 @@ def phase_fraction(self): for k in self: l = list(self.wavelength.keys())[0] pf.append(self[k][l].pf) - return np.array(pf) + pf = np.array(pf) + return pf/np.sum(pf) @phase_fraction.setter def phase_fraction(self, val):