r21206 - in /branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013: ./ peak_lists/

2013-10-21 Thread tlinnet
Author: tlinnet
Date: Mon Oct 21 19:56:20 2013
New Revision: 21206

URL: http://svn.gna.org/viewcvs/relax?rev=21206view=rev
Log:
Added test data where both the spin-lock time, the spin lock offset and the 
spin lock field is varied.

The data is published in:
A Folded Excited State of Ligand-Free Nuclear Coactivator Binding Domain (NCBD) 
Underlies Plasticity in Ligand Recognition.
Kjaergaard, M., Andersen, L., Nielsen, L.D.  Teilum, K. (2013).
Biochemistry 52, 1686–1693

with experimental conditions that
off-resonance R1rho relaxation dispersion experiments on 15N were recorded at 
18.8 T and 31 C.
using the pulse sequence of Mulder et al. with spin-lock field strengths from 
431 to 1649 Hz and offsets ranging from 0 to 1 Hz.


Added:
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters_sort.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/10_2000_46_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/11_500_46_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/12_500_46_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/13_500_46_40_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/14_500_46_4_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/15_500_46_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/16_5000_46_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/17_5000_46_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/18_5000_46_40_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/19_5000_46_4_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/1_0_46_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/20_5000_46_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/21_1000_46_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/22_1000_46_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/23_1000_46_40_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/24_1000_46_4_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/25_1000_46_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/26_1_46_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/27_1_46_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/28_1_46_40_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/29_1_46_4_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/2_0_46_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/30_1_46_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/31_0_43_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/32_0_43_10_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/33_0_43_40_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/34_0_43_4_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/35_0_43_20_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/36_0_39_0_max_standard.ser

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/peak_lists/37_0_39_10_max_standard.ser

branches/relax_disp

r21210 - /branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/

2013-10-22 Thread tlinnet
Author: tlinnet
Date: Tue Oct 22 13:09:22 2013
New Revision: 21210

URL: http://svn.gna.org/viewcvs/relax?rev=21210view=rev
Log:
Modified settings script for R1rho test dataset.


Modified:

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py

Modified: 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt?rev=21210r1=21209r2=21210view=diff
==
--- 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt
 (original)
+++ 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/NOTES.txt
 Tue Oct 22 13:09:22 2013
@@ -172,6 +172,6 @@
   cd ..
 end
 
-# The calibration values is found from: 
Original_data/NCBD_31C_WT_0Murea_t1rho/expList.txt
-power_to_offset_Hz = {'35': 321.1, '39': 509, '41': 640.8, '43': 806.7, '46': 
1139.6, '48': 1434.7}
+# The calibration values is found from: 
Original_data/NCBD_31C_WT_0Murea_t1rho/decayFiles/expList.txt
+spin_lock_field_strengths_Hz = {'35': 431.0, '39': 651.2, '41': 800.5, '43': 
984.0, '46': 1341.11, '48': 1648.5}
 

Modified: 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt?rev=21210r1=21209r2=21210view=diff
==
--- 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
 (original)
+++ 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
 Tue Oct 22 13:09:22 2013
@@ -27,42 +27,42 @@
 0.0 
 0.0 
 0.0 
-0.981284859463 
-0.981284859463 
-0.981284859463 
-0.981284859463 
-0.981284859463 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-1.96256971893 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-3.92513943785 
-9.81284859463 
-9.81284859463 
-9.81284859463 
-9.81284859463 
-9.81284859463 
-19.6256971893 
-19.6256971893 
-19.6256971893 
-19.6256971893 
+0.625173955356 
+0.625173955356 
+0.625173955356 
+0.625173955356 
+0.625173955356 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+1.25034791071 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+2.50069582143 
+6.25173955356 
+6.25173955356 
+6.25173955356 
+6.25173955356 
+6.25173955356 
+12.5034791071 
+12.5034791071 
+12.5034791071 
+12.5034791071 

Modified: 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py?rev=21210r1=21209r2=21210view=diff
==
--- 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
 (original)
+++ 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
 Tue Oct 22 13:09:22 2013
@@ -5,12 +5,8 @@
 
 # The lock power to field, has been found in an calibration experiment.
 # lock_powers = [35.0, 39.0, 41.0, 43.0, 46.0, 48.0]
-spin_lock_field_strengths_Hz = {'35': 321.1, '39': 509., '41': 640.8, '43': 
806.7, '46': 1139.6, '48': 1434.7}
+spin_lock_field_strengths_Hz = {'35': 431.0, '39': 651.2, '41': 800.5, '43': 
984.0, '46': 1341.11, '48': 1648.5}
 ncycs = [0, 4, 10, 14, 20, 40]
-
-# dw(ppm) = dw(rad.s^-1) * 10^6 * 1/(2*pi) * 
(gyro1H/(gyro15N*spectrometer_freq)) = 2.45E3 * 1E6 / (2 * math.pi) * 
(26.7522212E7/(-2.7126E7 * 599.8908622E6)) = -6.41 ppm.
-gyro1H = 26.7522212E7
-gyro15N = 2.7126E7
 
 # Load the experiments settings file.
 expfile = open('exp_parameters_sort.txt','r')
@@ -37,7 +33,6 @@
 ss = int(line.split()[6])
 set_sfrq = float(line.split()[7])
 spin_lock_field_strength = spin_lock_field_strengths_Hz[dpwr2slock]
-#offset_ppm = 
 
 # Calculate spin_lock time
 time_sl = 2*ncyc*trim
@@ -63,12

r21217 - /branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/

2013-10-22 Thread tlinnet
Author: tlinnet
Date: Tue Oct 22 20:08:52 2013
New Revision: 21217

URL: http://svn.gna.org/viewcvs/relax?rev=21217view=rev
Log:
Correcting the R1rho settings script for the right calculation of the spin-lock 
offset, omega_rf, in ppm when offset values are provided in Hz.


Modified:

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py

branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py

Modified: 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt?rev=21217r1=21216r2=21217view=diff
==
--- 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
 (original)
+++ 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/omega_rf_ppm.txt
 Tue Oct 22 20:08:52 2013
@@ -1,68 +1,68 @@
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.0 
-0.625173955356 
-0.625173955356 
-0.625173955356 
-0.625173955356 
-0.625173955356 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-1.25034791071 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-2.50069582143 
-6.25173955356 
-6.25173955356 
-6.25173955356 
-6.25173955356 
-6.25173955356 
-12.5034791071 
-12.5034791071 
-12.5034791071 
-12.5034791071 
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 0.0 118.078
+8105.0 118.078 6.16903146206 124.247031462
+8105.0 118.078 6.16903146206 124.247031462
+8105.0 118.078 6.16903146206 124.247031462
+8105.0 118.078 6.16903146206 124.247031462
+8105.0 118.078 6.16903146206 124.247031462
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 12.3380629241 130.416062924
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 24.6761258482 142.754125848
+8105.0 118.078 61.6903146206 179.768314621
+8105.0 118.078 61.6903146206 179.768314621
+8105.0 118.078 61.6903146206 179.768314621
+8105.0 118.078 61.6903146206 179.768314621
+8105.0 118.078 61.6903146206 179.768314621
+8105.0 118.078 123.380629241 241.458629241
+8105.0 118.078 123.380629241 241.458629241
+8105.0 118.078 123.380629241 241.458629241
+8105.0 118.078 123.380629241 241.458629241

Modified: 
branches/relax_disp/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion

r21746 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-03 Thread tlinnet
Author: tlinnet
Date: Tue Dec  3 16:57:35 2013
New Revision: 21746

URL: http://svn.gna.org/viewcvs/relax?rev=21746view=rev
Log:
Fix for Optimisation of Dr. Flemming Hansen's CPMG data to the 'NS CPMG 2-site 
star' dispersion model.

Fix for bug #21322, (https://gna.org/bugs/?21322) - 5x Test suite fail for 
version 3.1.0
Reported for system CentOS 2.6.32-358.18.1.el6.x86_64.
Adjusted pA, dw, kex, chi2.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21746r1=21745r2=21746view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec  3 16:57:35 2013
@@ -1325,10 +1325,10 @@
 
 # Checks for residue :71.
 self.assertAlmostEqual(spin71.r2[r20_key1], 4.992594256544, 1)
-self.assertAlmostEqual(spin71.pA, 0.992258541625787, 3)
-self.assertAlmostEqual(spin71.dw, 2.75140650899058, 1)
-self.assertAlmostEqual(spin71.kex/1000, 2106.60885247431/1000, 1)
-self.assertAlmostEqual(spin71.chi2/100, 17.3293856656588/100, 2)
+self.assertAlmostEqual(spin71.pA, 0.992258541625787, 2)
+self.assertAlmostEqual(spin71.dw, 2.75140650899058, 0)
+self.assertAlmostEqual(spin71.kex/1000, 2106.60885247431/1000, 0)
+self.assertAlmostEqual(spin71.chi2/100, 17.3293856656588/100, 1)
 
 # Test the conversion to k_AB from kex and pA.
 self.assertEqual(spin70.k_AB, spin70.kex * (1.0 - spin70.pA))


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21747 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-03 Thread tlinnet
Author: tlinnet
Date: Tue Dec  3 16:58:33 2013
New Revision: 21747

URL: http://svn.gna.org/viewcvs/relax?rev=21747view=rev
Log:
Fix for Optimisation of the Korzhnev et al., 2005 15N DQ CPMG data using the 
'MMQ 2-site' model.

Fix for bug #21322, (https://gna.org/bugs/?21322) - 5x Test suite fail for 
version 3.1.0
Reported for system CentOS 2.6.32-358.18.1.el6.x86_64.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21747r1=21746r2=21747view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec  3 16:58:33 2013
@@ -1581,13 +1581,13 @@
 print(%-20s %20.15g\n % (chi2, spin.chi2))
 
 # Checks for residue :9.
-self.assertAlmostEqual(spin.r2[r20_key1], 9.48527908326952, 3)
+self.assertAlmostEqual(spin.r2[r20_key1], 9.48527908326952, 2)
 self.assertAlmostEqual(spin.r2[r20_key2], 11.7135951595536, 3)
-self.assertAlmostEqual(spin.r2[r20_key3], 13.6153887849344, 3)
+self.assertAlmostEqual(spin.r2[r20_key3], 13.6153887849344, 2)
 self.assertAlmostEqual(spin.pA, 0.965638501551899, 4)
-self.assertAlmostEqual(spin.dw, 2.8537583461577, 4)
-self.assertAlmostEqual(spin.dwH, -0.387633062766635, 4)
-self.assertAlmostEqual(spin.kex/1000, 573.704033851592/1000, 4)
+self.assertAlmostEqual(spin.dw, 2.8537583461577, 2)
+self.assertAlmostEqual(spin.dwH, -0.387633062766635, 3)
+self.assertAlmostEqual(spin.kex/1000, 573.704033851592/1000, 3)
 self.assertAlmostEqual(spin.chi2, 9.29563496654824, 2)
 
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21748 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-03 Thread tlinnet
Author: tlinnet
Date: Tue Dec  3 16:59:37 2013
New Revision: 21748

URL: http://svn.gna.org/viewcvs/relax?rev=21748view=rev
Log:
Fix for Optimisation of the Korzhnev et al., 2005 15N MQ CPMG data using the 
'MMQ 2-site' model.

Fix for bug #21322, (https://gna.org/bugs/?21322) - 5x Test suite fail for 
version 3.1.0
Reported for system CentOS 2.6.32-358.18.1.el6.x86_64.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21748r1=21747r2=21748view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec  3 16:59:37 2013
@@ -1656,7 +1656,7 @@
 self.assertAlmostEqual(spin.r2[r20_key1], 6.02016436619016, 1)
 self.assertAlmostEqual(spin.r2[r20_key2], 6.65421500772308, 1)
 self.assertAlmostEqual(spin.r2[r20_key3], 8.6729591487622, 1)
-self.assertAlmostEqual(spin.pA, 0.930083249288083, 4)
+self.assertAlmostEqual(spin.pA, 0.930083249288083, 3)
 self.assertAlmostEqual(spin.dw, 4.33890689462363, 2)
 self.assertAlmostEqual(spin.dwH, -0.274316585638047, 3)
 self.assertAlmostEqual(spin.kex/1000, 344.329651956132/1000, 3)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21749 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-03 Thread tlinnet
Author: tlinnet
Date: Tue Dec  3 17:00:43 2013
New Revision: 21749

URL: http://svn.gna.org/viewcvs/relax?rev=21749view=rev
Log:
Fix for Optimisation of the Korzhnev et al., 2005 15N ZQ CPMG data using the 
'MMQ 2-site' model.

Fix for bug #21322, (https://gna.org/bugs/?21322) - 5x Test suite fail for 
version 3.1.0
Reported for system CentOS 2.6.32-358.18.1.el6.x86_64.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21749r1=21748r2=21749view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec  3 17:00:43 2013
@@ -1800,7 +1800,7 @@
 self.assertAlmostEqual(spin.dw, 0.850592422908884, 1)
 self.assertAlmostEqual(spin.dwH, 0.0881272284455416, 3)
 self.assertAlmostEqual(spin.kex/1000, 372.745483351305/1000, 3)
-self.assertAlmostEqual(spin.chi2, 23.8464637019392, 2)
+self.assertAlmostEqual(spin.chi2, 23.8464637019392, 1)
 
 
 def test_korzhnev_2005_1h_mq_data(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21752 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-03 Thread tlinnet
Author: tlinnet
Date: Tue Dec  3 17:19:16 2013
New Revision: 21752

URL: http://svn.gna.org/viewcvs/relax?rev=21752view=rev
Log:
Fix for Optimisation of Dr. Flemming Hansen's CPMG data to the 'NS CPMG 2-site 
star' dispersion model. 
Changed so assertAlmostEqual matches 2 digits.

Fix for bug #21322, (https://gna.org/bugs/?21322) - 5x Test suite fail for 
version 3.1.0
Reported for system CentOS 2.6.32-358.18.1.el6.x86_64.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21752r1=21751r2=21752view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec  3 17:19:16 2013
@@ -1326,8 +1326,8 @@
 # Checks for residue :71.
 self.assertAlmostEqual(spin71.r2[r20_key1], 4.992594256544, 1)
 self.assertAlmostEqual(spin71.pA, 0.992258541625787, 2)
-self.assertAlmostEqual(spin71.dw, 2.75140650899058, 0)
-self.assertAlmostEqual(spin71.kex/1000, 2106.60885247431/1000, 0)
+self.assertAlmostEqual(spin71.dw/100, 2.75140650899058/100, 2)
+self.assertAlmostEqual(spin71.kex/10, 2106.60885247431/10, 2)
 self.assertAlmostEqual(spin71.chi2/100, 17.3293856656588/100, 1)
 
 # Test the conversion to k_AB from kex and pA.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21788 - /trunk/gui/wizards/peak_intensity.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 12:28:06 2013
New Revision: 21788

URL: http://svn.gna.org/viewcvs/relax?rev=21788view=rev
Log:
Fix for loading a seriesTab formatted intensity, and getting the ID for the 
following GUI elements.

Fix for bug #21076, (https://gna.org/bugs/?21076) - When loading a 
multi-spectra NMRPipe seriesTab file through the GUI, several Error messages 
occur.

Modified:
trunk/gui/wizards/peak_intensity.py

Modified: trunk/gui/wizards/peak_intensity.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/wizards/peak_intensity.py?rev=21788r1=21787r2=21788view=diff
==
--- trunk/gui/wizards/peak_intensity.py (original)
+++ trunk/gui/wizards/peak_intensity.py Thu Dec  5 12:28:06 2013
@@ -317,6 +317,11 @@
 # Use only the first element.
 id = id[0]
 
+# Handle keyword 'auto'.
+if id == 'auto':
+# Return the first ID.
+id = 'Z_A0'
+
 # Set the ID in the page.
 page = self.get_page(self.page_indices[page_key])
 if index == None:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21789 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 14:10:55 2013
New Revision: 21789

URL: http://svn.gna.org/viewcvs/relax?rev=21789view=rev
Log:
Implemented GUI test, which caches the bug.

Fix for bug #21076, (https://gna.org/bugs/?21076) - When loading a 
multi-spectra NMRPipe seriesTab file through the GUI, several Error messages 
occur.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21789r1=21788r2=21789view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Thu Dec  5 14:10:55 2013
@@ -134,6 +134,60 @@
 # The errors.
 self.assert_(hasattr(spin, 'baseplane_rmsd'))
 self.assertEqual(spin.baseplane_rmsd['0_2'], 3000.0)
+
+
+def test_bug_21076_multi_col_peak_list(self):
+Test catching U{bug #21076https://gna.org/bugs/?21076}, loading a 
multi-spectra NMRPipe seriesTab file through the GUI, Error messages occur. 
Submitted by Troels E. Linnet.
+
+# The paths to the data files.
+data_path = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'dispersion' + sep + 'KTeilum_FMPoulsen_MAkke_2006' + sep 
+ 'acbp_cpmg_disp_101MGuHCl_40C_041223' + sep
+
+# Simulate the new analysis wizard, selecting the fixed time CPMG 
experiment.
+self.app.gui.analysis.menu_new(None)
+page = self.app.gui.analysis.new_wizard.wizard.get_page(0)
+page.select_disp(None)
+self.app.gui.analysis.new_wizard.wizard._go_next(None)
+self.app.gui.analysis.new_wizard.wizard._go_next(None)
+
+# Get the data.
+analysis_type, analysis_name, pipe_name, pipe_bundle, uf_exec = 
self.app.gui.analysis.new_wizard.get_data()
+
+# Set up the analysis.
+self.app.gui.analysis.new_analysis(analysis_type=analysis_type, 
analysis_name=analysis_name, pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
uf_exec=uf_exec)
+
+# Alias the analysis.
+analysis = self.app.gui.analysis.get_page_from_name(Relaxation 
dispersion)
+
+# Change the results directory.
+analysis.field_results_dir.SetValue(str_to_gui(ds.tmpdir))
+
+# Load the sequence.
+file = data_path + 'relax_2_spins_trunc.py'
+self._execute_uf(uf_name='script', file=file, dir=None)
+
+# Flush the interpreter in preparation for the synchronous user 
functions of the peak list wizard.
+interpreter.flush()
+
+# Set up the nuclear isotopes.
+analysis.spin_isotope()
+uf_store['spin.isotope'].page.SetValue('spin_id', '')
+uf_store['spin.isotope'].wizard._go_next()
+interpreter.flush()# Required because of the asynchronous uf call.
+
+# Set up the peak intensity wizard.
+analysis.peak_wizard_launch(None)
+wizard = analysis.peak_wizard
+
+# The spectrum.
+page = wizard.get_page(wizard.page_indices['read'])
+
page.uf_args['file'].SetValue(str_to_gui(%sfolded_sparky_corr_final_max_standard_trunc.ser
 % data_path))
+page.uf_args['spectrum_id'].SetValue(['auto'])
+wizard._go_next(None)
+
+# The error type.
+page = wizard.get_page(wizard.page_indices['err_type'])
+page.selection = 'rmsd'
+wizard._go_next(None)
 
 
 def test_hansen_trunc_data(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21794 - /trunk/test_suite/system_tests/sequence.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 17:24:16 2013
New Revision: 21794

URL: http://svn.gna.org/viewcvs/relax?rev=21794view=rev
Log:
System test for sequence read expanded to include assertions of correct data.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/sequence.py

Modified: trunk/test_suite/system_tests/sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/sequence.py?rev=21794r1=21793r2=21794view=diff
==
--- trunk/test_suite/system_tests/sequence.py (original)
+++ trunk/test_suite/system_tests/sequence.py Thu Dec  5 17:24:16 2013
@@ -267,7 +267,18 @@
 
 # Read the sequence.
 self.interpreter.sequence.read(file='test_seq', 
dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, 
res_name_col=2)
-
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 5)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, -2)
+self.assertEqual(cdp.mol[0].res[0].name, 'Gly')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, None)
 
 def test_sequence_copy(self):
 Test the sequence.copy user function.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21801 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 22:48:18 2013
New Revision: 21801

URL: http://svn.gna.org/viewcvs/relax?rev=21801view=rev
Log:
Expanded system test and made it pass for user function spectrum.read_spins.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21801r1=21800r2=21801view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Thu Dec  5 22:48:18 2013
@@ -157,8 +157,44 @@
 self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
 self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
 self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
