Great idea!

Cheers,

Edward


On 5 August 2014 13:52,  <[email protected]> wrote:
> Author: tlinnet
> Date: Tue Aug  5 13:52:31 2014
> New Revision: 24954
>
> URL: http://svn.gna.org/viewcvs/relax?rev=24954&view=rev
> Log:
> Extended the writing and checking of parameters, to use different file name, 
> than the parameter name.
>
> sr #3135(https://gna.org/support/?3135): Optimisation of the R1 relaxation 
> rate for the off-resonance R1rho relaxation dispersion models.
>
> Modified:
>     branches/R1_fitting/auto_analyses/relax_disp.py
>
> Modified: branches/R1_fitting/auto_analyses/relax_disp.py
> URL: 
> http://svn.gna.org/viewcvs/relax/branches/R1_fitting/auto_analyses/relax_disp.py?rev=24954&r1=24953&r2=24954&view=diff
> ==============================================================================
> --- branches/R1_fitting/auto_analyses/relax_disp.py     (original)
> +++ branches/R1_fitting/auto_analyses/relax_disp.py     Tue Aug  5 13:52:31 
> 2014
> @@ -626,10 +626,8 @@
>              # The R1_fit parameter.
>              self.write_results_test(path=path, model=model, 
> models_tested=models_tested, param='r1_fit')
>
> -            # The R1rho0 parameter.
> -            if model in [None] + MODEL_LIST_R1RHO:
> -                self.interpreter.value.write(param='r2', file='r1rho0.out', 
> dir=path, force=True)
> -                self.interpreter.grace.write(x_data_type='res_num', 
> y_data_type='r2', file='r1rho0.agr', dir=path, force=True)
> +            # The R1rho prime parameter.
> +            self.write_results_test(path=path, model=model, 
> models_tested=models_tested, param='r2', file_name_ini='r1rho_prime')
>
>          # The pA and pB parameters.
>          self.write_results_test(path=path, model=model, 
> models_tested=models_tested, param='pA')
> @@ -684,7 +682,7 @@
>          self.interpreter.results.write(file='results', dir=path, force=True)
>
>
> -    def write_results_test(self, path=None, model=None, models_tested=None, 
> param=None):
> +    def write_results_test(self, path=None, model=None, models_tested=None, 
> param=None, file_name_ini=None):
>          """Create a set of results, text and Grace files for the current 
> data pipe.
>
>          @keyword path:              The directory to place the files into.
> @@ -695,7 +693,13 @@
>          @type model_tested:         None or list of str.
>          @keyword param:             The param to write out.
>          @type param:                None or list of str.
> +        @keyword file_name_ini:     The initial part of the file name for 
> the grace and text files.
> +        @type file_name_ini:        None or str.
>          """
> +
> +        # If not set, use the name of the parameter.
> +        if file_name_ini == None:
> +            file_name_ini = param
>
>          # If the model is in the list of models which support the parameter.
>          write_result = False
> @@ -719,5 +723,5 @@
>
>          # Write results if some of the models supports the parameter.
>          if write_result:
> -            self.interpreter.value.write(param=param, file='%s.out'%param, 
> dir=path, force=True)
> -            self.interpreter.grace.write(x_data_type='res_num', 
> y_data_type=param, file='%s.agr'%param, dir=path, force=True)
> +            self.interpreter.value.write(param=param, 
> file='%s.out'%file_name_ini, dir=path, force=True)
> +            self.interpreter.grace.write(x_data_type='res_num', 
> y_data_type=param, file='%s.agr'%file_name_ini, dir=path, force=True)
>
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-commits mailing list
> [email protected]
>
> 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
[email protected]

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

Reply via email to