Hi Troels, This is a great idea!
Cheers, Edward On 11 September 2014 21:31, <[email protected]> wrote: > Author: tlinnet > Date: Thu Sep 11 21:31:48 2014 > New Revision: 25759 > > URL: http://svn.gna.org/viewcvs/relax?rev=25759&view=rev > Log: > Implemented the writing out of a "grace2images.py" script file, when > performing auto analysis of exponential fits. > > Modified: > trunk/auto_analyses/relax_fit.py > > Modified: trunk/auto_analyses/relax_fit.py > URL: > http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_fit.py?rev=25759&r1=25758&r2=25759&view=diff > ============================================================================== > --- trunk/auto_analyses/relax_fit.py (original) > +++ trunk/auto_analyses/relax_fit.py Thu Sep 11 21:31:48 2014 > @@ -23,16 +23,19 @@ > """The automatic relaxation curve fitting protocol.""" > > # Python module imports. > -from os import sep > +from os import chmod, sep > +from os.path import expanduser > +from stat import S_IRWXU, S_IRGRP, S_IROTH > import sys > > # relax module imports. > +from lib.io import get_file_path, open_write_file > +from lib.software.grace import script_grace2images > from lib.text.sectioning import section > from pipe_control.mol_res_spin import spin_loop > from pipe_control.pipes import cdp_name, has_pipe, switch > from prompt.interpreter import Interpreter > from status import Status; status = Status() > - > > > class Relax_fit: > @@ -138,6 +141,26 @@ > self.interpreter.grace.write(x_data_type='relax_times', > y_data_type='peak_intensity', file='intensities.agr', dir=self.grace_dir, > force=True) # Average peak intensities. > self.interpreter.grace.write(x_data_type='relax_times', > y_data_type='peak_intensity', norm=True, file='intensities_norm.agr', > dir=self.grace_dir, force=True) # Average peak intensities (normalised). > > + # Write a python "grace to PNG/EPS/SVG..." conversion script. > + # Open the file for writing. > + file_name = "grace2images.py" > + file_path = get_file_path(file_name=file_name, dir=self.grace_dir) > + file = open_write_file(file_name=file_name, dir=self.grace_dir, > force=True) > + > + # Write the file. > + script_grace2images(file=file) > + > + # Close the batch script, then make it executable (expanding any ~ > characters). > + file.close() > + > + if self.grace_dir: > + dir = expanduser(self.grace_dir) > + chmod(dir + sep + file_name, S_IRWXU|S_IRGRP|S_IROTH) > + else: > + file_name = expanduser(file_name) > + chmod(file_name, S_IRWXU|S_IRGRP|S_IROTH) > + > + > # Display the Grace plots if selected. > if self.view_plots: > self.interpreter.grace.view(file='chi2.agr', dir=self.grace_dir) > > > _______________________________________________ > 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