-#self.assertEqual(cdp.mol[0].res[0].spin[0].name, None)
-
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 4)
+self.assertEqual(cdp.mol[0].res[1].name, 'GLY')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 5)
+self.assertEqual(cdp.mol[0].res[2].name, 'SER')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+
+# 4th residue.
+self.assertEqual(cdp.mol[0].res[3].num, 6)
+self.assertEqual(cdp.mol[0].res[3].name, 'MET')
+self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
+self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
+
+# 5th residue.
+self.assertEqual(cdp.mol[0].res[4].num, 40)
+self.assertEqual(cdp.mol[0].res[4].name, 'TRP')
+self.assertEqual(len(cdp.mol[0].res[4].spin), 2)
+self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[4].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[1].name, 'NE1')
+
+# 6th residue.
+self.assertEqual(cdp.mol[0].res[5].num, 55)
+self.assertEqual(cdp.mol[0].res[5].name, 'ASN')
+self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
+self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
 
 def test_read_peak_list_generic(self):
 Test the reading of a generic peak intensity list.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21800 - /trunk/lib/spectrum/sparky.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 22:48:16 2013
New Revision: 21800

URL: http://svn.gna.org/viewcvs/relax?rev=21800view=rev
Log:
Extended reading of sparky files, to include residue names.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21800r1=21799r2=21800view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Thu Dec  5 22:48:16 2013
@@ -130,6 +130,12 @@
 except:
 raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s'. % line[0])
 
+# The residue name.
+try:
+res_name = row1[-4]
+except:
+raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s' for residue name. % line[0])
+
 # Chemical shifts.
 w1 = None
 w2 = None
@@ -165,13 +171,13 @@
 
 # Add the assignment to the peak list object.
 if dim == 1:
-peak_list.add(res_nums=[res_num], spin_names=[name1], shifts=[w1], 
intensity=intensity)
+peak_list.add(res_nums=[res_num], res_names=[res_name], 
spin_names=[name1], shifts=[w1], intensity=intensity)
 elif dim == 2:
-peak_list.add(res_nums=[res_num, res_num], spin_names=[name1, 
name2], shifts=[w1, w2], intensity=intensity)
+peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
 elif dim == 3:
-peak_list.add(res_nums=[res_num, res_num, res_num], 
spin_names=[name1, name2, name3], shifts=[w1, w2, w3], intensity=intensity)
+peak_list.add(res_nums=[res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
 elif dim == 4:
-peak_list.add(res_nums=[res_num, res_num, res_num, res_num], 
spin_names=[name1, name2, name3, name4], shifts=[w1, w2, w3, w4], 
intensity=intensity)
+peak_list.add(res_nums=[res_num, res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name, res_name], spin_names=[name1, name2, 
name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
 
 
 def write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, 
atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, 
force=True):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21798 - /trunk/pipe_control/spectrum.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 22:48:13 2013
New Revision: 21798

URL: http://svn.gna.org/viewcvs/relax?rev=21798view=rev
Log:
Created the back end function for the read_spins function.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=21798r1=21797r2=21798view=diff
==
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Thu Dec  5 22:48:13 2013
@@ -37,7 +37,7 @@
 from lib.statistics import std
 from lib.warnings import RelaxWarning, RelaxNoSpinWarning
 from pipe_control import pipes
-from pipe_control.mol_res_spin import check_mol_res_spin_data, 
generate_spin_id_unique, return_spin, spin_loop
+from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin, 
generate_spin_id_unique, return_spin, spin_loop
 
 
 def __errors_height_no_repl():
@@ -609,6 +609,57 @@
 write_data(out=sys.stdout, headings=[Spin_ID, Intensity], 
data=data)
 
 
+def read_spins(file=None, dir=None, dim=1, spin_id_col=None, 
mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, 
spin_name_col=None, sep=None, spin_id=None, verbose=True):
+Read the peak intensity data.
+
+@keyword file:  The name of the file containing the peak 
intensities.
+@type file: str
+@keyword dir:   The directory where the file is located.
+@type dir:  str
+@keyword dim:   The dimension of the peak list to associate the 
data with.
+@type dim:  int
+@keyword spin_id_col:   The column containing the spin ID strings (used by 
the generic intensity file format).  If supplied, the mol_name_col, 
res_name_col, res_num_col, spin_name_col, and spin_num_col arguments must be 
none.
+@type spin_id_col:  int or None
+@keyword mol_name_col:  The column containing the molecule name 
information (used by the generic intensity file format).  If supplied, 
spin_id_col must be None.
+@type mol_name_col: int or None
+@keyword res_name_col:  The column containing the residue name information 
(used by the generic intensity file format).  If supplied, spin_id_col must be 
None.
+@type res_name_col: int or None
+@keyword res_num_col:   The column containing the residue number 
information (used by the generic intensity file format).  If supplied, 
spin_id_col must be None.
+@type res_num_col:  int or None
+@keyword spin_name_col: The column containing the spin name information 
(used by the generic intensity file format).  If supplied, spin_id_col must be 
None.
+@type spin_name_col:int or None
+@keyword spin_num_col:  The column containing the spin number information 
(used by the generic intensity file format).  If supplied, spin_id_col must be 
None.
+@type spin_num_col: int or None
+@keyword sep:   The column separator which, if None, defaults to 
whitespace.
+@type sep:  str or None
+@keyword spin_id:   The spin ID string used to restrict data loading 
to a subset of all spins.  If 'auto' is provided for a NMRPipe seriesTab 
formatted file, the ID's are auto generated in form of Z_Ai.
+@type spin_id:  None or str
+@keyword verbose:   A flag which if True will cause all relaxation 
data loaded to be printed out.
+@type verbose:  bool
+
+
+# Data checks.
+pipes.test()
+
+# Check the file name.
+if file == None:
+raise RelaxError(The file name must be supplied.)
+
+# Read the peak list data.
+peak_list = read_peak_list(file=file, dir=dir, spin_id_col=spin_id_col, 
mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, 
spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, 
spin_id=spin_id)
+
+# Loop over the peak_list.
+for assign in peak_list:
+mol_name = assign.mol_names[dim-1]
+res_num = assign.res_nums[dim-1]
+res_name = assign.res_names[dim-1]
+spin_num = assign.spin_nums[dim-1]
+spin_name = assign.spin_names[dim-1]
+# Create the spin
+create_spin(spin_num=spin_num, spin_name=spin_name, res_num=res_num, 
res_name=res_name, mol_name=mol_name)
+
+# Test that data exists.
+check_mol_res_spin_data()
 
 def replicated(spectrum_ids=None):
 Set which spectra are replicates.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21797 - /trunk/user_functions/spectrum.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 22:48:11 2013
New Revision: 21797

URL: http://svn.gna.org/viewcvs/relax?rev=21797view=rev
Log:
Added interpreter.spectrum.read_spins function.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/user_functions/spectrum.py

Modified: trunk/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/spectrum.py?rev=21797r1=21796r2=21797view=diff
==
--- trunk/user_functions/spectrum.py (original)
+++ trunk/user_functions/spectrum.py Thu Dec  5 22:48:11 2013
@@ -363,6 +363,113 @@
 uf.wizard_image = WIZARD_IMAGE_PATH + 'spectrum' + sep + 'spectrum_200.png'
 
 
+# The spectrum.read_spins user function.
+uf = uf_info.add_uf('spectrum.read_spins')
+uf.title = Read peak assignments from a file and create spins.
+uf.title_short = Peak assignments reading.
+uf.add_keyarg(
+name = file,
+py_type = str,
+arg_type = file sel,
+desc_short = file name,
+desc = The name of the file containing the intensity data.,
+wiz_filesel_style = FD_OPEN
+)
+uf.add_keyarg(
+name = dir,
+py_type = str,
+arg_type = dir,
+desc_short = directory name,
+desc = The directory where the file is located.,
+can_be_none = True
+)
+uf.add_keyarg(
+name = spin_id_col,
+py_type = int,
+arg_type = free format,
+desc_short = spin ID string column,
+desc = The spin ID string column used by the generic intensity file 
format (an alternative to the mol, res, and spin name and number columns).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = mol_name_col,
+py_type = int,
+arg_type = free format,
+desc_short = molecule name column,
+desc = The molecule name column used by the generic intensity file format 
(alternative to the spin ID column).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = res_num_col,
+py_type = int,
+arg_type = free format,
+desc_short = residue number column,
+desc = The residue number column used by the generic intensity file 
format (alternative to the spin ID column).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = res_name_col,
+py_type = int,
+arg_type = free format,
+desc_short = residue name column,
+desc = The residue name column used by the generic intensity file format 
(alternative to the spin ID column).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = spin_num_col,
+py_type = int,
+arg_type = free format,
+desc_short = spin number column,
+desc = The spin number column used by the generic intensity file format 
(alternative to the spin ID column).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = spin_name_col,
+py_type = int,
+arg_type = free format,
+desc_short = spin name column,
+desc = The spin name column used by the generic intensity file format 
(alternative to the spin ID column).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = sep,
+py_type = str,
+arg_type = free format,
+desc_short = column separator,
+desc = The column separator used by the generic intensity format (the 
default is white space).,
+can_be_none = True
+)
+uf.add_keyarg(
+name = spin_id,
+py_type = str,
+desc_short = spin ID string,
+desc = The spin ID string used to restrict the loading of data to certain 
spin subsets.,
+can_be_none = True
+)
+# File formats.
+uf.desc.append(Desc_container(File formats))
+uf.desc[-1].add_paragraph(The peak list or intensity file will be 
automatically determined.)
+uf.desc[-1].add_paragraph(Sparky peak list:  The file should be a Sparky peak 
list saved after typing the command 'lt'.  The default is to assume that 
columns 0, 1, 2, and 3 (1st, 2nd, 3rd, and 4th) contain the Sparky assignment, 
w1, w2, and peak intensity data respectively.  The frequency data w1 and w2 are 
ignored while the peak intensity data can either be the peak height or volume 
displayed by changing the window options.  If the peak intensity data is not 
within column 3, set the integration column to the appropriate number (column 
numbering starts from 0 rather than 1).)
+uf.desc[-1].add_paragraph(XEasy peak list:  The file should be the saved 
XEasy text window output of the list peak entries command, 'tw' followed by 
'le'.  As the columns are fixed, the peak intensity column is hardwired to 
number 10 (the 11th column) which contains either the peak height or peak 
volume data.  Because the columns are fixed, the integration column number will 
be ignored.)
+uf.desc[-1].add_paragraph(NMRView:  The file should be a NMRView peak list. 
The default is to use column 16 (which contains peak heights) for peak 
intensities. To use use peak volumes (or evolumes), int_col must be set to 15.)
+uf.desc[-1].add_paragraph(NMRPipe seriesTab:  The file should be a 
NMRPipe-format Spectral Series list

r21796 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-05 Thread tlinnet
Author: tlinnet
Date: Thu Dec  5 22:48:10 2013
New Revision: 21796

URL: http://svn.gna.org/viewcvs/relax?rev=21796view=rev
Log:
Added systemtest for reading spins from a sparky list.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21796r1=21795r2=21796view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Thu Dec  5 22:48:10 2013
@@ -139,6 +139,25 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_sparky(self):
+Test the reading of spins from a Sparky peak list.
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 7)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 3)
+self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+#self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+#self.assertEqual(cdp.mol[0].res[0].spin[0].name, None)
 
 
 def test_read_peak_list_generic(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21805 - /trunk/user_functions/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:21 2013
New Revision: 21805

URL: http://svn.gna.org/viewcvs/relax?rev=21805view=rev
Log:
Added keyword dim to frontend function for spectrum.read_spins().

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

This is associate data with the spins of up to two dimensions.

Modified:
trunk/user_functions/spectrum.py

Modified: trunk/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/spectrum.py?rev=21805r1=21804r2=21805view=diff
==
--- trunk/user_functions/spectrum.py (original)
+++ trunk/user_functions/spectrum.py Fri Dec  6 09:16:21 2013
@@ -384,6 +384,14 @@
 can_be_none = True
 )
 uf.add_keyarg(
+name = dim,
+default = 1,
+py_type = int,
+min = 1,
+desc_short = spectral dimension to read,
+desc = Associate the data with the spins of any dimension in the peak 
list.  This defaults to w1, the heteronucleus in HSQC type experiments.
+)
+uf.add_keyarg(
 name = spin_id_col,
 py_type = int,
 arg_type = free format,
@@ -446,6 +454,9 @@
 desc = The spin ID string used to restrict the loading of data to certain 
spin subsets.,
 can_be_none = True
 )
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph(The spectral dimension is used to specify if the 
intensity data should be loaded into the spins identified by the first 
dimension w1, second dimension w2, etc.)
 # File formats.
 uf.desc.append(Desc_container(File formats))
 uf.desc[-1].add_paragraph(The peak list or intensity file will be 
automatically determined.)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21809 - /trunk/pipe_control/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:36 2013
New Revision: 21809

URL: http://svn.gna.org/viewcvs/relax?rev=21809view=rev
Log:
Insert check if spin already exist, before creating it.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=21809r1=21808r2=21809view=diff
==
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Fri Dec  6 09:16:36 2013
@@ -37,7 +37,7 @@
 from lib.statistics import std
 from lib.warnings import RelaxWarning, RelaxNoSpinWarning
 from pipe_control import pipes
-from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin, 
generate_spin_id_unique, return_spin, spin_loop
+from pipe_control.mol_res_spin import are_spins_named, 
check_mol_res_spin_data, create_spin, generate_spin_id_unique, return_spin, 
spin_loop
 
 
 def __errors_height_no_repl():
@@ -649,14 +649,21 @@
 peak_list = read_peak_list(file=file, dir=dir, spin_id_col=spin_id_col, 
mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, 
spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, 
spin_id=spin_id)
 
 # Loop over the peak_list.
+created_spins = []
 for assign in peak_list:
 mol_name = assign.mol_names[dim-1]
 res_num = assign.res_nums[dim-1]
 res_name = assign.res_names[dim-1]
 spin_num = assign.spin_nums[dim-1]
 spin_name = assign.spin_names[dim-1]
-# Create the spin
-create_spin(spin_num=spin_num, spin_name=spin_name, res_num=res_num, 
res_name=res_name, mol_name=mol_name)
+
+# Generate the spin_id.
+spin_id = generate_spin_id_unique(mol_name=mol_name, res_num=res_num, 
res_name=res_name, spin_name=spin_name)
+
+# Check if the spin already exist.
+if not are_spins_named(spin_id=spin_id):
+# Create the spin if not exist.
+create_spin(spin_num=spin_num, spin_name=spin_name, 
res_num=res_num, res_name=res_name, mol_name=mol_name)
 
 # Test that data exists.
 check_mol_res_spin_data()


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21807 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:34 2013
New Revision: 21807

URL: http://svn.gna.org/viewcvs/relax?rev=21807view=rev
Log:
Extended reading of spin residue names from NMRPipe SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21807r1=21806r2=21807view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:16:34 2013
@@ -111,7 +111,13 @@
 try:
 res_num = int(row1[-3])
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file., 
cannot process the assignment '%s'. % line[0])
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
+
+# The residue name.
+try:
+res_name = row1[-4]
+except:
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
 
 # Get the intensities.
 try:
@@ -126,4 +132,4 @@
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], spin_names=[name1, name2], 
intensity=intensities, intensity_name=spectra)
+peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21808 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:35 2013
New Revision: 21808

URL: http://svn.gna.org/viewcvs/relax?rev=21808view=rev
Log:
Modified NMRPipe SeriesTab to read residue numbers and name for two-dimensional 
list.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21808r1=21807r2=21808view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:16:35 2013
@@ -109,13 +109,15 @@
 
 # Get the residue number.
 try:
-res_num = int(row1[-3])
+res_num1 = int(row1[-3])
+res_num2 = int(row2[-3])
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
 
 # The residue name.
 try:
-res_name = row1[-4]
+res_name1 = row1[-4]
+res_name2 = row2[-4]
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
 
@@ -132,4 +134,4 @@
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21813 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:15 2013
New Revision: 21813

URL: http://svn.gna.org/viewcvs/relax?rev=21813view=rev
Log:
Removed name from docstring in GUI test.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21813r1=21812r2=21813view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:15 2013
@@ -137,7 +137,7 @@
 
 
 def test_bug_21076_multi_col_peak_list(self):
-Test catching U{bug #21076https://gna.org/bugs/?21076}, loading a 
multi-spectra NMRPipe seriesTab file through the GUI, Error messages occur. 
Submitted by Troels E. Linnet.
+Test catching U{bug #21076https://gna.org/bugs/?21076}, loading a 
multi-spectra NMRPipe seriesTab file through the GUI, Error messages occur.
 
 # The paths to the data files.
 data_path = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'dispersion' + sep + 'KTeilum_FMPoulsen_MAkke_2006' + sep 
+ 'acbp_cpmg_disp_101MGuHCl_40C_041223' + sep


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21811 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:13 2013
New Revision: 21811

URL: http://svn.gna.org/viewcvs/relax?rev=21811view=rev
Log:
Issuing a warning instead of error when loading spins from sparky list where 
residue names are not present.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21811r1=21810r2=21811view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 09:57:13 2013
@@ -134,7 +134,8 @@
 try:
 res_name = row1[-4]
 except:
-raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s' for residue name. % line[0])
+raise RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0])
+res_name = None
 
 # Chemical shifts.
 w1 = None


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21814 - in /trunk: lib/spectrum/sparky.py test_suite/gui_tests/relax_disp.py user_functions/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:17 2013
New Revision: 21814

URL: http://svn.gna.org/viewcvs/relax?rev=21814view=rev
Log:
Added name to Copyrights header of modified files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py
trunk/test_suite/gui_tests/relax_disp.py
trunk/user_functions/spectrum.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 09:57:17 2013
@@ -2,6 +2,7 @@
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
 # Copyright (C) 2008 Sebastien Morin  #
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:17 2013
@@ -1,6 +1,7 @@
 ###
 # #
 # Copyright (C) 2013 Edward d'Auvergne#
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #

Modified: trunk/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/spectrum.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/user_functions/spectrum.py (original)
+++ trunk/user_functions/spectrum.py Fri Dec  6 09:57:17 2013
@@ -1,6 +1,7 @@
 ###
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
+# Copyright (C) 2004-2013 Troels E. Linnet#
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21815 - /trunk/pipe_control/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:18 2013
New Revision: 21815

URL: http://svn.gna.org/viewcvs/relax?rev=21815view=rev
Log:
Changed to use return_spin for testing presence of spin.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=21815r1=21814r2=21815view=diff
==
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Fri Dec  6 09:57:18 2013
@@ -37,7 +37,7 @@
 from lib.statistics import std
 from lib.warnings import RelaxWarning, RelaxNoSpinWarning
 from pipe_control import pipes
-from pipe_control.mol_res_spin import are_spins_named, 
check_mol_res_spin_data, create_spin, generate_spin_id_unique, return_spin, 
spin_loop
+from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin, 
generate_spin_id_unique, return_spin, spin_loop
 
 
 def __errors_height_no_repl():
@@ -661,7 +661,7 @@
 spin_id = generate_spin_id_unique(mol_name=mol_name, res_num=res_num, 
res_name=res_name, spin_name=spin_name)
 
 # Check if the spin already exist.
-if not are_spins_named(spin_id=spin_id):
+if return_spin(spin_id=spin_id) == None:
 # Create the spin if not exist.
 create_spin(spin_num=spin_num, spin_name=spin_name, 
res_num=res_num, res_name=res_name, mol_name=mol_name)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21812 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:14 2013
New Revision: 21812

URL: http://svn.gna.org/viewcvs/relax?rev=21812view=rev
Log:
Issued a warning instead of error, when loadning spin residue names from a 
NMRPipe SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21812r1=21811r2=21812view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:57:14 2013
@@ -114,12 +114,19 @@
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
 
-# The residue name.
+# The residue name for dimension 1.
 try:
 res_name1 = row1[-4]
+except:
+raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0])
+res_name1 = None
+
+# The residue name for dimension 2.
+try:
 res_name2 = row2[-4]
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
+raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0])
+res_name2 = None
 
 # Get the intensities.
 try:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21810 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:11 2013
New Revision: 21810

URL: http://svn.gna.org/viewcvs/relax?rev=21810view=rev
Log:
Fix for proper spacing and comments in GUI test.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21810r1=21809r2=21810view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:11 2013
@@ -178,7 +178,7 @@
 analysis.peak_wizard_launch(None)
 wizard = analysis.peak_wizard
 
-# The spectrum, use Keyword auto.
+# The spectrum, where the use of Keyword auto will auto-assign spectra 
Z_A{i}.
 page = wizard.get_page(wizard.page_indices['read'])
 
page.uf_args['file'].SetValue(str_to_gui(%sfolded_sparky_corr_final_max_standard_trunc.ser
 % data_path))
 page.uf_args['spectrum_id'].SetValue(['auto'])
@@ -191,11 +191,16 @@
 
 # Get ID from RMSD window.
 page = wizard.get_page(wizard.page_indices['rmsd'])
+
 # Flush all wx events (to allow the spectrum list GUI element to 
populate all its rows).
 wx.Yield()
-# Get the ID
+
+# Get the first ID from list.
 cur_id = page.uf_args['spectrum_id'].GetValue()
+
+# Now check that the first is set to 'Z_A0', since the keyword 'auto' 
was used for spectrum_id.
 self.assertEqual(cur_id, 'Z_A0')
+
 
 def test_hansen_trunc_data(self):
 Test the GUI analysis with Flemming Hansen's CPMG data truncated to 
residues 70 and 71.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21819 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:21 2013
New Revision: 21819

URL: http://svn.gna.org/viewcvs/relax?rev=21819view=rev
Log:
Implemented system test for reading spin ID's from NMRView formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21819r1=21818r2=21819view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 11:09:21 2013
@@ -139,6 +139,37 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_nmrview(self):
+Test the reading of an NMRView peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=cNTnC.xpk, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=cNTnC.xpk, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 2)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 70)
+self.assertEqual(cdp.mol[0].res[0].name, None)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 72)
+self.assertEqual(cdp.mol[0].res[1].name, None)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_NMRPipe_seriesTab(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21820 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:22 2013
New Revision: 21820

URL: http://svn.gna.org/viewcvs/relax?rev=21820view=rev
Log:
Made reading of NMRView formatted file return the residue number as integer 
instead of string.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21820r1=21819r2=21820view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:09:22 2013
@@ -80,7 +80,7 @@
 res_num = line[1].strip('{')
 res_num = res_num.strip('}')
 res_num = res_num.split('.')
-res_num = res_num[0]
+res_num = int(res_num[0])
 except ValueError:
 raise RelaxError(The peak list is invalid.)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21818 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:19 2013
New Revision: 21818

URL: http://svn.gna.org/viewcvs/relax?rev=21818view=rev
Log:
Fix for issuing a warning when reading spins from a sparky formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21818r1=21817r2=21818view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 11:09:19 2013
@@ -27,10 +27,12 @@
 
 # Python module imports.
 from re import split
+from warnings import warn
 
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import open_write_file, strip
+from lib.warnings import RelaxWarning
 
 
 def read_list(peak_list=None, file_data=None):
@@ -135,7 +137,7 @@
 try:
 res_name = row1[-4]
 except:
-raise RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0])
+raise warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0]))
 res_name = None
 
 # Chemical shifts.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21817 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:17 2013
New Revision: 21817

URL: http://svn.gna.org/viewcvs/relax?rev=21817view=rev
Log:
Fix for issuing a warning in reading spins from a NMRPipe SeriesTab formatted 
file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21817r1=21816r2=21817view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 11:09:17 2013
@@ -25,10 +25,12 @@
 
 # Python module imports.
 import re
+from warnings import warn
 
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import open_write_file, strip
+from lib.warnings import RelaxWarning
 
 
 def read_seriestab(peak_list=None, file_data=None, int_col=None):
@@ -118,14 +120,14 @@
 try:
 res_name1 = row1[-4]
 except:
-raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0])
+raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0])
+raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0]))
 res_name2 = None
 
 # Get the intensities.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21816 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:16 2013
New Revision: 21816

URL: http://svn.gna.org/viewcvs/relax?rev=21816view=rev
Log:
Implemented another system test for reading NMRPipe SeriesTab files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21816r1=21815r2=21816view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 11:09:16 2013
@@ -139,6 +139,46 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_NMRPipe_seriesTab(self):
+Test the reading of an NMRPipe seriesTab peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 3)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'NE1')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HE1')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 10)
+self.assertEqual(cdp.mol[0].res[1].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 6)
+self.assertEqual(cdp.mol[0].res[2].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[2].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_NMRPipe_seriesTab_multi(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21821 - in /trunk/lib/spectrum: nmrpipe.py sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:26:35 2013
New Revision: 21821

URL: http://svn.gna.org/viewcvs/relax?rev=21821view=rev
Log:
Fix for calling the warn() function.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21821r1=21820r2=21821view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 11:26:35 2013
@@ -120,7 +120,7 @@
 try:
 res_name1 = row1[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1. Setting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21821r1=21820r2=21821view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 11:26:35 2013
@@ -137,7 +137,7 @@
 try:
 res_name = row1[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0]))
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name. Setting residue name to None. % 
line[0]))
 res_name = None
 
 # Chemical shifts.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21822 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:31:10 2013
New Revision: 21822

URL: http://svn.gna.org/viewcvs/relax?rev=21822view=rev
Log:
Extended the error description for reading NMRView files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21822r1=21821r2=21822view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:31:10 2013
@@ -82,7 +82,7 @@
 res_num = res_num.split('.')
 res_num = int(res_num[0])
 except ValueError:
-raise RelaxError(The peak list is invalid.)
+raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[0])
 
 # Nuclei names.
 name2 = ''


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21823 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:32:27 2013
New Revision: 21823

URL: http://svn.gna.org/viewcvs/relax?rev=21823view=rev
Log:
Fix for print statement.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21823r1=21822r2=21823view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:32:27 2013
@@ -82,7 +82,7 @@
 res_num = res_num.split('.')
 res_num = int(res_num[0])
 except ValueError:
-raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[0])
+raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[1])
 
 # Nuclei names.
 name2 = ''


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21824 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:09:54 2013
New Revision: 21824

URL: http://svn.gna.org/viewcvs/relax?rev=21824view=rev
Log:
Implemented system test for reading spins from a NMRPipe SeriesTab formatted 
file, where the assignments for second dimension is missing.

This will be a typically export from SPARKY, converted to NMRPipe format, and 
proÂcessed with SeriesTab.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21824r1=21823r2=21824view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 12:09:54 2013
@@ -253,6 +253,33 @@
 self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
 self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_NMRPipe_seriesTab_multi_no_2dim(self):
+Test the reading of an NMRPipe seriesTab peak list, with no 
assignment for second dimension.
+
+# Read the peak list.
+
self.interpreter.spectrum.read_spins(file=folded_sparky_corr_final_max_standard_trunc.ser,
 dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'KTeilum_FMPoulsen_MAkke_2006'+sep+'acbp_cpmg_disp_101MGuHCl_40C_041223',
 dim=1)
+
self.interpreter.spectrum.read_spins(file=folded_sparky_corr_final_max_standard_trunc.ser,
 dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'KTeilum_FMPoulsen_MAkke_2006'+sep+'acbp_cpmg_disp_101MGuHCl_40C_041223',
 dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 2)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 61)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue, which is a None residue.
+self.assertEqual(cdp.mol[0].res[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].name, None)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'HN')
 
 
 def test_read_spins_peak_list_sparky(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21825 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:09:56 2013
New Revision: 21825

URL: http://svn.gna.org/viewcvs/relax?rev=21825view=rev
Log:
Fixed for reading spins from a NMRPipe SeriesTab formatted file, where 
dimension 2 misses residue number and residue name.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21825r1=21824r2=21825view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 12:09:56 2013
@@ -109,25 +109,32 @@
 row2 = re.split('([a-zA-Z]+)', assign2)
 name2 = row2[-2] + row2[-1]
 
-# Get the residue number.
+# Get the residue number for dimension 1.
 try:
 res_num1 = int(row1[-3])
+except:
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 1 in assignment: %s. % line[0])
+
+# Get the residue number for dimension 2.
+try:
 res_num2 = int(row2[-3])
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
+# We cannot always expect dimension 2 to have residue number.
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 2 in assignment: %s. Setting 
residue number to None. % line[0]))
+res_num2 = None
 
 # The residue name for dimension 1.
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1. Setting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 2 in assignment: %s. Setting 
residue name to None. % line[0]))
 res_name2 = None
 
 # Get the intensities.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21826 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:12:43 2013
New Revision: 21826

URL: http://svn.gna.org/viewcvs/relax?rev=21826view=rev
Log:
Expanded the warning message for a systemtest.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21826r1=21825r2=21826view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 12:12:43 2013
@@ -127,7 +127,7 @@
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21828 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:20:23 2013
New Revision: 21828

URL: http://svn.gna.org/viewcvs/relax?rev=21828view=rev
Log:
If dimension 2 in a SeriesTab formatted file does not contain residue 
number+name, it defaults to the dimension 1.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21828r1=21827r2=21828view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 13:20:23 2013
@@ -110,9 +110,11 @@
 name2 = row2[-2] + row2[-1]
 
 # Get the residue number for dimension 1.
+got_res_num1 = True
 try:
 res_num1 = int(row1[-3])
 except:
+got_res_num1 = False
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 1 in assignment: %s. % line[0])
 
 # Get the residue number for dimension 2.
@@ -120,22 +122,31 @@
 res_num2 = int(row2[-3])
 except:
 # We cannot always expect dimension 2 to have residue number.
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 2 in assignment: %s. Setting 
residue number to None. % line[0]))
-res_num2 = None
+if got_res_num1:
+res_num2 = res_num1
+else:
+res_num2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue number for dimension 2 in assignment: %s. 
Setting residue number to %s. % (line[0], res_num2)))
 
 # The residue name for dimension 1.
+got_res_name1 = True
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to None. % line[0]))
+got_res_name1 = False
 res_name1 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to %s. % (line[0], res_name1)))
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 2 in assignment: %s. Setting 
residue name to None. % line[0]))
-res_name2 = None
+# We cannot always expect dimension 2 to have residue name.
+if got_res_name1:
+res_name2 = res_name1
+else:
+res_name2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue name for dimension 2 in assignment: %s. 
Setting residue name to %s. % (line[0], res_name2)))
 
 # Get the intensities.
 try:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21827 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:20:22 2013
New Revision: 21827

URL: http://svn.gna.org/viewcvs/relax?rev=21827view=rev
Log:
Modified system test for reading an assignment, where the second dimension is 
missing.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21827r1=21826r2=21827view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 13:20:22 2013
@@ -265,21 +265,16 @@
 # Test some of the sequence.
 self.assertEqual(len(cdp.mol), 1)
 self.assertEqual(cdp.mol[0].name, None)
-self.assertEqual(len(cdp.mol[0].res), 2)
+self.assertEqual(len(cdp.mol[0].res), 1)
 
 # 1st residue.
 self.assertEqual(cdp.mol[0].res[0].num, 61)
 self.assertEqual(cdp.mol[0].res[0].name, 'L')
-self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
 self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
-
-# 2nd residue, which is a None residue.
-self.assertEqual(cdp.mol[0].res[1].num, None)
-self.assertEqual(cdp.mol[0].res[1].name, None)
-self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
-self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
-self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'HN')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_sparky(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21830 - /trunk/lib/spectrum/xeasy.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:23:30 2013
New Revision: 21830

URL: http://svn.gna.org/viewcvs/relax?rev=21830view=rev
Log:
Modified xeasy reading function to pass residue names back.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/xeasy.py

Modified: trunk/lib/spectrum/xeasy.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/xeasy.py?rev=21830r1=21829r2=21830view=diff
==
--- trunk/lib/spectrum/xeasy.py (original)
+++ trunk/lib/spectrum/xeasy.py Fri Dec  6 13:23:30 2013
@@ -2,6 +2,7 @@
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
 # Copyright (C) 2008 Sebastien Morin  #
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #
@@ -24,9 +25,13 @@
 Module containing functions for handling XEasy files.
 
 
+# Python module imports.
+from warnings import warn
+
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import strip
+from lib.warnings import RelaxWarning
 
 
 def read_list(peak_list=None, file_data=None, int_col=None):
@@ -46,6 +51,8 @@
 w2_col = 2
 ass_w1_col = 7
 ass_w2_col = 4
+res_name1_col = 9
+res_name2_col = 5
 if int_col == None:
 int_col = 10
 
@@ -75,15 +82,26 @@
 if line[ass_w1_col] == 'inv.' or line[ass_w2_col] == 'inv.':
 continue
 
-# The residue number.
+# The residue number for dimension 1.
 try:
-res_num = int(line[5])
+res_num1 = int(line[8])
 except:
-raise RelaxError(Improperly formatted XEasy file, cannot read the 
line %s. % line)
+raise RelaxError(Improperly formatted XEasy file, cannot process 
the residue number for dimension 1 in assignment: %s. % line)
+
+# The residue number for dimension 2.
+try:
+res_num2 = int(line[5])
+except:
+warn(RelaxWarning(Improperly formatted XEasy file, cannot process 
the residue number for dimension 2 in assignment: %s. Setting residue number to 
None. % line))
+res_num2 = None
 
 # Nuclei names.
 name1 = line[ass_w1_col]
 name2 = line[ass_w2_col]
+
+# Residue names.
+res_name1 = line[res_name1_col]
+res_name2 = line[res_name2_col]
 
 # Chemical shifts.
 try:
@@ -102,4 +120,4 @@
 raise RelaxError(The peak intensity value from the line %s is 
invalid. % line)
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], spin_names=[name1, name2], 
shifts=[w1, w2], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21829 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:23:29 2013
New Revision: 21829

URL: http://svn.gna.org/viewcvs/relax?rev=21829view=rev
Log:
Implemented system test for reading spins from an xeasy file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21829r1=21828r2=21829view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 13:23:29 2013
@@ -331,6 +331,49 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_xeasy(self):
+Test the reading of spins from an XEasy peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=xeasy_r1_20ms.text, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 21)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 21)
+self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 79)
+self.assertEqual(cdp.mol[0].res[1].name, 'TRP')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'NE1')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 110)
+self.assertEqual(cdp.mol[0].res[2].name, 'PHE')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+
+# 10th residue.
+self.assertEqual(cdp.mol[0].res[9].num, 107)
+self.assertEqual(cdp.mol[0].res[9].name, 'TRP')
+self.assertEqual(len(cdp.mol[0].res[9].spin), 2)
+self.assertEqual(cdp.mol[0].res[9].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[9].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[9].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[9].spin[1].name, 'C')
+
 
 def test_read_peak_list_generic(self):
 Test the reading of a generic peak intensity list.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21831 - /trunk/test_suite/shared_data/peak_lists/sparky2dim.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 14:08:34 2013
New Revision: 21831

URL: http://svn.gna.org/viewcvs/relax?rev=21831view=rev
Log:
Copyied SeriesTab file for implementation of double assignment in sparky files.

Added:
trunk/test_suite/shared_data/peak_lists/sparky2dim.list
  - copied unchanged from r21830, 
trunk/test_suite/shared_data/peak_lists/seriesTab.ser


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21837 - /trunk/test_suite/shared_data/peak_lists/sparky2dim.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:07 2013
New Revision: 21837

URL: http://svn.gna.org/viewcvs/relax?rev=21837view=rev
Log:
Modified sparky peak list for two dimensional assignment example.

This will typically be the export from CcpNmr Analysis.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/shared_data/peak_lists/sparky2dim.list

Modified: trunk/test_suite/shared_data/peak_lists/sparky2dim.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/sparky2dim.list?rev=21837r1=21836r2=21837view=diff
==
--- trunk/test_suite/shared_data/peak_lists/sparky2dim.list (original)
+++ trunk/test_suite/shared_data/peak_lists/sparky2dim.list Fri Dec  6 15:35:07 
2013
@@ -1,16 +1,9 @@
-REMARK SeriesTab Input: ../peaks.dat Output: ../peaks_0.ser
-REMARK Mode: Summation Dimensions: 2
-REMARK Input Region:X +/- 1 X-ZF: 3
-REMARK Analysis Region: X +/- 1
-REMARK Input Region:Y +/- 1 Y-ZF: 3
-REMARK Analysis Region: Y +/- 1
+  Assignment w1 w2   Data Height
 
-VARS   INDEX X_AXIS Y_AXIS X_PPM Y_PPM VOL ASS Z_A0
-FORMAT %5d %9.3f %9.3f %8.3f %8.3f %+e %s %7.4f
-
-NULLVALUE -666
-NULLSTRING *
-
-1   246.65818.2689.932  128.374 +1.851056e+06 W62NE1-W62HE1  1.
-2   321.69830.9949.419  127.066 +3.224387e+05 L10N-L10HN  1.
-3   320.08955.7379.430  124.523 +1.479366e+06 V6N-V6HN  1.
+   W62NE1-W62HE1128.374  9.932 +1.851056e+06
+  L10N-L10HN127.066  9.419 +3.224387e+05
+V6N-V6HN124.523  9.430 +1.479366e+06
+T2N-T2HN115.994  8.521 +1.179448e+06
+K3N-T2HN125.899  8.695 +4.407306e+06
+A4N-T2HN123.001  9.123 +3.480382e+06
+V5N-T2HN120.839  9.444 +4.306408e+06


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21839 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:10 2013
New Revision: 21839

URL: http://svn.gna.org/viewcvs/relax?rev=21839view=rev
Log:
Extended reading of spins from sparky files for up to two dimensional 
assignments.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21839r1=21838r2=21839view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 15:35:10 2013
@@ -127,18 +127,44 @@
 row4 = split('([a-zA-Z]+)', assign4)
 name4 = row4[-2] + row4[-1]
 
-# The residue number.
-try:
-res_num = int(row1[-3])
-except:
-raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s'. % line[0])
-
-# The residue name.
-try:
-res_name = row1[-4]
-except:
-warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name. Setting residue name to None. % 
line[0]))
-res_name = None
+# Get the residue number for dimension 1.
+got_res_num1 = True
+try:
+res_num1 = int(row1[-3])
+except:
+got_res_num1 = False
+raise RelaxError(Improperly formatted Sparky file, cannot process 
the residue number for dimension 1 in assignment: %s. % line[0])
+
+# Get the residue number for dimension 2.
+try:
+res_num2 = int(row2[-3])
+except:
+# We cannot always expect dimension 2 to have residue number.
+if got_res_num1:
+res_num2 = res_num1
+else:
+res_num2 = None
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the residue number for dimension 2 in assignment: %s. Setting residue 
number to %s. % (line[0], res_num2)))
+
+# The residue name for dimension 1.
+got_res_name1 = True
+try:
+res_name1 = row1[-4]
+except:
+got_res_name1 = False
+res_name1 = None
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the residue name for dimension 1 in assignment: %s. Setting residue 
name to %s. % (line[0], res_name1)))
+
+# The residue name for dimension 2.
+try:
+res_name2 = row2[-4]
+except:
+# We cannot always expect dimension 2 to have residue name.
+if got_res_name1:
+res_name2 = res_name1
+else:
+res_name2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue name for dimension 2 in assignment: %s. 
Setting residue name to %s. % (line[0], res_name2)))
 
 # Chemical shifts.
 w1 = None
@@ -175,13 +201,13 @@
 
 # Add the assignment to the peak list object.
 if dim == 1:
-peak_list.add(res_nums=[res_num], res_names=[res_name], 
spin_names=[name1], shifts=[w1], intensity=intensity)
+peak_list.add(res_nums=[res_num1], res_names=[res_name1], 
spin_names=[name1], shifts=[w1], intensity=intensity)
 elif dim == 2:
-peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
 elif dim == 3:
-peak_list.add(res_nums=[res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2, res_num1], 
res_names=[res_name1, res_name2, res_name1], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
 elif dim == 4:
-peak_list.add(res_nums=[res_num, res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name, res_name], spin_names=[name1, name2, 
name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2, res_num1, res_num1], 
res_names=[res_name1, res_name2, res_name1, res_name1], spin_names=[name1, 
name2, name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
 
 
 def write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, 
atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, 
force=True):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get

r21838 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:08 2013
New Revision: 21838

URL: http://svn.gna.org/viewcvs/relax?rev=21838view=rev
Log:
Implemented system test for using double assignments in sparky formatted files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21838r1=21837r2=21838view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 15:35:08 2013
@@ -334,6 +334,76 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_sparky_with_2dim_ass(self):
+Test the reading of spins from a Sparky peak list with two 
dimensional assignment
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 7)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'NE1')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HE1')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 10)
+self.assertEqual(cdp.mol[0].res[1].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 6)
+self.assertEqual(cdp.mol[0].res[2].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[2].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[1].name, 'HN')
+
+# 4th residue.
+self.assertEqual(cdp.mol[0].res[3].num, 2)
+self.assertEqual(cdp.mol[0].res[3].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[3].spin), 2)
+self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[3].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[1].name, 'HN')
+
+# 5th residue.
+self.assertEqual(cdp.mol[0].res[4].num, 3)
+self.assertEqual(cdp.mol[0].res[4].name, 'K')
+self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
+self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[0].name, 'N')
+
+# 6th residue.
+self.assertEqual(cdp.mol[0].res[5].num, 4)
+self.assertEqual(cdp.mol[0].res[5].name, 'A')
+self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
+self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+# 7th residue.
+self.assertEqual(cdp.mol[0].res[6].num, 5)
+self.assertEqual(cdp.mol[0].res[6].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[6].spin), 1)
+self.assertEqual(cdp.mol[0].res[6].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[6].spin[0].name, 'N')
 
 
 def test_read_spins_peak_list_xeasy(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21836 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:06 2013
New Revision: 21836

URL: http://svn.gna.org/viewcvs/relax?rev=21836view=rev
Log:
Extended system test for reading spins from SPARKY files with empty residue 
name+number second dimension assignment.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21836r1=21835r2=21836view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 15:35:06 2013
@@ -281,7 +281,8 @@
 Test the reading of spins from a Sparky peak list.
 
 # Read the spins from peak list.
-self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
 
 # Test some of the sequence.
 self.assertEqual(len(cdp.mol), 1)
@@ -291,35 +292,37 @@
 # 1st residue.
 self.assertEqual(cdp.mol[0].res[0].num, 3)
 self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
-self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
 self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
 
 # 2nd residue.
 self.assertEqual(cdp.mol[0].res[1].num, 4)
 self.assertEqual(cdp.mol[0].res[1].name, 'GLY')
-self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
 self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
 
 # 3rd residue.
 self.assertEqual(cdp.mol[0].res[2].num, 5)
 self.assertEqual(cdp.mol[0].res[2].name, 'SER')
-self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
 self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
 
 # 4th residue.
 self.assertEqual(cdp.mol[0].res[3].num, 6)
 self.assertEqual(cdp.mol[0].res[3].name, 'MET')
-self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[3].spin), 2)
 self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
 
 # 5th residue.
 self.assertEqual(cdp.mol[0].res[4].num, 40)
 self.assertEqual(cdp.mol[0].res[4].name, 'TRP')
-self.assertEqual(len(cdp.mol[0].res[4].spin), 2)
+self.assertEqual(len(cdp.mol[0].res[4].spin), 4)
 self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[4].spin[0].name, 'N')
 self.assertEqual(cdp.mol[0].res[4].spin[1].num, None)
@@ -328,7 +331,7 @@
 # 6th residue.
 self.assertEqual(cdp.mol[0].res[5].num, 55)
 self.assertEqual(cdp.mol[0].res[5].name, 'ASN')
-self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21841 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:38 2013
New Revision: 21841

URL: http://svn.gna.org/viewcvs/relax?rev=21841view=rev
Log:
Added system test for reading CcpNmr Analysis exported sparky file

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21841r1=21840r2=21841view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 16:46:38 2013
@@ -334,6 +334,47 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_sparky_export_ccpnmr_analysis(self):
+Test the reading of spins from a Sparky peak list exported from 
CcpNmr Analysis.
+
+# Read the spins from peak list.
+
self.interpreter.spectrum.read_spins(file=peak_list_ccpnmr_analysis.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 3)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 76)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 74)
+self.assertEqual(cdp.mol[0].res[1].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 31)
+self.assertEqual(cdp.mol[0].res[2].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+
+# Read the peak list intensity.
+
self.interpreter.spectrum.read_intensities(file=peak_list_ccpnmr_analysis.list,
 dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
spectrum_id='test', int_method='height')
+
+# Test the data.
+
self.assertEqual(list(cdp.mol[0].res[0].spin[0].intensities.values())[0], 
2.32E+05)
+
self.assertEqual(list(cdp.mol[0].res[1].spin[0].intensities.values())[0], 
2.01E+05)
+
self.assertEqual(list(cdp.mol[0].res[2].spin[0].intensities.values())[0], 
2.08E+05)
 
 
 def test_read_spins_peak_list_sparky_with_2dim_ass(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21842 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:39 2013
New Revision: 21842

URL: http://svn.gna.org/viewcvs/relax?rev=21842view=rev
Log:
Modified reading of sparky files, when exported from CcpNmr Analysis.

The keyword 'Data' is not present here.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21842r1=21841r2=21842view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 16:46:39 2013
@@ -71,8 +71,13 @@
 w4_col = i
 
 # The peak height.
-elif file_data[0][i] == 'Data' and file_data[0][i+1] == 'Height':
+elif file_data[0][i] == 'Height':
+# The peak height when exported from CcpNmr Analysis export 
without 'Data'.
 int_col = i
+
+# The peak height when exported from Sparky.
+if file_data[0][i-1] == 'Data' and file_data[0][i] == 'Height':
+int_col = i-1
 
 # The peak volume.
 elif file_data[0][i] == 'Intensity':


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21840 - /trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:37 2013
New Revision: 21840

URL: http://svn.gna.org/viewcvs/relax?rev=21840view=rev
Log:
Added example of CcpNmr analysis exported Sparky file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Added:
trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list

Added: trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list?rev=21840view=auto
==
--- trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list 
(added)
+++ trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list Fri 
Dec  6 16:46:37 2013
@@ -1,0 +1,4 @@
+  Assignment w1 w2   Height   Volume
+   L76N-L76HN115.052  8.406   2.32E+05   1.09E+06 bx
+   T74N-T74HN114.602  8.082   2.01E+05   9.87E+05 bx
+   T31N-T31HN114.568  8.174   2.08E+05   1.04E+06 bx


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21845 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:32 2013
New Revision: 21845

URL: http://svn.gna.org/viewcvs/relax?rev=21845view=rev
Log:
Added another systemtest for returning spins from a generic file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21845r1=21844r2=21845view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 18:11:32 2013
@@ -186,6 +186,32 @@
 self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
 self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[4].spin[0].name, None)
+
+
+def test_read_spins_peak_list_generic_with_spin_name(self):
+Test the reading of spins with spin name in columns from a generic 
peak intensity list.
+
+# Read the peak spins.
+self.interpreter.spectrum.read_spins(file='test.seq', 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, 'protein')
+self.assertEqual(len(cdp.mol[0].res), 10)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 10)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, 10)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 6)
+self.assertEqual(cdp.mol[0].res[1].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, 6)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
 
 
 def test_read_spins_peak_list_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21844 - /trunk/lib/spectrum/peak_list.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:30 2013
New Revision: 21844

URL: http://svn.gna.org/viewcvs/relax?rev=21844view=rev
Log:
Modified the generic list to also return spin information when intensity is not 
present.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/peak_list.py

Modified: trunk/lib/spectrum/peak_list.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/peak_list.py?rev=21844r1=21843r2=21844view=diff
==
--- trunk/lib/spectrum/peak_list.py (original)
+++ trunk/lib/spectrum/peak_list.py Fri Dec  6 18:11:30 2013
@@ -96,12 +96,14 @@
 @raises RelaxError: When the expected peak intensity is not a float.
 
 
-# Check the intensity column argument.
-if data_col == None:
-raise RelaxError(The data column argument has not been supplied.)
-
 # Strip the data.
 file_data = strip(file_data)
+
+# Check the intensity column argument.
+data_present = True
+if data_col == None:
+warn(RelaxWarning(The data column argument has not been supplied, and 
function will only return spin data.))
+data_present = False
 
 # Convert the the data_col argument to a list if needed.
 if not isinstance(data_col, list):
@@ -115,14 +117,21 @@
 # Extract the data for the single line (loop of a single element).
 for values in read_spin_data(file_data=[line], 
spin_id_col=spin_id_col, mol_name_col=mol_name_col, res_num_col=res_num_col, 
res_name_col=res_name_col, spin_num_col=spin_num_col, 
spin_name_col=spin_name_col, data_col=data_col[i], sep=sep, spin_id=spin_id):
 # Check the values.
-if len(values) != 6:
+if len(values) != 6 and data_present:
 raise RelaxError(The molecule name, residue number and 
name, spin number and name, and value columns could not be found in the data 
%s. % repr(values))
 
-# Unpack.
-mol_name, res_num, res_name, spin_num, spin_name, value = 
values
-
-# Store the intensity.
-intensity.append(value)
+# Unpack when peak data is present
+elif data_present:
+# Unpack.
+mol_name, res_num, res_name, spin_num, spin_name, value = 
values
+
+# Store the intensity.
+intensity.append(value)
+
+# Unpack when peak data is not present.
+elif not data_present:
+# Unpack.
+mol_name, res_num, res_name, spin_num, spin_name = values
 
 # Add the assignment to the peak list object.
 peak_list.add(mol_names=[mol_name, mol_name], res_nums=[res_num, 
res_num], res_names=[res_name, res_name], spin_nums=[spin_num, spin_num], 
spin_names=[spin_name, spin_name], intensity=intensity)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21843 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:29 2013
New Revision: 21843

URL: http://svn.gna.org/viewcvs/relax?rev=21843view=rev
Log:
Added system for using generic file for reading spins.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21843r1=21842r2=21843view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 18:11:29 2013
@@ -139,6 +139,53 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_generic(self):
+Test the reading of spins from a generic peak intensity list.
+
+   # Read the peak spins.
+self.interpreter.spectrum.read_spins(file=generic_intensity.txt, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
res_num_col=1, res_name_col=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 5)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 20)
+self.assertEqual(cdp.mol[0].res[0].name, 'GLY')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, None)
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 23)
+self.assertEqual(cdp.mol[0].res[1].name, 'ALA')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, None)
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 34)
+self.assertEqual(cdp.mol[0].res[2].name, 'CYS')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, None)
+
+# 4th residue.
+self.assertEqual(cdp.mol[0].res[3].num, 35)
+self.assertEqual(cdp.mol[0].res[3].name, 'MET')
+self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
+self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[0].name, None)
+
+# 5th residue.
+self.assertEqual(cdp.mol[0].res[4].num, 36)
+self.assertEqual(cdp.mol[0].res[4].name, 'LYS')
+self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
+self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[0].name, None)
 
 
 def test_read_spins_peak_list_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21852 - /trunk/test_suite/system_tests/chemical_shift.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:24:03 2013
New Revision: 21852

URL: http://svn.gna.org/viewcvs/relax?rev=21852view=rev
Log:
Additional chemical shift reading test for SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/chemical_shift.py

Modified: trunk/test_suite/system_tests/chemical_shift.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=21852r1=21851r2=21852view=diff
==
--- trunk/test_suite/system_tests/chemical_shift.py (original)
+++ trunk/test_suite/system_tests/chemical_shift.py Fri Dec  6 19:24:03 2013
@@ -47,13 +47,33 @@
 Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list.
 
 # Read the spins from peak list.
