Author: tlinnet Date: Fri Aug 22 00:37:49 2014 New Revision: 25191 URL: http://svn.gna.org/viewcvs/relax?rev=25191&view=rev Log: Added start script with basic data for profiling the relax curve fit. Added: trunk/test_suite/shared_data/curve_fitting/profiling/ trunk/test_suite/shared_data/curve_fitting/profiling/errors_arr.npy trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py (with props) trunk/test_suite/shared_data/curve_fitting/profiling/struct_arr.npy trunk/test_suite/shared_data/curve_fitting/profiling/times_arr.npy trunk/test_suite/shared_data/curve_fitting/profiling/values_arr.npy Added: trunk/test_suite/shared_data/curve_fitting/profiling/errors_arr.npy URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/profiling/errors_arr.npy?rev=25191&view=auto ============================================================================== --- trunk/test_suite/shared_data/curve_fitting/profiling/errors_arr.npy (added) +++ trunk/test_suite/shared_data/curve_fitting/profiling/errors_arr.npy Fri Aug 22 00:37:49 2014 @@ -0,0 +1,6 @@ +NUMPY V {'descr': '<f8', 'fortran_order': False, 'shape': (1, 1, 1, 6, 6, 5), } +\Âõ(N@Ház®è@lçû©â@'1¬x @ F¶óýÔ@-²ï¨@Zd;ßO&@Cl@Ãõ(\ö @oÀÊÆ@Âõ(\Í@!°rhð@ï§ÆK@fffffU @V-~@¶óýÔx@ÁÊ¡E¶*@X9´Èv@ªñÒMb× @Clõ@A`åÐâ @\Âõ(@@!°rh|@w¾/Ã@¶óýÔxÏ@-²ï§Ê@®Gáz¦@ ëQ¸Õ@V-²@J+»@¤p= +×T@¬Zd;0 @Zd;ß @d;ßO@ ®GázÇ@5^ºI @Ãõ(\@@R¸ ëÜ@Õxé&1Å@d;ßOÈ @²ï§ÆX@yé&1_ @ï§ÆK @Pn«@\Âõ(/@Ãõ(\t@ClçÇ@áz®G @ ¦Ä °Ñ@NbX9.@¼tV@çû©ñÒì@Õxé&18@®Gáz@¾/ݱ@ÙÎ÷S¸@1¬Z@bX9´ @ = +×£pS@×£p= +F@¾/Ý @}?5^ºÔ@)\Âõ5 @ oÀÊ$@´Èv¾Ö@ +×£p= @Õxé&1i@ªñÒMbQ@ Added: trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py?rev=25191&view=auto ============================================================================== --- trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py (added) +++ trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py Fri Aug 22 00:37:49 2014 @@ -0,0 +1,98 @@ +#!/usr/bin/env python + +############################################################################### +# # +# Copyright (C) 2014 Troels E. Linnet # +# # +# This file is part of the program relax (http://www.nmr-relax.com). # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <http://www.gnu.org/licenses/>. # +# # +############################################################################### + +# Python module imports. +import cProfile +from os import getcwd, path, sep +from numpy import array, arange, int32, float64, pi, load +import pstats +import sys +import tempfile + +# Python 3 support. +try: + import __builtin__ + del __builtin__ +except ImportError: + import builtins + builtins.xrange = builtins.range + +# Add to system path, according to +if len(sys.argv) == 1: + path_to_base = path.join(getcwd(), '..', '..', '..', '..') +else: + path_to_base = path.abspath(sys.argv[1]) + +# Reverse sys path. +sys.path.reverse() +# Add to path. +sys.path.append(path_to_base) +# Reverse sys path. +sys.path.reverse() + +# relax module imports. +from status import Status; status = Status() + + +# Alter setup. +def main(): + param_key_list = [ + 'r1rho_799.77739910_118.078_431.000', + 'r1rho_799.77739910_118.078_651.200', + 'r1rho_799.77739910_118.078_800.500', + 'r1rho_799.77739910_118.078_984.000', + 'r1rho_799.77739910_118.078_1341.110', + 'r1rho_799.77739910_118.078_1648.500', + 'r1rho_799.77739910_124.247_1341.110', + 'r1rho_799.77739910_130.416_800.500', + 'r1rho_799.77739910_130.416_1341.110', + 'r1rho_799.77739910_130.416_1648.500', + 'r1rho_799.77739910_142.754_800.500', + 'r1rho_799.77739910_142.754_1341.110', + 'r1rho_799.77739910_179.768_1341.110', + 'r1rho_799.77739910_241.459_1341.110' + ] + + # Define maximum dimensions. + NE, NS, NM, NO, ND, NT = 1, 1, 1, 6, 6, 5 + + # Define path to data + data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting'+sep+'profiling'+sep + + values_arr = load(data_path + "values_arr.npy") + errors_arr = load(data_path + "errors_arr.npy") + times_arr = load(data_path + "times_arr.npy") + struct_arr = load(data_path + "struct_arr.npy") + + # Print arrays. + for ei in range(NE): + for si in range(NS): + for mi in range(NM): + for oi in range(NO): + for di in range(ND): + print(ei, si, mi, oi, di, values_arr[ei, si, mi, oi, di], struct_arr[ei, si, mi, oi, di]) + + +# Execute main function. +if __name__ == "__main__": + main() Propchange: trunk/test_suite/shared_data/curve_fitting/profiling/profiling_relax_fit.py ------------------------------------------------------------------------------ svn:executable = * Added: trunk/test_suite/shared_data/curve_fitting/profiling/struct_arr.npy URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/profiling/struct_arr.npy?rev=25191&view=auto ============================================================================== --- trunk/test_suite/shared_data/curve_fitting/profiling/struct_arr.npy (added) +++ trunk/test_suite/shared_data/curve_fitting/profiling/struct_arr.npy Fri Aug 22 00:37:49 2014 @@ -0,0 +1,2 @@ +NUMPY V {'descr': '<f8', 'fortran_order': False, 'shape': (1, 1, 1, 6, 6, 5), } + ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? ð? Added: trunk/test_suite/shared_data/curve_fitting/profiling/times_arr.npy URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/profiling/times_arr.npy?rev=25191&view=auto ============================================================================== --- trunk/test_suite/shared_data/curve_fitting/profiling/times_arr.npy (added) +++ trunk/test_suite/shared_data/curve_fitting/profiling/times_arr.npy Fri Aug 22 00:37:49 2014 @@ -0,0 +1,2 @@ +NUMPY V {'descr': '<f8', 'fortran_order': False, 'shape': (1, 1, 1, 6, 6, 5), } + {®Gáz¤?¹?É? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?ìQ¸ ëÁ?É? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?ìQ¸ ëÁ?É? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? {®Gáz¤?¹?É?Ù? Added: trunk/test_suite/shared_data/curve_fitting/profiling/values_arr.npy URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/curve_fitting/profiling/values_arr.npy?rev=25191&view=auto ============================================================================== --- trunk/test_suite/shared_data/curve_fitting/profiling/values_arr.npy (added) +++ trunk/test_suite/shared_data/curve_fitting/profiling/values_arr.npy Fri Aug 22 00:37:49 2014 @@ -0,0 +1,10 @@ +NUMPY V {'descr': '<f8', 'fortran_order': False, 'shape': (1, 1, 1, 6, 6, 5), } +ÍÌÌÌxÂA¡A¸ ëíô@â@ ÍÌÌÌ$a AÍÌÌÌ,>