Awesome! That's exactly the change I would have made. I would also suggest to try to increase the system test coverage of this to make sure it works in all cases, as well as to make sure that any future code refactorisation or expansion doesn't break this. The easiest way is to simply add more checks to an already existing test. But the only one possible is the Relax_disp.test_hansen_trunc_data GUI test as I mentioned at http://thread.gmane.org/gmane.science.nmr.relax.devel/5302/focus=5307. Would you like to add a couple of self.assertEqual() checks to that test, just after the peak height error analysis, to make sure that the code works when variance averaging over different SD values is preformed? Such checks would really make the code robust to future changes. Cheers, Edward On 23 April 2014 10:37, <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet Date: Wed Apr 23 10:37:58 2014 New Revision: 22835 URL: http://svn.gna.org/viewcvs/relax?rev=22835&view=rev Log: Fix for bug. The variances used to calculated std, should only be taken from those which are defined in the subset. Regarding bug #21954, (https://gna.org/bugs/index.php?21954) - Order of spectrum.error_analysis is important. Modified: trunk/pipe_control/spectrum.py Modified: trunk/pipe_control/spectrum.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=22835&r1=22834&r2=22835&view=diff ============================================================================== --- trunk/pipe_control/spectrum.py (original) +++ trunk/pipe_control/spectrum.py Wed Apr 23 10:37:58 2014 @@ -183,6 +183,10 @@ # Loop over all time points. for id in cdp.var_I.keys(): + # Only use id's defined in subset + if id not in subset: + continue + # Single spectrum (or extraordinarily accurate NMR spectra!). if cdp.var_I[id] == 0.0: continue _______________________________________________ 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