-self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
 
 # Read the chemical shift from the list.
 self.interpreter.chemical_shift.read(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
 
 # Test the data.
 cs = [128.374, 127.066, 124.523]
+i = 0
+for spin in spin_loop():
+# Check the shift.
+self.assertEqual(spin.chemical_shift, cs[i])
+
+# Increment the index.
+i += 1
+
+
+def test_read_nmrpipe_seriestab_multi(self):
+Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list with multi columns.
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab_multi.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Read the chemical shift from the list.
+self.interpreter.chemical_shift.read(file=seriesTab_multi.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test the data.
+cs = [115.994, 125.899, 123.001, 120.839, 128.998]
 i = 0
 for spin in spin_loop():
 # Check the shift.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21850 - /trunk/test_suite/system_tests/chemical_shift.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:23:58 2013
New Revision: 21850

URL: http://svn.gna.org/viewcvs/relax?rev=21850view=rev
Log:
Added system test for reading chemical shift from NMRPipe SeriesTab file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/chemical_shift.py

Modified: trunk/test_suite/system_tests/chemical_shift.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=21850r1=21849r2=21850view=diff
==
--- trunk/test_suite/system_tests/chemical_shift.py (original)
+++ trunk/test_suite/system_tests/chemical_shift.py Fri Dec  6 19:23:58 2013
@@ -41,6 +41,26 @@
 
 # Create the data pipe.
 self.interpreter.pipe.create('cs', 'mf')
+
+
+def test_read_nmrpipe_seriestab(self):
+Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list.
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+
+# Read the chemical shift from the list.
+self.interpreter.chemical_shift.read(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test the data.
+cs = [128.374, 127.066, 124.523]
+i = 0
+for spin in spin_loop():
+# Check the shift.
+self.assertEqual(spin.chemical_shift, cs[i])
+
+# Increment the index.
+i += 1
 
 
 def test_read_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21851 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:24:02 2013
New Revision: 21851

URL: http://svn.gna.org/viewcvs/relax?rev=21851view=rev
Log:
Implemented reading of chemical shifts from NMRPipe SeriesTab formatted files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21851r1=21850r2=21851view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 19:24:02 2013
@@ -80,6 +80,16 @@
 # Find index of assignment ASS.
 ass_i = varsline.index('ASS')
 
+# Chemical shifts preparation.
+w1_col = None
+w2_col = None
+
+# Find index of chemical shift Y_PPM which in sparky is w1.
+w1_col = varsline.index('Y_PPM')
+
+# Find index of chemical shift X_PPM which in sparky is w2.
+w2_col = varsline.index('X_PPM')
+
 # Make a regular search for Z_A entries.
 Z_A = re.compile(Z_A*)
 spectra = list(filter(Z_A.search, varsline))
@@ -160,5 +170,19 @@
 except ValueError:
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
+# Chemical shifts.
+w1 = None
+w2 = None
+if w1_col != None:
+try:
+w1 = float(line[w1_col])
+except ValueError:
+raise RelaxError(The chemical shift from the line %s is 
invalid. % line)
+if w2_col != None:
+try:
+w2 = float(line[w2_col])
+except ValueError:
+raise RelaxError(The chemical shift from the line %s is 
invalid. % line)
+
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21871 - /trunk/test_suite/system_tests/n_state_model.py

2013-12-08 Thread tlinnet
Author: tlinnet
Date: Sun Dec  8 20:16:48 2013
New Revision: 21871

URL: http://svn.gna.org/viewcvs/relax?rev=21871view=rev
Log:
Made systemtest test pass on Mac OS 10.9

Modified:
trunk/test_suite/system_tests/n_state_model.py

Modified: trunk/test_suite/system_tests/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/n_state_model.py?rev=21871r1=21870r2=21871view=diff
==
--- trunk/test_suite/system_tests/n_state_model.py (original)
+++ trunk/test_suite/system_tests/n_state_model.py Sun Dec  8 20:16:48 2013
@@ -1047,7 +1047,7 @@
 
 # Check the populations.
 self.assertEqual(len(cdp.probs), 3)
-self.assertAlmostEqual(cdp.probs[0], 0.3, 4)
+self.assertAlmostEqual(cdp.probs[0], 0.3, 3)
 self.assertAlmostEqual(cdp.probs[1], 0.6, 3)
 self.assertAlmostEqual(cdp.probs[2], 0.1, 3)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21892 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 11:50:20 2013
New Revision: 21892

URL: http://svn.gna.org/viewcvs/relax?rev=21892view=rev
Log:
Added GUI test for reading spins from a spectrum formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21892r1=21891r2=21892view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Mon Dec  9 11:50:20 2013
@@ -412,6 +412,43 @@
 self.assertEqual(self.app.gui.controller.main_gauge.GetValue(), 
100)
 
 
+def test_read_spins_from_spectrum(self):
+Test the GUI load spins from a spectrum formatted file.
+
+# The path to the files.
+path = status.install_path + sep + 'test_suite' + sep + 'shared_data' 
+ sep + 'peak_lists' + sep
+
+# Simulate the dispersion analysis wizard.
+self.app.gui.analysis.menu_new(None)
+page = self.app.gui.analysis.new_wizard.wizard.get_page(0)
+page.select_disp(None)
+self.app.gui.analysis.new_wizard.wizard._go_next(None)
+self.app.gui.analysis.new_wizard.wizard._go_next(None)
+
+# Get the data.
+analysis_type, analysis_name, pipe_name, pipe_bundle, uf_exec = 
self.app.gui.analysis.new_wizard.get_data()
+
+# Set up the analysis.
+self.app.gui.analysis.new_analysis(analysis_type=analysis_type, 
analysis_name=analysis_name, pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
uf_exec=uf_exec)
+
+# Alias the analysis.
+analysis = self.app.gui.analysis.get_page_from_name(Relaxation 
dispersion)
+
+# Change the results directory.
+analysis.field_results_dir.SetValue(str_to_gui(ds.tmpdir))
+
+# Launch the spin viewer window.
+self.app.gui.show_tree()
+
+# Spin loading wizard:  Initialisation.
+self.app.gui.spin_viewer.load_spins_wizard()
+
+# Spin loading wizard:  The spectrum.read_spins page.
+page = self.app.gui.spin_viewer.wizard.get_page(0)
+page.selection = 'new spectrum'
+self.app.gui.spin_viewer.wizard._go_next()
+
+
 def test_tp02_data_to_tp02(self):
 Test the GUI analysis with the relaxation dispersion 'TP02' model 
fitting to the 'TP02' synthetic data.
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21893 - /trunk/gui/spin_viewer/frame.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 11:50:33 2013
New Revision: 21893

URL: http://svn.gna.org/viewcvs/relax?rev=21893view=rev
Log:
Added GUI key 'new spectrum' to point to 'spectrum.read_spins'.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/gui/spin_viewer/frame.py

Modified: trunk/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/frame.py?rev=21893r1=21892r2=21893view=diff
==
--- trunk/gui/spin_viewer/frame.py (original)
+++ trunk/gui/spin_viewer/frame.py Mon Dec  9 11:50:33 2013
@@ -385,6 +385,10 @@
 elif self.page_method.selection == 'new xyz':
 return self.page_indices['structure.read_xyz']
 
+# Go to the spectrum.read_spins page.
+elif self.page_method.selection == 'new spectrum':
+return self.page_indices['spectrum.read_spins']
+
 # Skip to the structure.load_spins page.
 elif self.page_method.selection == 'preload':
 return self.page_indices['structure.load_spins']


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21896 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 11:50:36 2013
New Revision: 21896

URL: http://svn.gna.org/viewcvs/relax?rev=21896view=rev
Log:
Further added to the GUI test for reading spins from spectrum formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21896r1=21895r2=21896view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Mon Dec  9 11:50:36 2013
@@ -447,6 +447,46 @@
 page = self.app.gui.spin_viewer.wizard.get_page(0)
 page.selection = 'new spectrum'
 self.app.gui.spin_viewer.wizard._go_next()
+page = 
self.app.gui.spin_viewer.wizard.get_page(self.app.gui.spin_viewer.wizard._current_page)
+page.uf_args['file'].SetValue(str_to_gui(path + 'seriesTab.ser'))
+self.app.gui.spin_viewer.wizard._go_next()
+interpreter.flush()# Required because of the asynchronous uf call.
+
+# Spin loading wizard:  The spin loading.
+self.app.gui.spin_viewer.wizard._go_next()
+interpreter.flush()# Required because of the asynchronous uf call.
+
+# Close the spin viewer window.
+self.app.gui.spin_viewer.handler_close()
+
+# Flush the interpreter in preparation for the synchronous user 
functions of the peak list wizard.
+interpreter.flush()
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 3)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'NE1')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 10)
+self.assertEqual(cdp.mol[0].res[1].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 6)
+self.assertEqual(cdp.mol[0].res[2].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
 
 
 def test_tp02_data_to_tp02(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21894 - /trunk/gui/spin_viewer/frame.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 11:50:34 2013
New Revision: 21894

URL: http://svn.gna.org/viewcvs/relax?rev=21894view=rev
Log:
Added spectrum.read_spins GUI page for reading spins from a spectrum formatted 
file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/gui/spin_viewer/frame.py

Modified: trunk/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/frame.py?rev=21894r1=21893r2=21894view=diff
==
--- trunk/gui/spin_viewer/frame.py (original)
+++ trunk/gui/spin_viewer/frame.py Mon Dec  9 11:50:34 2013
@@ -223,6 +223,11 @@
 self.page_indices['structure.read_xyz'] = self.wizard.add_page(page, 
skip_button=True)
 self.wizard.set_seq_next_fn(self.page_indices['structure.read_xyz'], 
self.wizard_page_after_structure_read)
 
+# The spectrum.read_spins page.
+page = uf_store['spectrum.read_spins'].create_page(self.wizard)
+self.page_indices['spectrum.read_spins'] = self.wizard.add_page(page, 
skip_button=True)
+self.wizard.set_seq_next_fn(self.page_indices['spectrum.read_spins'], 
self.wizard_page_after_sequence_read)
+
 # The structure.load_spins page.
 page = uf_store['structure.load_spins'].create_page(self.wizard)
 self.page_indices['structure.load_spins'] = self.wizard.add_page(page)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21895 - /trunk/gui/spin_viewer/frame.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 11:50:35 2013
New Revision: 21895

URL: http://svn.gna.org/viewcvs/relax?rev=21895view=rev
Log:
Added radio button for reading spins from a spectrum formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/gui/spin_viewer/frame.py

Modified: trunk/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/frame.py?rev=21895r1=21894r2=21895view=diff
==
--- trunk/gui/spin_viewer/frame.py (original)
+++ trunk/gui/spin_viewer/frame.py Mon Dec  9 11:50:35 2013
@@ -514,10 +514,18 @@
 self.radio_new_xyz = wx.RadioButton(self, -1, From a new XYZ 
structure file.)
 sizer_radio.Add(self.radio_new_xyz, 0, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
 
+# Spacing.
+sizer_radio.AddSpacer(20)
+
+# The spectrum.read_spins radio button.
+self.radio_new_spectrum = wx.RadioButton(self, -1, From a spectrum 
formatted file.)
+sizer_radio.Add(self.radio_new_spectrum, 0, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
+
 # Bind the buttons.
 self.Bind(wx.EVT_RADIOBUTTON, self._on_select, self.radio_seq)
 self.Bind(wx.EVT_RADIOBUTTON, self._on_select, self.radio_new_pdb)
 self.Bind(wx.EVT_RADIOBUTTON, self._on_select, self.radio_new_xyz)
+self.Bind(wx.EVT_RADIOBUTTON, self._on_select, self.radio_new_spectrum)
 if self.preload_flag:
 self.Bind(wx.EVT_RADIOBUTTON, self._on_select, self.radio_preload)
 
@@ -551,5 +559,7 @@
 self.selection = 'new pdb'
 elif button == self.radio_new_xyz:
 self.selection = 'new xyz'
+elif button == self.radio_new_spectrum:
+self.selection = 'new spectrum'
 elif self.preload_flag and button == self.radio_preload:
 self.selection = 'preload'


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21900 - /trunk/gui/spin_viewer/frame.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 13:18:03 2013
New Revision: 21900

URL: http://svn.gna.org/viewcvs/relax?rev=21900view=rev
Log:
Fix for GUI text string for the select radio button, reading spins from a 
spectrum formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/gui/spin_viewer/frame.py

Modified: trunk/gui/spin_viewer/frame.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/spin_viewer/frame.py?rev=21900r1=21899r2=21900view=diff
==
--- trunk/gui/spin_viewer/frame.py (original)
+++ trunk/gui/spin_viewer/frame.py Mon Dec  9 13:18:03 2013
@@ -518,7 +518,7 @@
 sizer_radio.AddSpacer(20)
 
 # The spectrum.read_spins radio button.
-self.radio_new_spectrum = wx.RadioButton(self, -1, From a spectrum 
formatted file.)
+self.radio_new_spectrum = wx.RadioButton(self, -1, From a peak list 
or spectrum formatted file.)
 sizer_radio.Add(self.radio_new_spectrum, 0, 
wx.LEFT|wx.ALIGN_CENTER_VERTICAL, 0)
 
 # Bind the buttons.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21920 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 17:49:49 2013
New Revision: 21920

URL: http://svn.gna.org/viewcvs/relax?rev=21920view=rev
Log:
Added system test for the analysis of optimisation of the Kjaergaard et al., 
2013 Off-resonance R1rho relaxation dispersion experiments using the 'DPL' 
model.

Work in progress for Support Request #3083, 
(https://gna.org/support/index.php?3083) -  Addition of Data-set for R1rho 
analysis.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21920r1=21919r2=21920view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Mon Dec  9 17:49:49 2013
@@ -2450,6 +2450,137 @@
 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].chi2, 
0.030959849811015544, 3)
 
 
+def test_r1rho_kjaergaard(self):
+Optimisation of the Kjaergaard et al., 2013 Off-resonance R1rho 
relaxation dispersion experiments using the 'DPL' model.
+
+This uses the data from Kjaergaard's paper at U{DOI: 
10.1021/bi4001062http://dx.doi.org/10.1021/bi4001062}.
+
+
+
+# The path to the data files.
+data_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'Kjaergaard_et_al_2013'
+
+# Set pipe name, bundle and type.
+pipe_name = 'base pipe'
+pipe_bundle = 'relax_disp'
+pipe_type= 'relax_disp'
+
+# Create the data pipe.
+self.interpreter.pipe.create(pipe_name=pipe_name, bundle=pipe_bundle, 
pipe_type=pipe_type)
+
+# Read the spins.
+self.interpreter.spectrum.read_spins(file='1_0_46_0_max_standard.ser', 
dir=data_path+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 48)
+
+# Name the isotope for field strength scaling.
+self.interpreter.spin.isotope(isotope='15N')
+
+# Set number of experiments to be used.
+NR_exp = -1
+
+# Load the experiments settings file.
+expfile = open(data_path+sep+'exp_parameters_sort.txt','r')
+expfileslines = expfile.readlines()[:NR_exp]
+expfile.close()
+
+# In MHz
+yOBS = 81.050
+# In ppm
+yCAR = 118.078
+centerPPM_N15 = yCAR
+
+## Read the chemical shift data.
+self.interpreter.chemical_shift.read(file='1_0_46_0_max_standard.ser', 
dir=data_path+sep+'peak_lists')
+
+# Test the chemical shift data.
+cs = [122.223, 122.162, 114.250, 125.852, 118.626, 117.449, 119.999, 
122.610, 118.602, 118.291, 115.393, 
+121.288, 117.448, 116.378, 116.316, 117.263, 122.211, 118.748, 
118.103, 119.421, 119.317, 119.386, 117.279, 
+122.103, 120.038, 116.698, 111.811, 118.639, 118.285, 121.318, 
117.770, 119.948, 119.759, 118.314, 118.160, 
+121.442, 118.714, 113.080, 125.706, 119.183, 120.966, 122.361, 
126.675, 117.069, 120.875, 109.372, 119.811, 126.048]
+
+i = 0
+for spin, spin_id in spin_loop(return_id=True):
+print spin.name, spin.num, spin_id, spin.chemical_shift, cs[i]
+# Check the chemical shift.
+self.assertEqual(spin.chemical_shift, cs[i])
+
+# Increment the index.
+i += 1
+
+# The lock power to field, has been found in an calibration experiment.
+spin_lock_field_strengths_Hz = {'35': 431.0, '39': 651.2, '41': 800.5, 
'43': 984.0, '46': 1341.11, '48': 1648.5}
+
+# Apply spectra settings.
+for i in range(len(expfileslines)):
+line=expfileslines[i]
+if line[0] == #:
+continue
+else:
+# DIRN I deltadof2 dpwr2slock ncyc trim ss sfrq
+DIRN = line.split()[0]
+I = int(line.split()[1])
+deltadof2 = line.split()[2]
+dpwr2slock = line.split()[3]
+ncyc = int(line.split()[4])
+trim = float(line.split()[5])
+ss = int(line.split()[6])
+set_sfrq = float(line.split()[7])
+apod_rmsd = float(line.split()[8])
+spin_lock_field_strength = 
spin_lock_field_strengths_Hz[dpwr2slock]
+
+# Calculate spin_lock time
+time_sl = 2*ncyc*trim
+
+# Define file name for peak list.
+FNAME = %s_%s_%s_%s_max_standard.ser%(I, deltadof2, 
dpwr2slock, ncyc)
+sp_id = %s_%s_%s_%s%(I, deltadof2, dpwr2slock, ncyc)
+
+# Load the peak intensities.
+self.interpreter.spectrum.read_intensities(file=FNAME, 
dir=data_path+sep+'peak_lists', spectrum_id=sp_id, int_method='height

r21919 - in /trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013: exp_parameters.txt exp_parameters_sort.txt

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 17:49:35 2013
New Revision: 21919

URL: http://svn.gna.org/viewcvs/relax?rev=21919view=rev
Log:
Added the RMSD determined via showApod for the 69 experiments.

Work in progress for Support Request #3083, 
(https://gna.org/support/index.php?3083) -  Addition of Data-set for R1rho 
analysis.

Modified:

trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters.txt

trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters_sort.txt

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters.txt
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters.txt?rev=21919r1=21918r2=21919view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters_sort.txt
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/exp_parameters_sort.txt?rev=21919r1=21918r2=21919view=diff


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21921 - /trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/

2013-12-09 Thread tlinnet
Author: tlinnet
Date: Mon Dec  9 17:49:50 2013
New Revision: 21921

URL: http://svn.gna.org/viewcvs/relax?rev=21921view=rev
Log:
Modified analysis script for example data of R1rho.

Work in progress for Support Request #3083, 
(https://gna.org/support/index.php?3083) -  Addition of Data-set for R1rho 
analysis.

Modified:
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py

trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_4_run.py

Modified: 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py?rev=21921r1=21920r2=21921view=diff
==
--- 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py 
(original)
+++ 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_1_ini.py 
Mon Dec  9 17:49:50 2013
@@ -11,10 +11,13 @@
 pipe.create(pipe_name=pipe_name, bundle=pipe_bundle, pipe_type='relax_disp')
 
 # Create the spins
-script(file='relax_2_spins.py', dir=None)
+spectrum.read_spins('peaks_corr_final.list')
 
 # Name the isotope for field strength scaling.
 spin.isotope(isotope='15N')
+
+## Read the chemical shift data.
+chemical_shift.read(file='peaks_corr_final.list', dir=None)
 
 # Set the spectra experimental properties/settings.
 script(file='r1rho_3_spectra_settings.py', dir=None)

Modified: 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py?rev=21921r1=21920r2=21921view=diff
==
--- 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
 (original)
+++ 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_3_spectra_settings.py
 Mon Dec  9 17:49:50 2013
@@ -23,9 +23,6 @@
 #gyro15N = 2.7126E7
 
 writefile = open('omega_rf_ppm.txt','w')
-
-## Read the chemical shift data.
-chemical_shift.read(file='peaks_corr_final.list', dir=None)
 
 for i in range(len(expfileslines)):
 line=expfileslines[i]

Modified: 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_4_run.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_4_run.py?rev=21921r1=21920r2=21921view=diff
==
--- 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_4_run.py 
(original)
+++ 
trunk/test_suite/shared_data/dispersion/Kjaergaard_et_al_2013/r1rho_4_run.py 
Mon Dec  9 17:49:50 2013
@@ -8,8 +8,12 @@
 import os
 from auto_analyses.relax_disp import Relax_disp
 
+# Setting variables for pipe names.
+pipe_name = 'base pipe'
+pipe_bundle = 'relax_disp'
+
 # The dispersion models.
-MODELS = ['R2eff', 'DPL94']
+MODELS = ['R2eff', 'No Rex', 'DPL94']
 # The grid search size (the number of increments per dimension).
 GRID_INC = 4
 # The number of Monte Carlo simulations to be used for error analysis at the 
end of the analysis.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21924 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-10 Thread tlinnet
Author: tlinnet
Date: Tue Dec 10 09:51:04 2013
New Revision: 21924

URL: http://svn.gna.org/viewcvs/relax?rev=21924view=rev
Log:
Fix for wrong use of relax_fit.relax_time instead of relax_disp.relax_time.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21924r1=21923r2=21924view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec 10 09:51:04 2013
@@ -2570,7 +2570,7 @@
 
self.interpreter.relax_disp.spin_lock_offset(spectrum_id=sp_id, 
offset=omega_rf_ppm)
 
 # Set the relaxation times (in s).
-self.interpreter.relax_fit.relax_time(time=time_sl, 
spectrum_id=sp_id)
+self.interpreter.relax_disp.relax_time(spectrum_id=sp_id, 
time=time_sl)
 
 # Set the spectrometer frequency.
 self.interpreter.spectrometer.frequency(id=sp_id, 
frq=set_sfrq, units='MHz')


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21926 - /trunk/test_suite/system_tests/relax_disp.py

2013-12-10 Thread tlinnet
Author: tlinnet
Date: Tue Dec 10 10:36:23 2013
New Revision: 21926

URL: http://svn.gna.org/viewcvs/relax?rev=21926view=rev
Log:
System test turned off until release is over.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=21926r1=21925r2=21926view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Dec 10 10:36:23 2013
@@ -2588,7 +2588,7 @@
 MODSEL = 'AIC'
 
 # Run the analysis.
-relax_disp.Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
results_dir=ds.tmpdir, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, 
modsel=MODSEL)
+#relax_disp.Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
results_dir=ds.tmpdir, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM, 
modsel=MODSEL)
 
 
 def test_r2eff_read(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21946 - /trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list

2013-12-11 Thread tlinnet
Author: tlinnet
Date: Wed Dec 11 11:09:49 2013
New Revision: 21946

URL: http://svn.gna.org/viewcvs/relax?rev=21946view=rev
Log:
Copied sparky list to be modified for sparky file without intensity column.


Added:
trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list
  - copied unchanged from r21945, 
trunk/test_suite/shared_data/peak_lists/sparky2dim.list


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21947 - /trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list

2013-12-11 Thread tlinnet
Author: tlinnet
Date: Wed Dec 11 11:12:07 2013
New Revision: 21947

URL: http://svn.gna.org/viewcvs/relax?rev=21947view=rev
Log:
Modified sparky file to have no columns with intensity.

Modified:
trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list

Modified: trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list?rev=21947r1=21946r2=21947view=diff
==
--- trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list (original)
+++ trunk/test_suite/shared_data/peak_lists/sparky_wo_int.list Wed Dec 11 
11:12:07 2013
@@ -1,9 +1,9 @@
-  Assignment w1 w2   Data Height
+  Assignment w1 w2
 
-   W62NE1-W62HE1128.374  9.932 +1.851056e+06
-  L10N-L10HN127.066  9.419 +3.224387e+05
-V6N-V6HN124.523  9.430 +1.479366e+06
-T2N-T2HN115.994  8.521 +1.179448e+06
-K3N-T2HN125.899  8.695 +4.407306e+06
-A4N-T2HN123.001  9.123 +3.480382e+06
-V5N-T2HN120.839  9.444 +4.306408e+06
+   W62NE1-W62HE1128.374  9.932
+  L10N-L10HN127.066  9.419
+V6N-V6HN124.523  9.430
+T2N-T2HN115.994  8.521
+K3N-T2HN125.899  8.695
+A4N-T2HN123.001  9.123
+V5N-T2HN120.839  9.444


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21949 - in /trunk: lib/spectrum/sparky.py test_suite/system_tests/peak_lists.py

2013-12-12 Thread tlinnet
Author: tlinnet
Date: Thu Dec 12 11:02:00 2013
New Revision: 21949

URL: http://svn.gna.org/viewcvs/relax?rev=21949view=rev
Log:
Implemented to read spins from a SPARKY list, when no intensity column is 
present.

Addition to Support Request #3044, (https://gna.org/support/index.php?3044) - 
Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21949r1=21948r2=21949view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Thu Dec 12 11:02:00 2013
@@ -204,15 +204,29 @@
 except ValueError:
 raise RelaxError(The peak intensity value from the line %s is 
invalid. % line)
 
-# Add the assignment to the peak list object.
-if dim == 1:
-peak_list.add(res_nums=[res_num1], res_names=[res_name1], 
spin_names=[name1], shifts=[w1], intensity=intensity)
-elif dim == 2:
-peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
-elif dim == 3:
-peak_list.add(res_nums=[res_num1, res_num2, res_num1], 
res_names=[res_name1, res_name2, res_name1], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
-elif dim == 4:
-peak_list.add(res_nums=[res_num1, res_num2, res_num1, res_num1], 
res_names=[res_name1, res_name2, res_name1, res_name1], spin_names=[name1, 
name2, name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
+# Add the assignment to the peak list object.
+if dim == 1:
+peak_list.add(res_nums=[res_num1], res_names=[res_name1], 
spin_names=[name1], shifts=[w1], intensity=intensity)
+elif dim == 2:
+peak_list.add(res_nums=[res_num1, res_num2], 
res_names=[res_name1, res_name2], spin_names=[name1, name2], shifts=[w1, w2], 
intensity=intensity)
+elif dim == 3:
+peak_list.add(res_nums=[res_num1, res_num2, res_num1], 
res_names=[res_name1, res_name2, res_name1], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
+elif dim == 4:
+peak_list.add(res_nums=[res_num1, res_num2, res_num1, 
res_num1], res_names=[res_name1, res_name2, res_name1, res_name1], 
spin_names=[name1, name2, name3, name4], shifts=[w1, w2, w3, w4], 
intensity=intensity)
+
+# If no intensity column, for example when reading spins from a 
spectrum list.
+elif int_col == None:
+warn(RelaxWarning((The peak intensity value from the line %s is 
invalid. The return value will be without intensity. % line)))
+
+# Add the assignment to the peak list object.
+if dim == 1:
+peak_list.add(res_nums=[res_num1], res_names=[res_name1], 
spin_names=[name1], shifts=[w1])
+elif dim == 2:
+peak_list.add(res_nums=[res_num1, res_num2], 
res_names=[res_name1, res_name2], spin_names=[name1, name2], shifts=[w1, w2])
+elif dim == 3:
+peak_list.add(res_nums=[res_num1, res_num2, res_num1], 
res_names=[res_name1, res_name2, res_name1], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3])
+elif dim == 4:
+peak_list.add(res_nums=[res_num1, res_num2, res_num1, 
res_num1], res_names=[res_name1, res_name2, res_name1, res_name1], 
spin_names=[name1, name2, name3, name4], shifts=[w1, w2, w3, w4])
 
 
 def write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, 
atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, 
force=True):

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21949r1=21948r2=21949view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Thu Dec 12 11:02:00 2013
@@ -456,6 +456,76 @@
 # Read the spins from peak list.
 self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
 self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 7)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2

r22181 - in /trunk: lib/errors.py lib/warnings.py relax.py status.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 10:32:15 2014
New Revision: 22181

URL: http://svn.gna.org/viewcvs/relax?rev=22181view=rev
Log:
Shifted the pedantic flag to escalate flag. The option -p would insted be used 
for the option --prompt.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

Modified:
trunk/lib/errors.py
trunk/lib/warnings.py
trunk/relax.py
trunk/status.py

Modified: trunk/lib/errors.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/errors.py?rev=22181r1=22180r2=22181view=diff
==
--- trunk/lib/errors.py (original)
+++ trunk/lib/errors.py Fri Feb 14 10:32:15 2014
@@ -131,9 +131,9 @@
 def __str__(self):
 Modify the behaviour of the error system.
 
-# Save the state if the pedantic flag is turned on.
+# Save the state if the escalate flag is turned on.
 from status import Status; status = Status()
-if status.pedantic:
+if status.escalate:
 save_state()
 
 # Modify the error message to include 'RelaxError' at the start (using 
coloured text if a TTY).

Modified: trunk/lib/warnings.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/warnings.py?rev=22181r1=22180r2=22181view=diff
==
--- trunk/lib/warnings.py (original)
+++ trunk/lib/warnings.py Fri Feb 14 10:32:15 2014
@@ -39,8 +39,8 @@
 # Add the text 'RelaxWarning: ' to the start of the warning message.
 message = RelaxWarning: %s\n % message
 
-# Print stack-trace in pedantic mode.
-if status.pedantic:
+# Print stack-trace in escalate mode.
+if status.escalate:
 tb = 
 for frame in inspect.stack()[4:]:
 file = frame[1]
@@ -77,7 +77,7 @@
 warnings.formatwarning = format
 
 # Set warning filters.
-if status.pedantic:
+if status.escalate:
 warnings.filterwarnings('error', category=BaseWarning)
 else:
 warnings.filterwarnings('always', category=BaseWarning)

Modified: trunk/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22181r1=22180r2=22181view=diff
==
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 10:32:15 2014
@@ -279,7 +279,7 @@
 parser.add_option('--licence', action='store_true', dest='licence', 
default=0, help='display the licence')
 parser.add_option('-t', '--tee', action='store', type='string', 
dest='tee', help='tee relax output to stdout and the file LOG_FILE', 
metavar='LOG_FILE')
 parser.add_option('-g', '--gui', action='store_true', dest='gui', 
default=0, help='launch the relax GUI')
-parser.add_option('-p', '--pedantic', action='store_true', 
dest='pedantic', default=0, help='escalate all warnings to errors')
+parser.add_option('-e', '--escalate', action='store_true', 
dest='escalate', default=0, help='escalate all warnings to errors')
 parser.add_option('--test', action='store_true', dest='test', 
default=0, help='run relax in test mode')
 parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
 parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system/functional tests 
(part of the test suite)')
@@ -301,9 +301,9 @@
 if options.numpy_raise:
 numpy.seterr(all='raise')
 
-# Pedantic flag.
-if options.pedantic:
-status.pedantic = True
+# escalate flag.
+if options.escalate:
+status.escalate = True
 
 # Logging.
 if options.log:

Modified: trunk/status.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/status.py?rev=22181r1=22180r2=22181view=diff
==
--- trunk/status.py (original)
+++ trunk/status.py Fri Feb 14 10:32:15 2014
@@ -51,7 +51,7 @@
 
 # Initialise some variables.
 self._instance.debug = False
-self._instance.pedantic = False
+self._instance.escalate = False
 self._instance.test_mode = False
 self._instance.uf_intro = False
 self._instance.show_gui = False


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22182 - in /trunk: relax.py status.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 10:32:17 2014
New Revision: 22182

URL: http://svn.gna.org/viewcvs/relax?rev=22182view=rev
Log:
Added the -p --prompt option for running a relax script and inspect 
interactively.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

Modified:
trunk/relax.py
trunk/status.py

Modified: trunk/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22182r1=22181r2=22182view=diff
==
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 10:32:17 2014
@@ -280,6 +280,7 @@
 parser.add_option('-t', '--tee', action='store', type='string', 
dest='tee', help='tee relax output to stdout and the file LOG_FILE', 
metavar='LOG_FILE')
 parser.add_option('-g', '--gui', action='store_true', dest='gui', 
default=0, help='launch the relax GUI')
 parser.add_option('-e', '--escalate', action='store_true', 
dest='escalate', default=0, help='escalate all warnings to errors')
+parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='execute the given script and continue into the 
prompt mode to allow for interactive inspection')
 parser.add_option('--test', action='store_true', dest='test', 
default=0, help='run relax in test mode')
 parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
 parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system/functional tests 
(part of the test suite)')
@@ -305,6 +306,10 @@
 if options.escalate:
 status.escalate = True
 
+# Script prompt interactive inspection flag.
+if options.prompt:
+status.prompt = True
+
 # Logging.
 if options.log:
 # Exclusive modes.

Modified: trunk/status.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/status.py?rev=22182r1=22181r2=22182view=diff
==
--- trunk/status.py (original)
+++ trunk/status.py Fri Feb 14 10:32:17 2014
@@ -52,6 +52,7 @@
 # Initialise some variables.
 self._instance.debug = False
 self._instance.escalate = False
+self._instance.prompt = False
 self._instance.test_mode = False
 self._instance.uf_intro = False
 self._instance.show_gui = False


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22183 - /trunk/prompt/interpreter.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 11:22:56 2014
New Revision: 22183

URL: http://svn.gna.org/viewcvs/relax?rev=22183view=rev
Log:
Second

Modified:
trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22183r1=22182r2=22183view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 11:22:56 2014
@@ -266,12 +266,16 @@
 readline.parse_and_bind(tab: complete)
 
 # Execute the script file if given.
-if script_file:
+if script_file and not status.prompt:
 # Turn on the user function intro flag.
 status.uf_intro = True
 
 # Run the script.
 return run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+
+if script_file and status.prompt:
+run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+prompt(intro=None, local=locals())
 
 # Go to the prompt.
 else:
@@ -333,12 +337,13 @@
 sys.path.reverse()
 
 # Execute the script as a module.
-if dep_check.runpy_module:
-runpy.run_module(module, globals)
+#if dep_check.runpy_module:
+#runpy.run_module(module, globals)
 
 # Allow scripts to run under Python = 2.4.
-else:
-exec(compile(open(name).read(), name, 'exec'), globals)
+#else:
+#exec(compile(open(name).read(), name, 'exec'), globals)
+exec(compile(open(name).read(), name, 'exec'), globals)
 
 finally:
 # Switch back to the original working directory.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22184 - in /trunk: prompt/interpreter.py relax.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 11:22:57 2014
New Revision: 22184

URL: http://svn.gna.org/viewcvs/relax?rev=22184view=rev
Log:
Modified the help text to explain that -p will launch relax in prompt mode 
after running any optionally supplied scripts.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

This is to allow the -p --prompt option to be given without a script. relax 
should support this so that a user doesn't get too confused when
trying to start in prompt mode with the --prompt flag and support the --prompt 
argument without a script being supplied.

Modified:
trunk/prompt/interpreter.py
trunk/relax.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22184r1=22183r2=22184view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 11:22:57 2014
@@ -336,14 +336,18 @@
 # Reverse the system path so that the script path is first.
 sys.path.reverse()
 
-# Execute the script as a module.
-#if dep_check.runpy_module:
-#runpy.run_module(module, globals)
+# Execute the script as a module if the inspect interactively prompt 
flag is not true.
+if dep_check.runpy_module and not status.prompt:
+runpy.run_module(module, globals)
+
+# Execute the script as a module if the inspect interactively prompt 
flag is not true.
+elif dep_check.runpy_module and not status.prompt:
+runpy.run_module(module, globals)
 
 # Allow scripts to run under Python = 2.4.
-#else:
-#exec(compile(open(name).read(), name, 'exec'), globals)
-exec(compile(open(name).read(), name, 'exec'), globals)
+else:
+exec(compile(open(name).read(), name, 'exec'), globals)
+
 
 finally:
 # Switch back to the original working directory.

Modified: trunk/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22184r1=22183r2=22184view=diff
==
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 11:22:57 2014
@@ -215,7 +215,7 @@
 # Only import the module in the test modes (to improve program 
start up speeds).
 from test_suite.test_suite_runner import Test_suite_runner
 
-# Load the interpreter and turn intros on.
+# Load the interpreter and turn intros on.launch relax in prompt 
mode after running any optionally supplied scripts
 self.interpreter = interpreter.Interpreter(show_script=False, 
raise_relax_error=True)
 self.interpreter.on()
 
@@ -280,7 +280,7 @@
 parser.add_option('-t', '--tee', action='store', type='string', 
dest='tee', help='tee relax output to stdout and the file LOG_FILE', 
metavar='LOG_FILE')
 parser.add_option('-g', '--gui', action='store_true', dest='gui', 
default=0, help='launch the relax GUI')
 parser.add_option('-e', '--escalate', action='store_true', 
dest='escalate', default=0, help='escalate all warnings to errors')
-parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='execute the given script and continue into the 
prompt mode to allow for interactive inspection')
+parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='launch relax in prompt mode after running any 
optionally supplied scripts')
 parser.add_option('--test', action='store_true', dest='test', 
default=0, help='run relax in test mode')
 parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
 parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system/functional tests 
(part of the test suite)')


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22185 - in /trunk: prompt/interpreter.py relax.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 11:47:33 2014
New Revision: 22185

URL: http://svn.gna.org/viewcvs/relax?rev=22185view=rev
Log:
Manually reverted the temporary change of r22184 and 22183.

The command used was:

svn merge -r22184:r22182 .

.
r22184 | tlinnet | 2014-02-14 11:22:57 +0100 (Fri, 14 Feb 2014) | 6 lines

Modified the help text to explain that -p will launch relax in prompt mode 
after running any optionally supplied scripts.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

This is to allow the -p --prompt option to be given without a script. relax 
should support this so that a user doesn't get too confused when
trying to start in prompt mode with the --prompt flag and support the --prompt 
argument without a script being supplied.

r22183 | tlinnet | 2014-02-14 11:22:56 +0100 (Fri, 14 Feb 2014) | 1 line

Second
.


Modified:
trunk/prompt/interpreter.py
trunk/relax.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22185r1=22184r2=22185view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 11:47:33 2014
@@ -266,16 +266,12 @@
 readline.parse_and_bind(tab: complete)
 
 # Execute the script file if given.
-if script_file and not status.prompt:
+if script_file:
 # Turn on the user function intro flag.
 status.uf_intro = True
 
 # Run the script.
 return run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
-
-if script_file and status.prompt:
-run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
-prompt(intro=None, local=locals())
 
 # Go to the prompt.
 else:
@@ -336,18 +332,13 @@
 # Reverse the system path so that the script path is first.
 sys.path.reverse()
 
-# Execute the script as a module if the inspect interactively prompt 
flag is not true.
-if dep_check.runpy_module and not status.prompt:
+# Execute the script as a module.
+if dep_check.runpy_module:
 runpy.run_module(module, globals)
 
-# Execute the script as a module if the inspect interactively prompt 
flag is not true.
-elif dep_check.runpy_module and not status.prompt:
-runpy.run_module(module, globals)
-
 # Allow scripts to run under Python = 2.4.
 else:
 exec(compile(open(name).read(), name, 'exec'), globals)
-
 
 finally:
 # Switch back to the original working directory.

Modified: trunk/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22185r1=22184r2=22185view=diff
==
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 11:47:33 2014
@@ -215,7 +215,7 @@
 # Only import the module in the test modes (to improve program 
start up speeds).
 from test_suite.test_suite_runner import Test_suite_runner
 
-# Load the interpreter and turn intros on.launch relax in prompt 
mode after running any optionally supplied scripts
+# Load the interpreter and turn intros on.
 self.interpreter = interpreter.Interpreter(show_script=False, 
raise_relax_error=True)
 self.interpreter.on()
 
@@ -280,7 +280,7 @@
 parser.add_option('-t', '--tee', action='store', type='string', 
dest='tee', help='tee relax output to stdout and the file LOG_FILE', 
metavar='LOG_FILE')
 parser.add_option('-g', '--gui', action='store_true', dest='gui', 
default=0, help='launch the relax GUI')
 parser.add_option('-e', '--escalate', action='store_true', 
dest='escalate', default=0, help='escalate all warnings to errors')
-parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='launch relax in prompt mode after running any 
optionally supplied scripts')
+parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='execute the given script and continue into the 
prompt mode to allow for interactive inspection')
 parser.add_option('--test', action='store_true', dest='test', 
default=0, help='run relax in test mode')
 parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
 parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system

r22186 - /trunk/relax.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 11:54:44 2014
New Revision: 22186

URL: http://svn.gna.org/viewcvs/relax?rev=22186view=rev
Log:
Modified the help text to explain that -p will launch relax in prompt mode 
after running any optionally supplied scripts.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

This is to allow the -p --prompt option to be given without a script. relax 
should support this so that a user doesn't get too confused when
trying to start in prompt mode with the --prompt flag and support the --prompt 
argument without a script being supplied.

Modified:
trunk/relax.py

Modified: trunk/relax.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax.py?rev=22186r1=22185r2=22186view=diff
==
--- trunk/relax.py (original)
+++ trunk/relax.py Fri Feb 14 11:54:44 2014
@@ -280,7 +280,7 @@
 parser.add_option('-t', '--tee', action='store', type='string', 
dest='tee', help='tee relax output to stdout and the file LOG_FILE', 
metavar='LOG_FILE')
 parser.add_option('-g', '--gui', action='store_true', dest='gui', 
default=0, help='launch the relax GUI')
 parser.add_option('-e', '--escalate', action='store_true', 
dest='escalate', default=0, help='escalate all warnings to errors')
-parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='execute the given script and continue into the 
prompt mode to allow for interactive inspection')
+parser.add_option('-p', '--prompt', action='store_true', 
dest='prompt', default=0, help='launch relax in prompt mode after running any 
optionally supplied scripts')
 parser.add_option('--test', action='store_true', dest='test', 
default=0, help='run relax in test mode')
 parser.add_option('-x', '--test-suite', action='store_true', 
dest='test_suite', default=0, help='execute the relax test suite')
 parser.add_option('-s', '--system-tests', action='store_true', 
dest='system_tests', default=0, help='execute the relax system/functional tests 
(part of the test suite)')


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22187 - /trunk/prompt/interpreter.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 12:13:05 2014
New Revision: 22187

URL: http://svn.gna.org/viewcvs/relax?rev=22187view=rev
Log:
Finished implementing the functionality of interacting with variables after 
executing a script.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

For getting access to variables after executing a script, the variable should 
be saved under: cdp.X, where X define a container.
The name space issue is discussed in: 
http://thread.gmane.org/gmane.science.nmr.relax.devel/5012

Modified:
trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22187r1=22186r2=22187view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 12:13:05 2014
@@ -266,12 +266,17 @@
 readline.parse_and_bind(tab: complete)
 
 # Execute the script file if given.
-if script_file:
+if script_file and not status.prompt:
 # Turn on the user function intro flag.
 status.uf_intro = True
 
 # Run the script.
 return run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+
+# Execute the script and go into prompt if the interactive flag -p 
--prompt is given at startup.
+if script_file and status.prompt:
+run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+prompt(intro=None, local=locals())
 
 # Go to the prompt.
 else:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22188 - /trunk/prompt/interpreter.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 12:28:25 2014
New Revision: 22188

URL: http://svn.gna.org/viewcvs/relax?rev=22188view=rev
Log:
Added Copyright info to modified file.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

Modified:
trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22188r1=22187r2=22188view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 12:28:25 2014
@@ -1,6 +1,7 @@
 ###
 # #
 # Copyright (C) 2003-2014 Edward d'Auvergne   #
+# Copyright (C) 2014 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22191 - /trunk/prompt/interpreter.py

2014-02-14 Thread tlinnet
Author: tlinnet
Date: Fri Feb 14 15:19:58 2014
New Revision: 22191

URL: http://svn.gna.org/viewcvs/relax?rev=22191view=rev
Log:
Fix for the user function intro flag.

Fix for sr #3117, (https://gna.org/support/?3117) - Functionality to inspect 
interactively after running script - The equivalence to python -i

It should be turned on for the script so you see the relax messages, and 
then turned off again for the prompt so that
the user function text and relax is not printed out twice.

Modified:
trunk/prompt/interpreter.py

Modified: trunk/prompt/interpreter.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/prompt/interpreter.py?rev=22191r1=22190r2=22191view=diff
==
--- trunk/prompt/interpreter.py (original)
+++ trunk/prompt/interpreter.py Fri Feb 14 15:19:58 2014
@@ -276,7 +276,16 @@
 
 # Execute the script and go into prompt if the interactive flag -p 
--prompt is given at startup.
 if script_file and status.prompt:
+# Turn on the user function intro flag.
+status.uf_intro = True
+
+# Run the script.
 run_script(intro=self.__intro_string, local=locals(), 
script_file=script_file, show_script=self.__show_script, 
raise_relax_error=self.__raise_relax_error)
+
+# Turn off the user function intro flag.
+status.uf_intro = False
+
+# Go to the prompt.
 prompt(intro=None, local=locals())
 
 # Go to the prompt.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22197 - /trunk/test_suite/shared_data/dispersion/bug_21665.bz2

2014-02-18 Thread tlinnet
Author: tlinnet
Date: Tue Feb 18 12:05:54 2014
New Revision: 22197

URL: http://svn.gna.org/viewcvs/relax?rev=22197view=rev
Log:
Save state added for bug #21665.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Added:
trunk/test_suite/shared_data/dispersion/bug_21665.bz2

Added: trunk/test_suite/shared_data/dispersion/bug_21665.bz2
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/bug_21665.bz2?rev=22197view=auto
==
--- trunk/test_suite/shared_data/dispersion/bug_21665.bz2 (added)
+++ trunk/test_suite/shared_data/dispersion/bug_21665.bz2 Tue Feb 18 12:05:54 
2014
@@ -1,0 +1,20 @@
+BZh91AYSYÙ¢­ÆT
€ÜD@P‡ÿ÷ý«¿ïÿê`*¼óë)·x öË8Ó@‡ï=â21ØÚ((W}¯5z¡^*kîÈ¢’óL ÆÓ`Ä
+ÏqƜ\ªÍ×^
+±àX( (Uh,1Ó!R™5!é¨
¨4@Ó@ÓR¤”hÚdІ¦€0šO)@i6‚cÔÔ`0€À 4”  …=2Tɐ=@
4€Ðh4‰ šš4ÓM1¦ dÚ0˜šdŒj’CBb™1LžªmM2d@4Ÿ2zú2È¡Hª
+ ¬QbÈ#$`1I€Áš0BC²Áï¥OQj£%%uóGœâͶnµºõ´µN.*4œEw d¤É ˜*›pª 
€¾úb„TPH(E!!!0,@’)HƒHDd„¤„Ad‘T€ŒX2,Uƒ0'š…
+‚!ϊŠ
3j¤ˆ¡  1€+ Ō«Á$H$ŠÈF¤R0QY‘ 
)FB#0AP`Á€È‰R0ˆ00!$X0c±AŠ¡$’ERÂH$I@Œ*AAV(@P‘b §éþ) 
—þjˆHÈ*‰é··þç†É׊ýór—M'A2ž¼¦D›´œ·w¿öMô÷z¬—N€¤àÈá²cÝk¦p›¦RswëÖ·õÅغs3÷IÉ1;N•I*Fg¦#¡ÄJLeá×E1üz¾©û'3èÛ؝D¤áN—53îèãó—ËÓèç~ýJæòp}ß½¡
 
—ŠV’ÂY,ƒ¸ˆêuH‘æûì5ûï£Ýòù}ÙwÝßìW³ÊË,X£ÈjT©Rªl]#úß%s‘Îs›Ùśµ¤ª¼]Ús3å§d7]ÝØoodZ'³y¼9˜övwÏYÝaV®cž6ÖÁÍO]OSç¸HÝ\^.·;՗¼{±¥•¯ŸOs2©ªtº˜àlšäû°æcך¬7Wá½¼àßiÜoMÒz³«.y”KÞ·À«íVõM×
+ºzÖÛƻڙ}Û×EPÁ©©i1¯¬á ˆ,FˆáGá ˆÁ#1!†É}ܞÌ{z@ŽÃaÐàt:
ŽFãÜáÙÛiY™xÕ1\ÞÝNõQ‰Ÿßì÷N¾¹›~^ëæˆUVÛÃ{yÁóë—7·Œ6-= 
m¬ff‹Ìn¯Wa½¼àÂÊIìÞof=ʺu\isXÑÞµY\:‰ÌÍç‡3é\‰¥Îr‘Kw‘¡F+I»k»f=}+*¬A°Áƒ è:
Æã˜â0qGÐrYœãRÀl:C‘Ðà`Ür7#0!ˆÀvNTU;\ËÙ͞’ó‹Rk’äÖn¢©v 
'Ӈzùj«êmRõlmVݍÛwÛCÍ”ˆZH«ª! ¯Î«¥üù¥içòé§-RÉ¯Æ 
†úuëçAÇãVå|™Þ\¸ãWço;w¬3º·,ežvüö¸ÚêܬöÎ¥î2×V…
~)šÛ݃Ü$àÁ[»}‚š‰4*ç}j'dÇäe§T¶IØÞ~+q{*$Ћå{m²[`šè·¬QƒòÖj!º$Л{mƒ²NÆüªô;d쓱Yï·7‹
ÂN}[ˆîÉÙ'bjkâ66ŒlOÆ^þ¦Âl“c~Q¬ú­’v*Še³â4#ãw
÷   82÷«;%¨“Bµòj~lå’lG~1ýÜÀs   87ñÌïºäå’l_¾[í‚lÝgqgˀµ’l\Fßi 
Ñ'SÌØ\mƒ½’vw¾5' j(“C]ËÕäà9„œ_cêm´IÐÐíq-P*‰4+µ.ÉhÑ'Fu5Iz$ЬCæÔ
Qˆè“*‚%\z‡ÈWÏR Œ~TûlIPéU\c:„ØdäöËAÖ¼g
Èã¶6[5”²RBˆÝZk[}Ôé#_O\SNŠámêÉŔ—FÏV£Ùt`ÙÎ/ªnòšéDM   
ˆ!Y±GtY-«FEž6°Õ«
Š¡OV†+;®eÍ3‚Í]é—*µs=M‚B›'SÆ
.FÏWJÉek=u„!C.VÐ-%Š² SÒ©åæ
WÌËÉ4:€ïž©É‹#yK”¼ŠÊ6Ç.Ѳ´Þö»ßYÖ³­Û(XÃ0D‚°`„ø’¶ÈDî4.² XÜ° 
N‘Ï´íæ´ª+¥¼JmU[æV=œO2Ð%Ñ$`@éÔnÂwÓ©§CRIFu“(*ßuåuQÛÊbˆ·)MI-mp´s8ƒõ¾jZsZw­œ¥s
ÚՖÔôäçUº-oO|€€pŒÙ®iÍÏKÒ§;)dé.îkX4åŽîUt÷²§tÎGqܹ®¡kww;9\¾(µfù=¬Â‹æî 
@uS·wv¸!­PžºÜ²(7m#­eóU4Ž½¶htUÖlepÝ¡{uµ|êÝ@€gug]]êaƒ™yHeîhé=ÙÚÀ®ÍSٙ¿
 õ¥j­H¯xìæh5G0sj
¬ÜBræVÍM™Ùe¼–÷ŠZÖKUgs÷Z²4eµºpÜÊ¡»J‚™;»!]PÕ1ŒÚ­kZبX6™¸8‚ê îƒh9ƒ¨Õ 
9ƒˆà7Õ
âÑðo1A¼T:Íj#›Pçjb°H‹Uˆº¦æŽ/‚Ë°åƒ4]‰GrÅ‚„Ðî±FwhXÕfÎg\*#.®¬R¼61ڛ…
ÈP;,Ûn­hÁURæ–íÞ©Û–Ž¤°öfv]MÍåÝÉ««¼š',eÍåՑÕbç0ÑwW¦MÕՒ7³Ö)dã˝56w…
*¶$©ZÊNFº¾ˆd9Îk¨37`ôÅ㪬ÙǸҾ„ªÔ«P t”4-Öl󣼍Éïnõ8Va«ùG×ù
+èÃ?7ˆ@€KGUvœÐ†Ôt¶éáôÍq'¥QOxÓ`¤ €*P%m\.¾c»P€
KçÕºžµTŠžEÍb치€3:š;’渁fÎÒ 
efrE‹nè3ˆµ¶u¬=dÙÕº‘üŸ¹ÿß_ù‡ßÿ8aïüaܐ'òCö¿Çæj[J«Q[j6U*D‹IH¢(­eJÄ´T
-
J¦‹¥ÀNÀI’ Hˆ¦BþÎݯ–G|oܽz\Aq¸£QdcMª  ·û'D½6§•±Þ”A–$tÕЬ¾ 
ûy×Öý?ým\ëôn7.9ißo«ãg¦«•€vý¸ãŽ45TUâÑ¡:띌-9Õít5í¯8%¨•¢*©F‹
+ª­µRw†glëŽ6Û3¿[’ïÙ@`€ªž¦›K²ë1÷;lˆ€!Ç.C“Ƥp³s‡.ÝEÎÖn¦v…
MĊY•#/æÉÍ$
+nÐsLÙ 
‚Ñ׸ÕL,Ø:B²¢I›‡ÑIBHEÛcܽF·3¶II·€ÊVƒÌ‰ÑpH$‚;Òú¥Äɹј¯{ÓZ´*ìX$Î8kPt½Nˆ0Aýê¬Ù
-ÖËT؅[¢òX€·Ê‘¯ù 
*kÎÛæfv뮳ªŸoý{°ÛKm´¶ÁJ¬KR$Y)U²ª-m«Z¤a)-£[hÿwÚþ_R\?-•ˆáŸª•d°„€ÕÌl8AÆ
Ay÷¿zùôÆsçç/¸Í$WÏô÷xIJ8»‚º_‰WW™ @ò՛g  
ˆ×KJΙÛñRIËëä;à,ä’'túfæMõ‰5š¯*öþ¬×n6Û\/uuÌ:÷÷UTb±‘c#ÀÙl´HeVkkèy(Jª%Iâ欨xß2,ѝo§g®•Db«(Å‘GŸ~6z¥Vœúéٓ{IÖÛišk˜Íý35eh‚Å•I_9†A}4¼zoçʨŒV
 2(*¢$H¬_:Oœ[jõ•Ç¦À’vîë“Ãz§
+!R¡
0ÇÞæZË ;Ÿ^Þ6ÛiXT¿2à i§/Ÿ*±ŒV  (‹ ‘aç¿ÊñhBËóÞzk:êð{f›åÂi/L+ 
IæÓ6Ák^´}¼ú*Š ‚ȐHª™Ùw$W‡¢a+Ä
+¾Ý2×'=¼´¬q‰AkY³¤ÄA`f†Ž¶†e1ã)ˆíš=ûªŠ¨  1,Œƒ}ZµZAû´4w@ðÖ=¨!jU9´
º»2h‡xÀтí㮹zûa¿Ÿ*££*°_9×b¼c\WO]µÓV,;Åâ¨S(1 I‹#å¶jÏ/+q¨«ˆE 
èÑGKP²C¦Eë¾Í{ä„1dÄyíÊ* 
¬@H*«‰ç]H-Xˆ–úḆœõ“”ÞØ.ñè˜S‡•N0¥t֐qˆ—Þ¯‘¤Y•¬¾\
“„ÍvÂvÍpëõÐ -L‚Tˆè Ã껥;×*½õ‹¾ªÖC­m4ÜþÇcŠmÆÁ%  
(@@!R$Y)”EUiQ[e‰QD@¤ ŠˆõÀ|…
AÖbžAØsÍÛ!ŒcRÛ1RÛ±õ19[²άUîY›=E§ð‰žý~jŸŽ´¿b°ÜæcÌUìíÕSHa¦ÍӍŽ9×UC±¶Ús‹q֊
 ŒÍhgr¬S
$$£ãºWpÊí· Éˆ!YD!%­°‡c©TâïãžNÁº‘Ä °ÚTTµQ#Q*2­µóµ°ñ܁%á4¢QJ2œ:oLx¤  
*m¥‚˜@*‚e°‚ßd…F¥ûRbœd4ãµåÐBZ¢Œ’õã!y°äù²±{ó@˜„Š!Ï]c
i‚fù ÷Òã;ñ˜ŒAkIó¾ù‰!ç·N½vó›ê¼e’”A$*yð@“nÚtZã›a½—(‘ZÖM¢¥¯Êûl  
´€£ˆï„éyñgH°09¦Êøýì‚@„šÈôÃCòyqè§r‰7«Iqòs7ëð~’ëÕâŒ[ŒÁoj÷îo›ié‰ð³Û™·Xˆ¨UÚóâç‹ËçÅ
   ÇUûìþž½ÄTǽÏÀGü  óúû÷×Ý´¶•¨•VÚÑRªD‹IH±ˆ”¶ÖŠDJ6ÙZîþž%…p€Ô°„ƒâ
@mQû±wÐVTôã×ëùÜhüÜ×L=óšjü勇šæôÉ[pæ÷´)1}ý¦ò†3mV±‹éVÈ#tDÄf€v

r22198 - /trunk/test_suite/system_tests/relax_disp.py

2014-02-18 Thread tlinnet
Author: tlinnet
Date: Tue Feb 18 12:19:41 2014
New Revision: 22198

URL: http://svn.gna.org/viewcvs/relax?rev=22198view=rev
Log:
Added systemtest to catch bug: relax -s 
Relax_disp.test_bug_21665_cpmg_two_fields_two_delaytimes_fail

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22198r1=22197r2=22198view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Feb 18 12:19:41 2014
@@ -264,6 +264,21 @@
 relax_disp.Relax_disp.opt_max_iterations = 1000
 relax_disp.Relax_disp(pipe_name=origin - relax_disp (Thu Jan  2 
13:46:44 2014), pipe_bundle=relax_disp (Thu Jan  2 13:46:44 2014), 
results_dir=self.tmpdir, models=['R2eff', 'No Rex', 'CR72', 'NS CPMG 2-site 
expanded'], grid_inc=3, mc_sim_num=5, modsel='AIC', pre_run_dir=None, 
insignificance=1.0, numeric_only=False, mc_sim_all_models=False, eliminate=True)
 
+
+def test_bug_21665_cpmg_two_fields_two_delaytimes_fail(self):
+U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times.
+
+# Clear the data store.
+self.interpreter.reset()
+
+# Load the state.
+state = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+self.interpreter.state.load(state, force=True)
+
+# Execute the auto-analysis (fast).
+relax_disp.Relax_disp.opt_func_tol = 1e-5
+relax_disp.Relax_disp.opt_max_iterations = 1000
+relax_disp.Relax_disp(pipe_name=compare_128_FT_R2eff, 
pipe_bundle=cpmg_disp_sod1d90a, results_dir=self.tmpdir, models=['R2eff'], 
grid_inc=3, mc_sim_num=5, modsel='AIC', pre_run_dir=None, insignificance=1.0, 
numeric_only=False, mc_sim_all_models=False, eliminate=True)
 
 
 def test_curve_type_cpmg_fixed_time(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22199 - /trunk/test_suite/system_tests/relax_disp.py

2014-02-18 Thread tlinnet
Author: tlinnet
Date: Tue Feb 18 15:26:45 2014
New Revision: 22199

URL: http://svn.gna.org/viewcvs/relax?rev=22199view=rev
Log:
Added a systemtest for using both calc() and a systemtest for relax_disp auto 
analysis.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/system_tests/relax_disp.py

Modified: trunk/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22199r1=22198r2=22199view=diff
==
--- trunk/test_suite/system_tests/relax_disp.py (original)
+++ trunk/test_suite/system_tests/relax_disp.py Tue Feb 18 15:26:45 2014
@@ -265,8 +265,22 @@
 relax_disp.Relax_disp(pipe_name=origin - relax_disp (Thu Jan  2 
13:46:44 2014), pipe_bundle=relax_disp (Thu Jan  2 13:46:44 2014), 
results_dir=self.tmpdir, models=['R2eff', 'No Rex', 'CR72', 'NS CPMG 2-site 
expanded'], grid_inc=3, mc_sim_num=5, modsel='AIC', pre_run_dir=None, 
insignificance=1.0, numeric_only=False, mc_sim_all_models=False, eliminate=True)
 
 
-def test_bug_21665_cpmg_two_fields_two_delaytimes_fail(self):
-U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times.
+def test_bug_21665_cpmg_two_fields_two_delaytimes_fail_calc(self):
+U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times, using calc().
+
+# Clear the data store.
+self.interpreter.reset()
+
+# Load the state.
+state = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+self.interpreter.state.load(state, force=True)
+
+# Run the calculation.
+self.interpreter.calc(verbosity=1)
+
+
+def test_bug_21665_cpmg_two_fields_two_delaytimes_fail_relax_disp(self):
+U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times using 
auto_analysis.
 
 # Clear the data store.
 self.interpreter.reset()


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22214 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-19 Thread tlinnet
Author: tlinnet
Date: Wed Feb 19 17:23:35 2014
New Revision: 22214

URL: http://svn.gna.org/viewcvs/relax?rev=22214view=rev
Log:
Implemented unit test for catching the correct return of 
loop_exp_frq_offset_point_time.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22214r1=22213r2=22214view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Wed Feb 19 17:23:35 2014
@@ -38,3 +38,31 @@
 
 # Create a dispersion data pipe.
 ds.add(pipe_name='orig', pipe_type='relax_disp')
+
+
+def test_bug_21665_cpmg_two_fields_two_delaytimes_fail_calc(self):
+U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times, using calc().
+
+# Load the state.
+statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+state.load_state(statefile, force=True)
+
+# Original data
+ncyc_1 = [20, 16, 10, 36, 2, 12, 4, 22, 18, 40, 14, 26, 8, 32, 24, 6, 
28]
+sfrq_1 = 499.86214*1E6
+time_T2_1 = 0.04
+cpmg_1 = [ncyc/time_T2_1 for ncyc in ncyc_1]
+cpmg_1.sort()
+
+ncyc_2 = [28, 4, 32, 60, 2, 10, 16, 8, 20, 52, 18, 40, 6, 12, 24, 14]
+sfrq_2 = 599.8908587*1E6
+time_T2_2 = 0.06
+cpmg_2 = [ncyc/time_T2_2 for ncyc in ncyc_2]
+cpmg_2.sort()
+
+# Test the loop function.
+for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
+if frq == sfrq_1:
+self.assertEqual(time, time_T2_1)
+if frq == sfrq_2:
+self.assertEqual(time, time_T2_2)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22220 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-20 Thread tlinnet
Author: tlinnet
Date: Thu Feb 20 18:15:43 2014
New Revision: 0

URL: http://svn.gna.org/viewcvs/relax?rev=0view=rev
Log:
Added the The relaxation time period to be used when returning cpmg frqs.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=0r1=22219r2=0view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Thu Feb 20 18:15:43 2014
@@ -2369,7 +2369,7 @@
 return cpmg_frqs
 
 
-def return_cpmg_frqs_single(exp_type=None, frq=None, offset=None, 
ref_flag=True):
+def return_cpmg_frqs_single(exp_type=None, frq=None, offset=None, time=None, 
ref_flag=True):
 Return the list of nu_CPMG frequencies.
 
 @keyword exp_type:  The experiment type.
@@ -2378,6 +2378,8 @@
 @type frq:  float
 @keyword offset:The hard pulse offset, if desired.
 @type offset:   None or float
+@keyword time:  The relaxation time period.
+@type time: float
 @keyword ref_flag:  A flag which if False will cause the reference 
spectrum frequency of None to be removed from the list.
 @type ref_flag: bool
 @return:The list of nu_CPMG frequencies in Hz.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22221 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-20 Thread tlinnet
Author: tlinnet
Date: Thu Feb 20 18:16:39 2014
New Revision: 1

URL: http://svn.gna.org/viewcvs/relax?rev=1view=rev
Log:
Added test for skipping non-matching time points.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=1r1=0r2=1view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Thu Feb 20 18:16:39 2014
@@ -2412,6 +2412,10 @@
 
 # Skip non-matching offsets.
 if offset != None and hasattr(cdp, 'spin_lock_offset') and 
cdp.spin_lock_offset[id] != offset:
+continue
+
+# Skip non-matching time points.
+if time != None and hasattr(cdp, 'relax_times') and 
cdp.relax_times[id] != time:
 continue
 
 # Skip non-matching points.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22224 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-20 Thread tlinnet
Author: tlinnet
Date: Thu Feb 20 18:17:11 2014
New Revision: 4

URL: http://svn.gna.org/viewcvs/relax?rev=4view=rev
Log:
Improved unit test for cathing both time and dispersion point when looping over 
experiment and time points.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=4r1=3r2=4view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Thu Feb 20 18:17:11 2014
@@ -54,15 +54,22 @@
 cpmg_1 = [ncyc/time_T2_1 for ncyc in ncyc_1]
 cpmg_1.sort()
 
-ncyc_2 = [28, 4, 32, 60, 2, 10, 16, 8, 20, 52, 18, 40, 6, 12, 24, 14]
+ncyc_2 = [28, 4, 32, 60, 2, 10, 16, 8, 20, 52, 18, 40, 6, 12, 24, 14, 
22]
 sfrq_2 = 599.8908587*1E6
 time_T2_2 = 0.06
 cpmg_2 = [ncyc/time_T2_2 for ncyc in ncyc_2]
 cpmg_2.sort()
 
 # Test the loop function.
+# First initialize index for the two lists.
+i = -1
+j = -1
 for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
 if frq == sfrq_1:
+i += 1
 self.assertEqual(time, time_T2_1)
+self.assertAlmostEqual(point, cpmg_1[i],3)
 if frq == sfrq_2:
+j += 1
 self.assertEqual(time, time_T2_2)
+self.assertAlmostEqual(point, cpmg_2[j],3)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22222 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-20 Thread tlinnet
Author: tlinnet
Date: Thu Feb 20 18:16:51 2014
New Revision: 2

URL: http://svn.gna.org/viewcvs/relax?rev=2view=rev
Log:
Switched the looping over time points and dispersion points.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=2r1=1r2=2view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Thu Feb 20 18:16:51 2014
@@ -869,10 +869,10 @@
 for frq, mi in loop_frq(return_indices=True):
 # Then loop over the offset data.
 for offset, oi in loop_offset(exp_type=exp_type, frq=frq, 
return_indices=True):
-# Then the dispersion points.
-for point, di in loop_point(exp_type=exp_type, frq=frq, 
offset=offset, return_indices=True):
-# Finally the relaxation times.
-for time, ti in loop_time(return_indices=True):
+# Then the relaxation times.
+for time, ti in loop_time(return_indices=True):
+# Finally the dispersion points.
+for point, di in loop_point(exp_type=exp_type, frq=frq, 
offset=offset, time=time, return_indices=True):
 # Yield the data.
 if return_indices:
 yield exp_type, frq, offset, point, time, ei, mi, 
oi, di, ti


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22256 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 09:13:39 2014
New Revision: 22256

URL: http://svn.gna.org/viewcvs/relax?rev=22256view=rev
Log:
Reverted the ordering of dispersion point and relaxation time.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

The ordering of the dispersion and relaxation time follow a strict pattern as 
explained in: http://thread.gmane.org/gmane.science.nmr.relax.devel/5070.
The looping is done over first the dispersion points, before the time points.

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22256r1=22255r2=22256view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 09:13:39 2014
@@ -870,10 +870,10 @@
 for frq, mi in loop_frq(return_indices=True):
 # Then loop over the offset data.
 for offset, oi in loop_offset(exp_type=exp_type, frq=frq, 
return_indices=True):
-# Then the relaxation times.
-for time, ti in loop_time(return_indices=True):
-# Finally the dispersion points.
-for point, di in loop_point(exp_type=exp_type, frq=frq, 
offset=offset, time=time, return_indices=True):
+# Then the dispersion points.
+for point, di in loop_point(exp_type=exp_type, frq=frq, 
offset=offset, return_indices=True):
+# Finally the relaxation times.
+for time, ti in loop_time(return_indices=True):
 # Yield the data.
 if return_indices:
 yield exp_type, frq, offset, point, time, ei, mi, 
oi, di, ti


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22269 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 10:59:16 2014
New Revision: 22269

URL: http://svn.gna.org/viewcvs/relax?rev=22269view=rev
Log:
Merge branch 'bug'

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22269r1=22268r2=22269view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 10:59:16 2014
@@ -25,7 +25,7 @@
 # relax module imports.
 from data_store import Relax_data_store; ds = Relax_data_store()
 from pipe_control import state
-from specific_analyses.relax_disp.disp_data import loop_exp_frq, 
loop_exp_frq_offset_point_time
+from specific_analyses.relax_disp.disp_data import loop_exp_frq, 
loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time
 from status import Status; status = Status()
 from test_suite.unit_tests.base_classes import UnitTestCase
 
@@ -84,6 +84,115 @@
 
 # Increment the data index.
 index += 1
+
+
+def test_loop_exp_frq_offset(self):
+Unit test of the loop_exp_frq_offset() function.
+
+This uses the data of the saved state attached to U{bug 
#21665https://gna.org/bugs/?21665}.
+
+
+# Load the state.
+statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+state.load_state(statefile, force=True)
+
+# Original data (exp_type, frq, offset).
+data = [
+['SQ CPMG', 499862140.0, 0],
+['SQ CPMG', 599890858.6993, 0]
+]
+
+# Original indices (ei, mi, oi).
+indices = [
+[0, 0, 0],
+[0, 1, 0]
+]
+
+# Check the number of iterations.
+print(Checking the number of iterations of the loop.)
+count = 0
+for exp_type, frq, offset, ei, mi, oi in 
loop_exp_frq_offset(return_indices=True):
+print exp_type, frq, offset, ei, mi, oi
+count += 1
+self.assertEqual(count, 2)
+
+# Check the values.
+print(Checking the values returned by the loop.)
+index = 0
+for exp_type, frq, offset, ei, mi, oi in 
loop_exp_frq_offset(return_indices=True):
+# Check the experiment info.
+self.assertEqual(exp_type, data[index][0])
+self.assertEqual(ei, indices[index][0])
+
+# Check the frequency info.
+self.assertEqual(frq, data[index][1])
+self.assertEqual(mi, indices[index][1])
+
+# Check the offset info.
+self.assertEqual(offset, data[index][2])
+self.assertEqual(oi, indices[index][2])
+
+# Increment the data index.
+index += 1
+
+
+def test_loop_exp_frq_offset_point(self):
+Unit test of the loop_exp_frq_offset_point() function.
+
+This uses the data of the saved state attached to U{bug 
#21665https://gna.org/bugs/?21665}.
+
+
+# Load the state.
+statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+state.load_state(statefile, force=True)
+
+# Original data (exp_type, frq, offset, point).
+data = [
+['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 
300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 
1000.0]],
+['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 
133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 
466.666, 533.333, 666.666, 866.666, 1000.0]]
+]
+
+# Original indices (ei, mi, oi).
+indices = [
+[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16]],
+[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16]]
+]
+
+# Check the number of iterations.
+print(Checking the number of iterations of the loop.)
+count = 0
+for exp_type, frq, offset, point, ei, mi, oi, di in 
loop_exp_frq_offset_point(return_indices=True):
+print exp_type, frq, offset, point, ei, mi, oi, di
+count += 1
+self.assertEqual(count, 34)
+
+# Check the values.
+print(Checking the values returned by the loop.)
+frq_index = 0
+disp_index = 0
+for exp_type, frq, offset, point, ei, mi, oi, di in 
loop_exp_frq_offset_point(return_indices=True):
+# Check the experiment info.
+self.assertEqual(exp_type, data[frq_index][0])
+self.assertEqual(ei, indices[frq_index][0])
+
+# Check

r22279 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 13:59:49 2014
New Revision: 22279

URL: http://svn.gna.org/viewcvs/relax?rev=22279view=rev
Log:
Renamed unit test, to follow previous namings of unit tests.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22279r1=22278r2=22279view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 13:59:49 2014
@@ -195,7 +195,7 @@
 disp_index += 1
 
 
-def test_loop_exp_frq_offset_point_time(self):
+def test_loop_exp_frq_offset_point_time_setup(self):
 U{Bug #21665https://gna.org/bugs/?21665} catch, the failure due 
to a a CPMG analysis recorded at two fields at two delay times, using calc().
 
 # Load the state.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22283 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 14:20:41 2014
New Revision: 22283

URL: http://svn.gna.org/viewcvs/relax?rev=22283view=rev
Log:
Added unit test for looping over: exp, frq, offset, point, time.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

This unit test will fail, since the last loop over the time points has a weak 
assumption just to loop over all time points,
instead of checking for existence of such time point.
This unit test follows recommendation in thread: 
http://thread.gmane.org/gmane.science.nmr.relax.devel/5070.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22283r1=22282r2=22283view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 14:20:41 2014
@@ -186,6 +186,69 @@
 # Check the dispersion point info.
 self.assertAlmostEqual(point, data[frq_index][3][disp_index],2)
 self.assertEqual(di, indices[frq_index][3][disp_index])
+
+# Increment the data index.
+if disp_index == 16:
+frq_index += 1
+disp_index = 0
+else:
+disp_index += 1
+
+
+def test_loop_exp_frq_offset_point_time(self):
+Unit test of the loop_exp_frq_offset_point_time() function.
+
+This uses the data of the saved state attached to U{bug 
#21665https://gna.org/bugs/?21665}.
+
+
+# Load the state.
+statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+state.load_state(statefile, force=True)
+
+# Original data (exp_type, frq, offset, point).
+data = [
+['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 
300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 
1000.0],0.04],
+['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 
133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 
466.666, 533.333, 666.666, 866.666, 1000.0],0.06]
+]
+
+# Original indices (ei, mi, oi).
+indices = [
+[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 0],
+[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 1]
+]
+
+# Check the number of iterations.
+print(Checking the number of iterations of the loop.)
+count = 0
+for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
+print exp_type, frq, offset, point, time, ei, mi, oi, di, ti
+count += 1
+self.assertEqual(count, 34)
+
+# Check the values.
+print(Checking the values returned by the loop.)
+frq_index = 0
+disp_index = 0
+for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
+# Check the experiment info.
+self.assertEqual(exp_type, data[frq_index][0])
+self.assertEqual(ei, indices[frq_index][0])
+
+# Check the frequency info.
+self.assertEqual(frq, data[frq_index][1])
+self.assertEqual(mi, indices[frq_index][1])
+
+# Check the offset info.
+self.assertEqual(offset, data[frq_index][2])
+self.assertEqual(oi, indices[frq_index][2])
+
+# Check the dispersion point info.
+self.assertAlmostEqual(point, data[frq_index][3][disp_index],2)
+self.assertEqual(di, indices[frq_index][3][disp_index])
+
+# Check the time point info.
+self.assertEqual(time, data[frq_index][4])
+self.assertEqual(ti, indices[frq_index][4])
 
 # Increment the data index.
 if disp_index == 16:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22285 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 14:20:45 2014
New Revision: 22285

URL: http://svn.gna.org/viewcvs/relax?rev=22285view=rev
Log:
Replaced print commands to be compatible with Python 3.x

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22285r1=22284r2=22285view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 14:20:45 2014
@@ -66,7 +66,7 @@
 print(Checking the number of iterations of the loop.)
 count = 0
 for exp_type, frq, ei, mi in loop_exp_frq(return_indices=True):
-print exp_type, frq, ei, mi
+print(exp_type, frq, ei, mi)
 count += 1
 self.assertEqual(count, 2)
 
@@ -112,7 +112,7 @@
 print(Checking the number of iterations of the loop.)
 count = 0
 for exp_type, frq, offset, ei, mi, oi in 
loop_exp_frq_offset(return_indices=True):
-print exp_type, frq, offset, ei, mi, oi
+print(exp_type, frq, offset, ei, mi, oi)
 count += 1
 self.assertEqual(count, 2)
 
@@ -162,7 +162,7 @@
 print(Checking the number of iterations of the loop.)
 count = 0
 for exp_type, frq, offset, point, ei, mi, oi, di in 
loop_exp_frq_offset_point(return_indices=True):
-print exp_type, frq, offset, point, ei, mi, oi, di
+print(exp_type, frq, offset, point, ei, mi, oi, di)
 count += 1
 self.assertEqual(count, 34)
 
@@ -221,7 +221,7 @@
 print(Checking the number of iterations of the loop.)
 count = 0
 for exp_type, frq, offset, point, time, ei, mi, oi, di, ti in 
loop_exp_frq_offset_point_time(return_indices=True):
-print exp_type, frq, offset, point, time, ei, mi, oi, di, ti
+print(exp_type, frq, offset, point, time, ei, mi, oi, di, ti)
 count += 1
 self.assertEqual(count, 34)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22284 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 14:20:43 2014
New Revision: 22284

URL: http://svn.gna.org/viewcvs/relax?rev=22284view=rev
Log:
Expanded the loop_time function to optional take the spectrometer frequency as 
input for restricting looping.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22284r1=22283r2=22284view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 14:20:43 2014
@@ -873,7 +873,7 @@
 # Then the dispersion points.
 for point, di in loop_point(exp_type=exp_type, frq=frq, 
offset=offset, return_indices=True):
 # Finally the relaxation times.
-for time, ti in loop_time(return_indices=True):
+for time, ti in loop_time(frq=frq, return_indices=True):
 # Yield the data.
 if return_indices:
 yield exp_type, frq, offset, point, time, ei, mi, 
oi, di, ti
@@ -1281,9 +1281,13 @@
 yield id
 
 
-def loop_time(return_indices=False):
+def loop_time(exp_type=None, frq=None, return_indices=False):
 Generator method for looping over the relaxation times.
 
+@keyword exp_type:  The experiment type.
+@type exp_type: str
+@keyword frq:   The spectrometer frequency in Hz.
+@type frq:  float
 @keyword return_indices:A flag which if True will cause the relaxation 
time index to be returned as well.
 @type return_indices:   bool
 @return:The relaxation time.
@@ -1296,6 +1300,28 @@
 # Loop over the time points.
 if hasattr(cdp, 'relax_time_list'):
 for time in cdp.relax_time_list:
+# Find a matching experiment ID.
+found = False
+for id in cdp.exp_type.keys():
+# Skip non-matching experiments.
+if exp_type != None and cdp.exp_type[id] != exp_type:
+continue
+
+# Skip non-matching spectrometer frequencies.
+if frq != None and hasattr(cdp, 'spectrometer_frq') and 
cdp.spectrometer_frq[id] != frq:
+continue
+
+if time != cdp.relax_times[id]:
+continue
+
+# Found.
+found = True
+break
+
+# No data.
+if not found:
+continue
+
 # Increment the index.
 ti += 1
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22293 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 17:06:36 2014
New Revision: 22293

URL: http://svn.gna.org/viewcvs/relax?rev=22293view=rev
Log:
Added system test for loop_time.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

This system can be extended later for purposes to test the restriction of the 
looping.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22293r1=22292r2=22293view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 17:06:36 2014
@@ -25,7 +25,7 @@
 # relax module imports.
 from data_store import Relax_data_store; ds = Relax_data_store()
 from pipe_control import state
-from specific_analyses.relax_disp.disp_data import loop_exp_frq, 
loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time
+from specific_analyses.relax_disp.disp_data import loop_exp_frq, 
loop_exp_frq_offset, loop_exp_frq_offset_point, loop_exp_frq_offset_point_time, 
loop_time
 from status import Status; status = Status()
 from test_suite.unit_tests.base_classes import UnitTestCase
 
@@ -291,3 +291,38 @@
 j += 1
 self.assertEqual(time, time_T2_2)
 self.assertAlmostEqual(point, cpmg_2[j],3)
+
+
+def test_loop_time(self):
+Unit test of the loop_time() function.
+
+This uses the data of the saved state attached to U{bug 
#21665https://gna.org/bugs/?21665}.
+
+
+# Load the state.
+statefile = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'bug_21665.bz2'
+state.load_state(statefile, force=True)
+
+# Original data (exp_type, frq, offset, point).
+data = [
+['SQ CPMG', 499862140.0, 0, [50.0, 100.0, 150.0, 200.0, 250.0, 
300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 800.0, 900.0, 
1000.0],0.04],
+['SQ CPMG', 599890858.6993, 0, [33., 66.666, 100.0, 
133.333, 166.666, 200.0, 233.333, 266.666, 300.0, 333.333, 366.666, 400.0, 
466.666, 533.333, 666.666, 866.666, 1000.0],0.06]
+]
+
+# Original indices (ei, mi, oi, ti).
+indices = [
+[0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 0],
+[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 0]
+]
+
+# Check the number of iterations.
+print(Checking the number of iterations of the loop.)
+count_frq = 0
+for dat in data:
+frq = dat[1]
+for time, ti in loop_time(frq=frq, return_indices=True):
+print(time, ti)
+count_frq += 1
+self.assertEqual(count_frq, 2)
+
+


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22291 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 17:06:33 2014
New Revision: 22291

URL: http://svn.gna.org/viewcvs/relax?rev=22291view=rev
Log:
Modified unit test to pass.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Implemented as suggested in: 
https://mail.gna.org/public/relax-devel/2014-02/msg00142.html

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22291r1=22290r2=22291view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Mon Feb 24 17:06:33 2014
@@ -214,7 +214,7 @@
 # Original indices (ei, mi, oi).
 indices = [
 [0, 0, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 0],
-[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 1]
+[0, 1, 0, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
16], 0]
 ]
 
 # Check the number of iterations.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22292 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 17:06:35 2014
New Revision: 22292

URL: http://svn.gna.org/viewcvs/relax?rev=22292view=rev
Log:
Expanded the loop_time function to optional take the offset and dispersion 
point as input for restricting looping.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

This is implemented as suggested in: 
https://mail.gna.org/public/relax-devel/2014-02/msg00143.html

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22292r1=22291r2=22292view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 17:06:35 2014
@@ -1281,13 +1281,17 @@
 yield id
 
 
-def loop_time(exp_type=None, frq=None, return_indices=False):
+def loop_time(exp_type=None, frq=None, offset=None, point=None, 
return_indices=False):
 Generator method for looping over the relaxation times.
 
 @keyword exp_type:  The experiment type.
 @type exp_type: str
 @keyword frq:   The spectrometer frequency in Hz.
 @type frq:  float
+@keyword offset:The spin-lock or hard pulse offset value in 
ppm.
+@type offset:   None or float
+@keyword point: The dispersion point data (either the 
spin-lock field strength in Hz or the nu_CPMG frequency in Hz).
+@type point:float
 @keyword return_indices:A flag which if True will cause the relaxation 
time index to be returned as well.
 @type return_indices:   bool
 @return:The relaxation time.
@@ -1310,6 +1314,25 @@
 # Skip non-matching spectrometer frequencies.
 if frq != None and hasattr(cdp, 'spectrometer_frq') and 
cdp.spectrometer_frq[id] != frq:
 continue
+
+# Skip non-matching offsets.
+if offset != None and hasattr(cdp, 'spin_lock_offset') and 
cdp.spin_lock_offset[id] != offset:
+continue
+
+# The dispersion point filter.
+if point != None:
+# No experiment type set.
+if not hasattr(cdp, 'exp_type') or id not in cdp.exp_type:
+continue
+
+# The experiment type.
+exp_type = cdp.exp_type[id]
+
+# The CPMG dispersion data.
+if exp_type in EXP_TYPE_LIST_CPMG:
+# No dispersion point data set.
+if not hasattr(cdp, 'cpmg_frqs') or id not in 
cdp.cpmg_frqs:
+continue
 
 if time != cdp.relax_times[id]:
 continue


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22294 - in /trunk/specific_analyses/relax_disp: api.py disp_data.py

2014-02-24 Thread tlinnet
Author: tlinnet
Date: Mon Feb 24 18:28:11 2014
New Revision: 22294

URL: http://svn.gna.org/viewcvs/relax?rev=22294view=rev
Log:
Replacing looping over time points from cdp.relax_time_list to 
loop_time(frq=frq).

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

loop_time has been modified to accept spectrometer frequency as input to 
restrict the looping.

Modified:
trunk/specific_analyses/relax_disp/api.py
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/api.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=22294r1=22293r2=22294view=diff
==
--- trunk/specific_analyses/relax_disp/api.py (original)
+++ trunk/specific_analyses/relax_disp/api.py Mon Feb 24 18:28:11 2014
@@ -149,7 +149,7 @@
 values = []
 errors = []
 times = []
-for time in cdp.relax_time_list:
+for time in loop_time(frq=frq):
 # The data.
 values.append(average_intensity(spin=spin, exp_type=exp_type, 
frq=frq, offset=offset, point=point, time=time))
 errors.append(average_intensity(spin=spin, exp_type=exp_type, 
frq=frq, offset=offset, point=point, time=time, error=True))
@@ -378,7 +378,7 @@
 values = []
 errors = []
 times = []
-for time in cdp.relax_time_list:
+for time in loop_time(frq=frq):
 values.append(average_intensity(spin=spin, 
exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, 
sim_index=sim_index))
 errors.append(average_intensity(spin=spin, 
exp_type=exp_type, frq=frq, offset=offset, point=point, time=time, error=True))
 times.append(time)
@@ -1373,7 +1373,7 @@
 
 # Generate the data structure to return.
 errors = []
-for time in cdp.relax_time_list:
+for time in loop_time(frq=frq):
 errors.append(average_intensity(spin=spin, exp_type=exp_type, 
frq=frq, offset=offset, point=point, time=time, error=True))
 
 # All other models.
@@ -1597,7 +1597,7 @@
 
 # Loop over each time point.
 ti = 0
-for time in loop_time():
+for time in loop_time(frq=frq):
 # Get the intensity keys.
 int_keys = find_intensity_keys(exp_type=exp_type, frq=frq, 
point=point, time=time)
 

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22294r1=22293r2=22294view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Mon Feb 24 18:28:11 2014
@@ -1930,7 +1930,7 @@
 set_labels.append(Spin %s % id)
 
 # Loop over the relaxation time periods.
-for time in cdp.relax_time_list:
+for time in loop_time(frq=frq):
 # The key.
 keys = find_intensity_keys(exp_type=exp_type, frq=frq, 
point=point, time=time)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22308 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-25 Thread tlinnet
Author: tlinnet
Date: Tue Feb 25 15:05:03 2014
New Revision: 22308

URL: http://svn.gna.org/viewcvs/relax?rev=22308view=rev
Log:
Re-ordered unit tests for test of get_curve_type() and 
has_exponential_exp_type().

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22308r1=22307r2=22308view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Tue Feb 25 15:05:03 2014
@@ -88,15 +88,15 @@
 print(times[exp_type])
 self.assertEqual(len(times[exp_type]), 2)
 
+# Check the return of get_curve_type function.
+curve_type = get_curve_type()
+print(curve_type)
+self.assertEqual(curve_type, 'fixed time')
+
 # Check the return of has_exponential_exp_type.
 exponential_exp_type = has_exponential_exp_type()
 print(exponential_exp_type)
 self.assertEqual(exponential_exp_type, False)
-
-# Check the return of get_curve_type function.
-curve_type = get_curve_type()
-print(curve_type)
-self.assertEqual(curve_type, 'fixed time')
 
 
 def test_loop_exp_frq(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22305 - /trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

2014-02-25 Thread tlinnet
Author: tlinnet
Date: Tue Feb 25 15:04:56 2014
New Revision: 22305

URL: http://svn.gna.org/viewcvs/relax?rev=22305view=rev
Log:
Added test for return of get_curve_type(), to match 'fixed time'.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

Modified:
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py

Modified: 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py?rev=22305r1=22304r2=22305view=diff
==
--- 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
(original)
+++ 
trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_disp_data.py 
Tue Feb 25 15:04:56 2014
@@ -25,7 +25,7 @@
 # relax module imports.
 from data_store import Relax_data_store; ds = Relax_data_store()
 from pipe_control import state
-from specific_analyses.relax_disp.disp_data import count_relax_times, 
loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, 
loop_exp_frq_offset_point_time, loop_time
+from specific_analyses.relax_disp.disp_data import count_relax_times, 
get_curve_type, loop_exp_frq, loop_exp_frq_offset, loop_exp_frq_offset_point, 
loop_exp_frq_offset_point_time, loop_time
 from status import Status; status = Status()
 from test_suite.unit_tests.base_classes import UnitTestCase
 
@@ -80,6 +80,11 @@
 self.assertEqual(frq, data[1][1])
 # Test the time count
 self.assertEqual(count, 1)
+
+# Check the return of get_curve_type function.
+curve_type = get_curve_type()
+print(curve_type)
+self.assertEqual(curve_type, 'fixed time')
 
 
 def test_loop_exp_frq(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r22302 - /trunk/specific_analyses/relax_disp/disp_data.py

2014-02-25 Thread tlinnet
Author: tlinnet
Date: Tue Feb 25 15:04:51 2014
New Revision: 22302

URL: http://svn.gna.org/viewcvs/relax?rev=22302view=rev
Log:
Made count_relax_times() take optional arguments as: exp_type, frq, offset, 
point.

Regarding bug #21665, (https://gna.org/bugs/?21665) - Running a CPMG analysis 
with two fields at two delay times.

This is prepare for re-stricting the looping over time points in the function: 
loop_time()
This is implemented as suggested in: 
http://www.mail-archive.com/relax-devel@gna.org/msg04993.html

Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=22302r1=22301r2=22302view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Tue Feb 25 15:04:51 2014
@@ -182,18 +182,26 @@
 return cdp.spectrometer_frq_count
 
 
-def count_relax_times(ei=None):
+def count_relax_times(exp_type=None, frq=None, offset=None, point=None, 
ei=None):
 Count the number of relaxation times present.
 
-@keyword ei:The experiment type index.
-@type ei:   str
-@return:The relaxation time count for the given experiment.
-@rtype: int
+@keyword exp_type:  The experiment type.
+@type exp_type: str
+@keyword frq:   The spectrometer frequency in Hz.
+@type frq:  float
+@keyword offset:The spin-lock or hard pulse offset value in 
ppm.
+@type offset:   None or float
+@keyword point: The dispersion point data (either the 
spin-lock field strength in Hz or the nu_CPMG frequency in Hz).
+@type point:float
+@keyword ei:The experiment type index.
+@type ei:   str
+@return:The relaxation time count for the given 
experiment.
+@rtype: int
 
 
 # Loop over the times.
 count = 0
-for time in loop_time():
+for time in loop_time(exp_type=exp_type, frq=frq, offset=offset, 
point=point):
 # Find a matching experiment ID.
 found = False
 for id in cdp.exp_type.keys():
@@ -402,7 +410,7 @@
 else:
 # Determine the curve type.
 curve_type = 'exponential'
-if count_relax_times(cdp.exp_type_list.index(cdp.exp_type[id])) == 1:
+if count_relax_times(ei = cdp.exp_type_list.index(cdp.exp_type[id])) 
== 1:
 curve_type = 'fixed time'
 
 # Return the type.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


  1   2   3   4   5   6   7   8   9   10   >