Package test_suite :: Package unit_tests :: Package _lib :: Package _dispersion :: Module test_cr72_full_cluster_three_fields :: Class Test_cr72_full_cluster_three_fields
[hide private]
[frames] | no frames]

Class Test_cr72_full_cluster_three_fields

source code


Unit tests for the lib.dispersion.cr72 relax module.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Set up for all unit tests.
source code
 
calc_r2eff(self)
Calculate and check the R2eff values.
source code
lists of numpy float arrays, lists of numpy float arrays, lists of numpy float arrays, numpy rank-2 int array
return_r2eff_arrays(self)
Return numpy arrays of the R2eff/R1rho values and errors.
source code
numpy float array
assemble_param_vector(self, r2=None, r2a=None, r2b=None, dw=None, pA=None, kex=None, spins_params=None)
Assemble the dispersion relaxation dispersion curve fitting parameter vector.
source code
str
loop_parameters(self, spins_params=None)
Generator function for looping of the parameters of the cluster.
source code
 
test_cr72_full_cluster_three_fields_no_rex1(self)
Test the r2eff_cr72() function for no exchange when dw = 0.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex2(self)
Test the r2eff_cr72() function for no exchange when pA = 1.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex3(self)
Test the r2eff_cr72() function for no exchange when kex = 0.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex4(self)
Test the r2eff_cr72() function for no exchange when dw = 0.0 and pA = 1.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex5(self)
Test the r2eff_cr72() function for no exchange when dw = 0.0 and kex = 0.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex6(self)
Test the r2eff_cr72() function for no exchange when pA = 1.0 and kex = 0.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex7(self)
Test the r2eff_cr72() function for no exchange when dw = 0.0, pA = 1.0, and kex = 0.0.
source code
 
test_cr72_full_cluster_three_fields_no_rex8(self)
Test the r2eff_cr72() function for no exchange when kex = 1e7.
source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Set up for all unit tests.

Overrides: unittest.case.TestCase.setUp

return_r2eff_arrays(self)

source code 

Return numpy arrays of the R2eff/R1rho values and errors.

Returns: lists of numpy float arrays, lists of numpy float arrays, lists of numpy float arrays, numpy rank-2 int array
The numpy array structures of the R2eff/R1rho values, errors, missing data, and corresponding Larmor frequencies. For each structure, the first dimension corresponds to the experiment types, the second the spins of a spin block, the third to the spectrometer field strength, and the fourth is the dispersion points. For the Larmor frequency structure, the fourth dimension is omitted. For R1rho-type data, an offset dimension is inserted between the spectrometer field strength and the dispersion points.

assemble_param_vector(self, r2=None, r2a=None, r2b=None, dw=None, pA=None, kex=None, spins_params=None)

source code 

Assemble the dispersion relaxation dispersion curve fitting parameter vector.

Parameters:
  • r2 (float) - The transversal relaxation rate.
  • r2a (float) - The transversal relaxation rate for state A in the absence of exchange.
  • r2b (float) - The transversal relaxation rate for state B in the absence of exchange.
  • dw (float) - The chemical exchange difference between states A and B in ppm.
  • pA (float) - The population of state A.
  • kex (float) - The rate of exchange.
  • spins_params (array of strings) - List of parameter strings used in dispersion model.
Returns: numpy float array
An array of the parameter values of the dispersion relaxation model.

loop_parameters(self, spins_params=None)

source code 

Generator function for looping of the parameters of the cluster.

Parameters:
  • spins_params (array of strings) - List of parameter strings used in dispersion model.
Returns: str
The parameter name.