Author: semor Date: Fri Jun 17 17:23:14 2011 New Revision: 13114 URL: http://svn.gna.org/viewcvs/relax?rev=13114&view=rev Log: Added '_exp_2param_neg' in the name for the tests currently using the function 'exp_2param_neg'. This is the first step before making a test for the 'inversion-recovery' function 'exp_3param_inv_neg'. Added: branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit_exp_2param_neg.py - copied unchanged from r13113, branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py Removed: branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py Modified: branches/inversion-recovery/test_suite/system_tests/relax_fit.py Modified: branches/inversion-recovery/test_suite/system_tests/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/test_suite/system_tests/relax_fit.py?rev=13114&r1=13113&r2=13114&view=diff ============================================================================== --- branches/inversion-recovery/test_suite/system_tests/relax_fit.py (original) +++ branches/inversion-recovery/test_suite/system_tests/relax_fit.py Fri Jun 17 17:23:14 2011 @@ -127,27 +127,27 @@ self.assertEqual(lines[index][1], '487178.0') - def test_curve_fitting_height(self): + def test_curve_fitting_height_exp_2param_neg(self): """Test the relaxation curve fitting C modules.""" # The intensity type. ds.int_type = 'height' # Execute the script. - self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_fit.py') + self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_fit_exp_2param_neg.py') # Check the curve-fitting results. self.check_curve_fitting() - def test_curve_fitting_volume(self): + def test_curve_fitting_volume_exp_2param_neg(self): """Test the relaxation curve fitting C modules.""" # The intensity type. ds.int_type = 'volume' # Execute the script. - self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_fit.py') + self.interpreter.run(script_file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_fit_exp_2param_neg.py') # Check the curve-fitting results. self.check_curve_fitting() Removed: branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py?rev=13113&view=auto ============================================================================== --- branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py (original) +++ branches/inversion-recovery/test_suite/system_tests/scripts/relax_fit.py (removed) @@ -1,107 +1,0 @@ -# Script for relaxation curve fitting. - -# Python module imports. -from os import sep -import sys - -# relax module imports. -from data import Relax_data_store; ds = Relax_data_store() -from status import Status; status = Status() - - -# Missing intensity type (allow this script to run outside of the system test framework). -if not hasattr(ds, 'int_type'): - ds.int_type = 'height' - - -# Create the data pipe. -pipe.create('rx', 'relax_fit') - -# The path to the data files. -data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting' - -# Load the sequence. -sequence.read('Ap4Aase.seq', dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, res_name_col=2) - -# Name the spins so they can be matched to the assignments. -spin.name(name='N') - -# Spectrum names. -names = [ - 'T2_ncyc1_ave', - 'T2_ncyc1b_ave', - 'T2_ncyc2_ave', - 'T2_ncyc4_ave', - 'T2_ncyc4b_ave', - 'T2_ncyc6_ave', - 'T2_ncyc9_ave', - 'T2_ncyc9b_ave', - 'T2_ncyc11_ave', - 'T2_ncyc11b_ave' -] - -# Relaxation times (in seconds). -times = [ - 0.0176, - 0.0176, - 0.0352, - 0.0704, - 0.0704, - 0.1056, - 0.1584, - 0.1584, - 0.1936, - 0.1936 -] - -# Loop over the spectra. -for i in xrange(len(names)): - # Load the peak intensities. - spectrum.read_intensities(file=names[i]+'.list', dir=data_path, spectrum_id=names[i], int_method=ds.int_type) - - # Set the relaxation times. - relax_fit.relax_time(time=times[i], spectrum_id=names[i]) - -# Specify the duplicated spectra. -spectrum.replicated(spectrum_ids=['T2_ncyc1_ave', 'T2_ncyc1b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc4_ave', 'T2_ncyc4b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc9_ave', 'T2_ncyc9b_ave']) -spectrum.replicated(spectrum_ids=['T2_ncyc11_ave', 'T2_ncyc11b_ave']) - -# Peak intensity error analysis. -spectrum.error_analysis() - -# Deselect unresolved spins. -deselect.read(file='unresolved', dir=data_path, res_num_col=1) - -# Set the relaxation curve type. -relax_fit.select_model('exp_2param_neg') - -# Grid search. -grid_search(inc=11) - -# Minimise. -minimise('simplex', constraints=False) - -# Monte Carlo simulations. -monte_carlo.setup(number=3) -monte_carlo.create_data() -monte_carlo.initial_values() -minimise('simplex', constraints=False) -monte_carlo.error_analysis() - -# Save the relaxation rates. -value.write(param='rx', file='devnull', force=True) - -# Save the results. -results.write(file='devnull', force=True) - -# Create Grace plots of the data. -grace.write(y_data_type='chi2', file='devnull', force=True) # Minimised chi-squared value. -grace.write(y_data_type='i0', file='devnull', force=True) # Initial peak intensity. -grace.write(y_data_type='rx', file='devnull', force=True) # Relaxation rate. -grace.write(x_data_type='relax_times', y_data_type='int', file='devnull', force=True) # Average peak intensities. -grace.write(x_data_type='relax_times', y_data_type='int', norm=True, file='devnull', force=True) # Average peak intensities (normalised). - -# Save the program state. -state.save('devnull', force=True)