Hi, This is a difficult problem as R1 values are normally stored in the ri_data dictionary object, the same place that R2 values are stored. I don't have an easy solution for this, but future attempts at unifying the handling of relaxation data in all analyses will affect your current work. For example the 'r1' parameter here will probably be converted into 'ri_data', and the 'ri_data' object set up with a special method in the base Parameter_object class. The 'ri_data' object is correctly handled by value.set and grace.write, but the current implementation in the model-free parameter object is ugly. Does your implementation now work correctly? Regards, Edward On 15 August 2014 18:54, <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet Date: Fri Aug 15 18:54:01 2014 New Revision: 25036 URL: http://svn.gna.org/viewcvs/relax?rev=25036&view=rev Log: Fix in relax_disp API, how to handle the r1_fit parameter type. bug #22470(https://gna.org/bugs/index.php?22470): value.set does not work for parameter r1_fit. Modified: trunk/specific_analyses/relax_disp/api.py Modified: trunk/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=25036&r1=25035&r2=25036&view=diff ============================================================================== --- trunk/specific_analyses/relax_disp/api.py (original) +++ trunk/specific_analyses/relax_disp/api.py Fri Aug 15 18:54:01 2014 @@ -1001,8 +1001,29 @@ if error: obj_name += '_err' + # Handle the R10 parameters. + if param[i] in ['r1_fit']: + # Loop over the current keys. + for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True): + # The parameter key. + key = generate_r20_key(exp_type=exp_type, frq=frq) + + # Initialise the structure if needed. + if not hasattr(spin, obj_name): + setattr(spin, obj_name, {}) + + # Set the value. + if index == None: + obj = getattr(spin, obj_name) + obj[key] = value[i] + + # If the index is specified, let it match the frequency index + elif mi == index: + obj = getattr(spin, obj_name) + obj[key] = value[i] + # Handle the R20 parameters. - if param[i] in PARAMS_R20: + elif param[i] in PARAMS_R20: # Loop over the current keys. for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True): # The parameter key. _______________________________________________ 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