mailRe: r25463 - /trunk/specific_analyses/relax_disp/uf.py


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

Header


Content

Posted by Edward d'Auvergne on September 01, 2014 - 14:46:
Hi Troels,

This is fixed now.  The problem was the get_param_values() API method.
It just needed to call r1_setup() to make sure the R1 parameter was
correctly set up (added to the parameter list, or removed) prior to
the parameter values being assembled.  This type of logic might be
required in other API methods in the future!  It allows the
relax_disp.r1_fit user function to not only turn R1 on as a parameter,
but to turn it off as well.

Regards,

Edward



On 1 September 2014 13:41, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
Hi,

Ok.  But could you revert the change first, so the GUI test fails
again and I can use that to test?

Cheers,

Edward


On 1 September 2014 12:51, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
Hi Edward.

Can  you look into this?

It sounds like you have a plan for this.

Best
Troels

On 1 Sep 2014 12:35, "Edward d'Auvergne" <edward@xxxxxxxxxxxxx> wrote:

Hi Troels,

This is not the correct approach for this parameter.  Instead, the
specific_analyses.relax_disp.parameters.r1_setup() function should
always be used.  This function allows R1 to dynamically change as a
parameter or fixed value at any point in the analysis and with any
sequence of events.  The fixed MODEL_PARAMS list should not be
modified.

The r1_setup() function needs to be called whenever the parameters are
accessed, so I don't know where this is missing.  It is called at the
start of all the minimisation, calculation, and back-calculation
functions.  Maybe the call just needs to be added to
specific_analyses.relax_disp.optimisation.minimise_r2eff() to fix the
problem?  It could be that it is called for all models but 'R2eff'.

Regards,

Edward

On 30 August 2014 00:00,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Sat Aug 30 00:00:45 2014
New Revision: 25463

URL: http://svn.gna.org/viewcvs/relax?rev=25463&view=rev
Log:
Fix for 'r1' not being added to parameters, when looking up model in
dictionary.

bug #22541(https://gna.org/bugs/?22541): The R1 fit flag does not work
in the GUI.

Modified:
    trunk/specific_analyses/relax_disp/uf.py

Modified: trunk/specific_analyses/relax_disp/uf.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/uf.py?rev=25463&r1=25462&r2=25463&view=diff

==============================================================================
--- trunk/specific_analyses/relax_disp/uf.py    (original)
+++ trunk/specific_analyses/relax_disp/uf.py    Sat Aug 30 00:00:45 2014
@@ -169,8 +169,19 @@

     # All other models.
     else:
-        params = MODEL_PARAMS[model]
+        # Should r1 parameter be added to params?
+        add_r1 = False

+        # Check if r1_fit is stored in cdp.
+        if hasattr(cdp, 'r1_fit'):
+            if cdp.r1_fit:
+                if 'r1' not in MODEL_PARAMS[model]:
+                    add_r1 = True
+        if add_r1:
+            params = ['r1'] + MODEL_PARAMS[model]
+        else:
+            params = MODEL_PARAMS[model]
+
     # Printout.
     print(MODEL_DESC[model])



_______________________________________________
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

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@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-devel



Related Messages


Powered by MHonArc, Updated Mon Sep 01 15:20:10 2014