Author: bugman Date: Mon Nov 26 16:02:37 2007 New Revision: 4032 URL: http://svn.gna.org/viewcvs/relax?rev=4032&view=rev Log: Merged revisions 4027-4031 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r4027 | bugman | 2007-11-26 15:54:23 +0100 (Mon, 26 Nov 2007) | 5 lines Removed the empty diff_tensor structure from the PipeContainer. This will be added after its initialisation. ........ r4028 | bugman | 2007-11-26 15:55:56 +0100 (Mon, 26 Nov 2007) | 5 lines Updated the generic_fns.diffusion_tensor.diff_data_exists() function. The diff_tensor object is now tested for. ........ r4029 | bugman | 2007-11-26 15:57:52 +0100 (Mon, 26 Nov 2007) | 5 lines Updated the generic_fns.diffusion_tensor.init() function. The function now adds the DiffTensorData instance as diff_tensor into the PipeContainer. ........ r4030 | bugman | 2007-11-26 15:59:48 +0100 (Mon, 26 Nov 2007) | 5 lines Updated the test_delete() unit test. The diff_tensor object should be removed by the delete() function. ........ r4031 | bugman | 2007-11-26 16:01:21 +0100 (Mon, 26 Nov 2007) | 6 lines Updated the generic_fns.diffusion_tensor.delete() function. The DiffTensorData instance is not set up after deletion anymore. The diff_tensor structure should not exist. ........ Modified: branches/N_state_model/ (props changed) branches/N_state_model/data/pipe_container.py branches/N_state_model/generic_fns/diffusion_tensor.py branches/N_state_model/test_suite/unit_tests/diffusion_tensor_testing_base.py Propchange: branches/N_state_model/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Nov 26 16:02:37 2007 @@ -1,1 +1,1 @@ -/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731,3733-3755,3757-3807,3809-3833,3836-3838,3840-3869,3872-3905,3907-3986,4004,4014-4015,4018-4021 +/1.3:1-3692,3695,3697-3713,3715-3719,3721-3728,3730-3731,3733-3755,3757-3807,3809-3833,3836-3838,3840-3869,3872-3905,3907-3986,4004,4014-4015,4018-4021,4027-4031 Modified: branches/N_state_model/data/pipe_container.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/data/pipe_container.py?rev=4032&r1=4031&r2=4032&view=diff ============================================================================== --- branches/N_state_model/data/pipe_container.py (original) +++ branches/N_state_model/data/pipe_container.py Mon Nov 26 16:02:37 2007 @@ -39,9 +39,6 @@ # Molecular structure data. self.structure = SpecificData() - - # Diffusion data. - self.diff_tensor = DiffTensorData() # The molecule-residue-spin object. self.mol = MoleculeList() Modified: branches/N_state_model/generic_fns/diffusion_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/diffusion_tensor.py?rev=4032&r1=4031&r2=4032&view=diff ============================================================================== --- branches/N_state_model/generic_fns/diffusion_tensor.py (original) +++ branches/N_state_model/generic_fns/diffusion_tensor.py Mon Nov 26 16:02:37 2007 @@ -146,9 +146,6 @@ # Delete the diffusion data. del(relax_data_store[relax_data_store.current_pipe].diff_tensor) - # Put the container back (but empty). - relax_data_store[relax_data_store.current_pipe].diff_tensor = DiffTensorData() - def diff_data_exists(pipe=None): """Function for determining if diffusion data exists in the current data pipe. @@ -163,8 +160,8 @@ if pipe == None: pipe = relax_data_store.current_pipe - # Test if tm exists. - if hasattr(relax_data_store[pipe].diff_tensor, 'tm'): + # Test if the data structure exists. + if hasattr(relax_data_store[pipe], 'diff_tensor'): return True else: return False @@ -539,6 +536,9 @@ valid_types = ['deg', 'rad'] if not angle_units in valid_types: raise RelaxError, "The diffusion tensor 'angle_units' argument " + `angle_units` + " should be either 'deg' or 'rad'." + + # Add the diff_tensor object to the data pipe. + cdp.diff_tensor = DiffTensorData() # Set the fixed flag. cdp.diff_tensor.fixed = fixed Modified: branches/N_state_model/test_suite/unit_tests/diffusion_tensor_testing_base.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/test_suite/unit_tests/diffusion_tensor_testing_base.py?rev=4032&r1=4031&r2=4032&view=diff ============================================================================== --- branches/N_state_model/test_suite/unit_tests/diffusion_tensor_testing_base.py (original) +++ branches/N_state_model/test_suite/unit_tests/diffusion_tensor_testing_base.py Mon Nov 26 16:02:37 2007 @@ -204,14 +204,14 @@ prompt.diffusion_tensor.delete(). """ - # Set the tm value. - relax_data_store['orig'].diff_tensor.tm = 0.0 + # Initialise the tensor. + self.diffusion_tensor_fns.init(params=(8.6, 1.3, 600, -20), time_scale=1e-9, d_scale=1e7, angle_units='deg', param_types=2, spheroid_type='prolate', fixed=0) # Delete the tensor data. self.diffusion_tensor_fns.delete() - # Test that tm does not exist. - self.failIf(hasattr(relax_data_store['orig'].diff_tensor, 'tm')) + # Test that the diff_tensor object does not exist. + self.failIf(hasattr(relax_data_store['orig'], 'diff_tensor')) def test_delete_fail_no_data(self):