mailRe: r25418 - /trunk/specific_analyses/relax_disp/optimisation.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on August 29, 2014 - 11:58:
Hi Troels,

You actually need >= 3 points for fitting an exponential curve, 2
points is not enough, so maybe you can expand on this error.

Regards,

Edward



On 29 August 2014 10:52,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Fri Aug 29 10:52:51 2014
New Revision: 25418

URL: http://svn.gna.org/viewcvs/relax?rev=25418&view=rev
Log:
Added Relax Error, if less than 2 time points is used for exponential curve 
fitting in R2eff.

This follows:

http://thread.gmane.org/gmane.science.nmr.relax.user/1718
http://thread.gmane.org/gmane.science.nmr.relax.user/1735

Specifically, data was attached here:
http://thread.gmane.org/gmane.science.nmr.relax.user/1735/focus=1736

Modified:
    trunk/specific_analyses/relax_disp/optimisation.py

Modified: trunk/specific_analyses/relax_disp/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/optimisation.py?rev=25418&r1=25417&r2=25418&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/optimisation.py  (original)
+++ trunk/specific_analyses/relax_disp/optimisation.py  Fri Aug 29 10:52:51 
2014
@@ -379,6 +379,13 @@
                 values.append(average_intensity(spin=spins[si], 
exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, 
sim_index=sim_index))
                 errors.append(average_intensity(spin=spins[si], 
exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, 
error=True))
                 times.append(time)
+
+            # Raise errors if number of time points is less than 2.
+            if len(times) < 2:
+                subsection(file=sys.stdout, text="Exponential curve 
fitting error for point:", prespace=2)
+                point_info = "%s at %3.1f MHz, for offset=%3.3f ppm and 
dispersion point %-5.1f, with %i time points." % (exp_type, frq/1E6, 
offset, point, len(times))
+                print(point_info)
+                raise RelaxError("The data setup points to exponential 
curve fitting, but only %i time points was found.  If calculating R2eff 
values for fixed relaxation time period data, check that a reference 
intensity has been specified for each offset value."%(len(times)))

             # The scaling matrix in a diagonalised list form.
             scaling_list = []


_______________________________________________
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



Related Messages


Powered by MHonArc, Updated Fri Aug 29 21:00:16 2014