Author: bugman
Date: Sat Nov 1 18:02:31 2014
New Revision: 26404
URL: http://svn.gna.org/viewcvs/relax?rev=26404&view=rev
Log:
Created an executable Python script for mass converting the frame order matrix
Grace graphs.
The script converts the *.agr files to EPS and PNG files.
Added:
branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py
(with props)
Added:
branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py?rev=26404&view=auto
==============================================================================
---
branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py
(added)
+++
branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py
Sat Nov 1 18:02:31 2014
@@ -0,0 +1,21 @@
+#! /usr/bin/env python
+
+# Python module imports.
+from os import listdir, system
+from os.path import basename, splitext
+from re import search
+
+
+# Loop over all files in the current directory.
+for file_name in listdir('.'):
+ # Only work with *.agr file.
+ if not search('.agr$', file_name):
+ continue
+
+ # The file root.
+ file_root, ext = splitext(file_name)
+ file_root = basename(file_root)
+
+ # Convert to EPS then PDF.
+ system("xmgrace -hdevice EPS -hardcopy -printfile %s.eps %s" % (file_root,
file_name))
+ system("xmgrace -hdevice PNG -hardcopy -printfile %s.png %s" % (file_root,
file_name))
Propchange:
branches/frame_order_cleanup/test_suite/shared_data/frame_order/sim_vs_pred_matrix/convert.py
------------------------------------------------------------------------------
svn:executable = *
_______________________________________________
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