Author: tlinnet
Date: Sun Jun 8 23:56:36 2014
New Revision: 23748
URL: http://svn.gna.org/viewcvs/relax?rev=23748&view=rev
Log:
Just a tiny little more speed, by removing temporary storage of chi2
calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion
models for Clustered analysis.
Modified:
branches/disp_spin_speed/target_functions/relax_disp.py
Modified: branches/disp_spin_speed/target_functions/relax_disp.py
URL:
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/target_functions/relax_disp.py?rev=23748&r1=23747&r2=23748&view=diff
==============================================================================
--- branches/disp_spin_speed/target_functions/relax_disp.py (original)
+++ branches/disp_spin_speed/target_functions/relax_disp.py Sun Jun 8
23:56:36 2014
@@ -553,7 +553,6 @@
## Back calculate the R2eff values.
r2eff_CR72(r20a=self.R20A_a, r20b=self.R20B_a, pA=self.pA_a,
dw=self.dw_frq_a, kex=self.kex_a, cpmg_frqs=self.cpmg_frqs_a,
back_calc=self.back_calc_a, num_points=self.num_disp_points_a)
-
## For all missing data points, set the back-calculated value to
the measured values so that it has no effect on the chi-squared value.
if self.has_missing:
# Loop over the spins.
@@ -566,14 +565,8 @@
#self.back_calc[0][si][mi][0][di] =
self.values[0][si][mi][0][di]
self.back_calc_a[0][si][mi][0][di] =
self.values[0][si][mi][0][di]
- ## Calculate and return the chi-squared value.
- #chi2_sum += chi2(self.values[0][si][mi][0],
self.back_calc[0][si][mi][0], self.errors[0][si][mi][0])
-
## Calculate the chi-squared statistic.
- chi2_sum = np.sum((1.0 / self.errors_a * (self.values_a -
self.back_calc_a))**2)
-
- # Return the total chi-squared value.
- return chi2_sum
+ return chi2_sum = np.sum((1.0 / self.errors_a * (self.values_a -
self.back_calc_a))**2)
def calc_ns_cpmg_2site_3D_chi2(self, R20A=None, R20B=None, dw=None,
pA=None, kex=None):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits