Package test_suite :: Package unit_tests :: Module value_testing_base
[hide private]
[frames] | no frames]

Source Code for Module test_suite.unit_tests.value_testing_base

   1  ############################################################################### 
   2  #                                                                             # 
   3  # Copyright (C) 2007-2009,2012 Edward d'Auvergne                              # 
   4  # Copyright (C) 2008 Sebastien Morin                                          # 
   5  #                                                                             # 
   6  # This file is part of the program relax (http://www.nmr-relax.com).          # 
   7  #                                                                             # 
   8  # This program is free software: you can redistribute it and/or modify        # 
   9  # it under the terms of the GNU General Public License as published by        # 
  10  # the Free Software Foundation, either version 3 of the License, or           # 
  11  # (at your option) any later version.                                         # 
  12  #                                                                             # 
  13  # This program is distributed in the hope that it will be useful,             # 
  14  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
  15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
  16  # GNU General Public License for more details.                                # 
  17  #                                                                             # 
  18  # You should have received a copy of the GNU General Public License           # 
  19  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
  20  #                                                                             # 
  21  ############################################################################### 
  22   
  23  # Python module imports. 
  24  from math import pi 
  25   
  26  # relax module imports. 
  27  from data_store import Relax_data_store; ds = Relax_data_store() 
  28  from pipe_control import diffusion_tensor, pipes, mol_res_spin 
  29  from lib.errors import RelaxError, RelaxParamSetError, RelaxUnknownParamCombError 
  30  from test_suite.unit_tests.base_classes import UnitTestCase 
  31   
  32   
33 -class Value_base_class(UnitTestCase):
34 """Base class for the tests of both the 'prompt.value' and 'pipe_control.value' modules. 35 36 This base class also contains many shared unit tests. 37 """ 38
39 - def setUp(self):
40 """Set up for all the value unit tests.""" 41 42 # Add a consistency tests data pipe to the data store for testing consistency tests parameters. 43 ds.add(pipe_name='ct', pipe_type='ct') 44 45 # Add a model-free data pipe to the data store for testing model-free and diffusion parameters. 46 ds.add(pipe_name='mf', pipe_type='mf') 47 48 # Add a second model-free data pipe for copying tests. 49 ds.add(pipe_name='mf2', pipe_type='mf') 50 51 # Add a reduced spectral density mapping data pipe to the data store for testing RSDM parameters. 52 ds.add(pipe_name='jw', pipe_type='jw') 53 54 # Add a relaxation dispersion data pipe to the data store for testing the associated parameters. 55 ds.add(pipe_name='relax_disp', pipe_type='relax_disp') 56 57 # Add a relaxation curve fitting data pipe to the data store for testing the associated parameters. 58 ds.add(pipe_name='relax_fit', pipe_type='relax_fit') 59 60 # Add a N-state model data pipe to the data store for testing the associated parameters. 61 ds.add(pipe_name='n_state', pipe_type='N-state') 62 63 # Set up some spins. 64 self.set_up_spins(pipe_name='ct') 65 self.set_up_spins(pipe_name='mf') 66 self.set_up_spins(pipe_name='jw') 67 self.set_up_spins(pipe_name='relax_disp') 68 self.set_up_spins(pipe_name='relax_fit') 69 70 # Set up the N-state model. 71 N = 4 72 ds['n_state'].N = N 73 ds['n_state'].alpha = [0.0] * N 74 ds['n_state'].beta = [0.0] * N 75 ds['n_state'].gamma = [0.0] * N
76 77
78 - def set_up_spins(self, pipe_name=None):
79 """Function for setting up a few spins for the given pipe.""" 80 81 # Alias the pipe. 82 pipe = pipes.get_pipe(pipe_name) 83 84 # Name the first molecule. 85 pipe.mol[0].name = 'Test mol' 86 87 # Create the first residue and add some data to its spin container. 88 pipe.mol[0].res[0].num = 1 89 pipe.mol[0].res[0].name = 'Met' 90 pipe.mol[0].res[0].spin[0].num = 111 91 pipe.mol[0].res[0].spin[0].name = 'NH' 92 93 # Add some more spins. 94 pipe.mol[0].res[0].spin.add_item('Ca', 114) 95 96 # Create a second residue. 97 pipe.mol[0].res.add_item('Trp', 2) 98 pipe.mol[0].res[1].spin[0].num = 112 99 pipe.mol[0].res[1].spin[0].name = 'NH' 100 101 # Update the metadata so that the other pipe_control.mol_res_spin module functions can operate correctly. 102 mol_res_spin.metadata_update(pipe=pipe_name)
103 104 105 106 107 ################################## 108 # Consistency testing parameters # 109 ################################## 110 111
112 - def test_set_ct_all_spins_j0(self):
113 """Set the consistency testing parameter J(0) for all spins. 114 115 The functions tested are both pipe_control.value.set() and prompt.value.set(). 116 """ 117 118 # Set the current data pipe to 'ct'. 119 pipes.switch('ct') 120 121 # Set the parameter. 122 self.value_fns.set(param='j0', val=4.5e-9) 123 124 # Test the parameter. 125 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 4.5e-9) 126 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
127 128
130 """Set the consistency testing parameter F_eta for all spins. 131 132 The functions tested are both pipe_control.value.set() and prompt.value.set(). 133 """ 134 135 # Set the current data pipe to 'ct'. 136 pipes.switch('ct') 137 138 # Set the parameter. 139 self.value_fns.set(param='f_eta', val=2.3e-10) 140 141 # Test the parameter. 142 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 2.3e-10) 143 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 2.3e-10)
144 145
146 - def test_set_ct_all_spins_f_r2(self):
147 """Set the consistency testing parameter F_R2 for all spins. 148 149 The functions tested are both pipe_control.value.set() and prompt.value.set(). 150 """ 151 152 # Set the current data pipe to 'ct'. 153 pipes.switch('ct') 154 155 # Set the parameter. 156 self.value_fns.set(param='f_r2', val=1.7e-12) 157 158 # Test the parameter. 159 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 1.7e-12) 160 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.7e-12)
161 162
163 - def test_set_ct_all_spins_csa(self):
164 """Set the consistency testing CSA parameter for all spins. 165 166 The functions tested are both pipe_control.value.set() and prompt.value.set(). 167 """ 168 169 # Set the current data pipe to 'ct'. 170 pipes.switch('ct') 171 172 # Set the parameter. 173 self.value_fns.set(param='csa', val=-160e-6) 174 175 # Test the parameter. 176 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -160e-6) 177 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
178 179
181 """Set the consistency testing theta angle for all spins. 182 183 The functions tested are both pipe_control.value.set() and prompt.value.set(). 184 """ 185 186 # Set the current data pipe to 'ct'. 187 pipes.switch('ct') 188 189 # Set the parameter. 190 self.value_fns.set(param='orientation', val=17) 191 192 # Test the parameter. 193 self.assertEqual(cdp.mol[0].res[0].spin[0].orientation, 17) 194 self.assertEqual(cdp.mol[0].res[1].spin[0].orientation, 17)
195 196
197 - def test_set_ct_all_spins_tc(self):
198 """Set the consistency testing approximate correlation time for all spins. 199 200 The functions tested are both pipe_control.value.set() and prompt.value.set(). 201 """ 202 203 # Set the current data pipe to 'ct'. 204 pipes.switch('ct') 205 206 # Set the parameter. 207 self.value_fns.set(param='tc', val=10) 208 209 # Test the parameter. 210 self.assertEqual(cdp.mol[0].res[0].spin[0].tc, 10) 211 self.assertEqual(cdp.mol[0].res[1].spin[0].tc, 10)
212 213
215 """Set different consistency tests parameters J(0), F_eta, F_R2 for all spins. 216 217 The functions tested are both pipe_control.value.set() and prompt.value.set(). 218 """ 219 220 # Set the current data pipe to 'ct'. 221 pipes.switch('ct') 222 223 # Set the parameter. 224 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=[6.4e-9, 3.5e-10, 2.3e-12]) 225 226 # Test the parameter. 227 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 6.4e-9) 228 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 3.5e-10) 229 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 2.3e-12) 230 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9) 231 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 3.5e-10) 232 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 2.3e-12)
233 234
236 """Set consistency tests parameters J(0), F_eta, F_R2 for all spins to the same value. 237 238 The functions tested are both pipe_control.value.set() and prompt.value.set(). 239 """ 240 241 # Set the current data pipe to 'ct'. 242 pipes.switch('ct') 243 244 # Set the parameter. 245 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10) 246 247 # Test the parameter. 248 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 1.9e-10) 249 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 1.9e-10) 250 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 1.9e-10) 251 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10) 252 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 1.9e-10) 253 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.9e-10)
254 255
256 - def test_set_ct_defaults_j0(self):
257 """Set the consistency testing parameter J(0) to the default value (there is none!). 258 259 The functions tested are both pipe_control.value.set() and prompt.value.set(). 260 """ 261 262 # Set the current data pipe to 'ct'. 263 pipes.switch('ct') 264 265 # Set the parameter. 266 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
267 268
269 - def test_set_ct_defaults_f_eta(self):
270 """Set the consistency tests parameter F_eta to the default value (there is none!). 271 272 The functions tested are both pipe_control.value.set() and prompt.value.set(). 273 """ 274 275 # Set the current data pipe to 'ct'. 276 pipes.switch('ct') 277 278 # Set the parameter. 279 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_eta')
280 281
282 - def test_set_ct_defaults_f_r2(self):
283 """Set the consistency tests parameter F_R2 to the default value (there is none!). 284 285 The functions tested are both pipe_control.value.set() and prompt.value.set(). 286 """ 287 288 # Set the current data pipe to 'ct'. 289 pipes.switch('ct') 290 291 # Set the parameter. 292 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_r2')
293 294
295 - def test_set_ct_defaults_csa(self):
296 """Set the consistency testing CSA parameter to the default value. 297 298 The functions tested are both pipe_control.value.set() and prompt.value.set(). 299 """ 300 301 # Set the current data pipe to 'ct'. 302 pipes.switch('ct') 303 304 # Set the parameter. 305 self.value_fns.set(param='csa') 306 307 # Test the parameter. 308 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6) 309 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
310 311
313 """Set the consistency testing theta angle parameter to the default value. 314 315 The functions tested are both pipe_control.value.set() and prompt.value.set(). 316 """ 317 318 # Set the current data pipe to 'ct'. 319 pipes.switch('ct') 320 321 # Set the parameter. 322 self.value_fns.set(param='orientation') 323 324 # Test the parameter. 325 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].orientation, 15.7) 326 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].orientation, 15.7)
327 328
329 - def test_set_ct_defaults_tc(self):
330 """Set the consistency testing approximate correlation time parameter to the default value. 331 332 The functions tested are both pipe_control.value.set() and prompt.value.set(). 333 """ 334 335 # Set the current data pipe to 'ct'. 336 pipes.switch('ct') 337 338 # Set the parameter. 339 self.value_fns.set(param='tc') 340 341 # Test the parameter. 342 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].tc, 13 * 1e-9) 343 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].tc, 13 * 1e-9)
344 345
347 """Set different consistency testing parameters J(0), F_eta, F_R2 to the default values (there are none!). 348 349 The functions tested are both pipe_control.value.set() and prompt.value.set(). 350 """ 351 352 # Set the current data pipe to 'ct'. 353 pipes.switch('ct') 354 355 # Set the parameter. 356 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'f_eta', 'f_r2'])
357 358
359 - def test_set_ct_single_spin_j0(self):
360 """Set the consistency tests parameter J(0) for a single spin. 361 362 The functions tested are both pipe_control.value.set() and prompt.value.set(). 363 """ 364 365 # Set the current data pipe to 'ct'. 366 pipes.switch('ct') 367 368 # Set the parameter. 369 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112') 370 371 # Test the parameter. 372 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 373 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
374 375
377 """Set the consistency tests parameter F_eta for a single spin. 378 379 The functions tested are both pipe_control.value.set() and prompt.value.set(). 380 """ 381 382 # Set the current data pipe to 'ct'. 383 pipes.switch('ct') 384 385 # Set the parameter. 386 self.value_fns.set(param='f_eta', val=2.3e-10, spin_id='@112') 387 388 # Test the parameter. 389 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta')) 390 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 2.3e-10)
391 392
394 """Set the consistency tests parameter F_R2 for a single spin. 395 396 The functions tested are both pipe_control.value.set() and prompt.value.set(). 397 """ 398 399 # Set the current data pipe to 'ct'. 400 pipes.switch('ct') 401 402 # Set the parameter. 403 self.value_fns.set(param='f_r2', val=1.7e-12, spin_id='@112') 404 405 # Test the parameter. 406 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2')) 407 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.7e-12)
408 409
411 """Set the consistency tests CSA parameter for a single spin. 412 413 The functions tested are both pipe_control.value.set() and prompt.value.set(). 414 """ 415 416 # Set the current data pipe to 'ct'. 417 pipes.switch('ct') 418 419 # Set the parameter. 420 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112') 421 422 # Test the parameter. 423 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa')) 424 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
425 426
428 """Set the consistency tests theta angle parameter for a single spin. 429 430 The functions tested are both pipe_control.value.set() and prompt.value.set(). 431 """ 432 433 # Set the current data pipe to 'ct'. 434 pipes.switch('ct') 435 436 # Set the parameter. 437 self.value_fns.set(param='orientation', val=17, spin_id='@112') 438 439 # Test the parameter. 440 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'orientation')) 441 self.assertEqual(cdp.mol[0].res[1].spin[0].orientation, 17)
442 443
444 - def test_set_ct_single_spin_tc(self):
445 """Set the consistency tests approximate correlation time parameter for a single spin. 446 447 The functions tested are both pipe_control.value.set() and prompt.value.set(). 448 """ 449 450 # Set the current data pipe to 'ct'. 451 pipes.switch('ct') 452 453 # Set the parameter. 454 self.value_fns.set(param='tc', val=10, spin_id='@112') 455 456 # Test the parameter. 457 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'tc')) 458 self.assertEqual(cdp.mol[0].res[1].spin[0].tc, 10)
459 460
462 """Set different consistency tests parameters J(0), F_eta, F_R2 for a single spin. 463 464 The functions tested are both pipe_control.value.set() and prompt.value.set(). 465 """ 466 467 # Set the current data pipe to 'ct'. 468 pipes.switch('ct') 469 470 # Set the parameter. 471 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=[6.4e-9, 3.5e-10, 2.3e-12], spin_id='@112') 472 473 # Test the parameter. 474 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 475 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta')) 476 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2')) 477 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9) 478 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 3.5e-10) 479 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 2.3e-12)
480 481
483 """Set consistency tests parameters J(0), F_eta, F_R2 for a single spin to the same value. 484 485 The functions tested are both pipe_control.value.set() and prompt.value.set(). 486 """ 487 488 # Set the current data pipe to 'ct'. 489 pipes.switch('ct') 490 491 # Set the parameter. 492 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10, spin_id='@112') 493 494 # Test the parameter. 495 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 496 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta')) 497 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2')) 498 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10) 499 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 1.9e-10) 500 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.9e-10)
501 502 503 504 505 ##################################################### 506 # Diffusion tensor parameters (Model-free analysis) # 507 ##################################################### 508 509
511 """Set the spherical diffusion tensor tm parameter to the default value. 512 513 The functions tested are both pipe_control.value.set() and prompt.value.set(). 514 """ 515 516 # Set the current data pipe to 'mf'. 517 pipes.switch('mf') 518 519 # Initialise a diffusion tensor. 520 diffusion_tensor.init(1e-9) 521 522 # Set the parameter. 523 self.value_fns.set(param='tm') 524 525 # Test the parameter. 526 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
527 528
530 """Set the spherical diffusion tensor Diso parameter to the default value. 531 532 The functions tested are both pipe_control.value.set() and prompt.value.set(). 533 """ 534 535 # Set the current data pipe to 'mf'. 536 pipes.switch('mf') 537 538 # Initialise a diffusion tensor. 539 diffusion_tensor.init(1e-9) 540 541 # Set the parameter. 542 self.value_fns.set(param='Diso') 543 544 # Test the parameter. 545 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7)
546 547
549 """Try to set the spherical diffusion tensor Da parameter to the default value. 550 551 The functions tested are both pipe_control.value.set() and prompt.value.set(). 552 """ 553 554 # Set the current data pipe to 'mf'. 555 pipes.switch('mf') 556 557 # Initialise a diffusion tensor. 558 diffusion_tensor.init(1e-9) 559 560 # Set the parameter. 561 self.assertRaises(RelaxError, self.value_fns.set, param='Da')
562 563
565 """Try to set the spherical diffusion tensor Dr parameter to the default value. 566 567 The functions tested are both pipe_control.value.set() and prompt.value.set(). 568 """ 569 570 # Set the current data pipe to 'mf'. 571 pipes.switch('mf') 572 573 # Initialise a diffusion tensor. 574 diffusion_tensor.init(1e-9) 575 576 # Set the parameter. 577 self.assertRaises(RelaxError, self.value_fns.set, param='Dr')
578 579
581 """Try to set the spherical diffusion tensor Dx parameter to the default value. 582 583 The functions tested are both pipe_control.value.set() and prompt.value.set(). 584 """ 585 586 # Set the current data pipe to 'mf'. 587 pipes.switch('mf') 588 589 # Initialise a diffusion tensor. 590 diffusion_tensor.init(1e-9) 591 592 # Set the parameter. 593 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
594 595
597 """Try to set the spherical diffusion tensor Dy parameter to the default value. 598 599 The functions tested are both pipe_control.value.set() and prompt.value.set(). 600 """ 601 602 # Set the current data pipe to 'mf'. 603 pipes.switch('mf') 604 605 # Initialise a diffusion tensor. 606 diffusion_tensor.init(1e-9) 607 608 # Set the parameter. 609 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
610 611
613 """Try to set the spherical diffusion tensor Dz parameter to the default value. 614 615 The functions tested are both pipe_control.value.set() and prompt.value.set(). 616 """ 617 618 # Set the current data pipe to 'mf'. 619 pipes.switch('mf') 620 621 # Initialise a diffusion tensor. 622 diffusion_tensor.init(1e-9) 623 624 # Set the parameter. 625 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
626 627
629 """Try to set the spherical diffusion tensor Dpar parameter to the default value. 630 631 The functions tested are both pipe_control.value.set() and prompt.value.set(). 632 """ 633 634 # Set the current data pipe to 'mf'. 635 pipes.switch('mf') 636 637 # Initialise a diffusion tensor. 638 diffusion_tensor.init(1e-9) 639 640 # Set the parameter. 641 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
642 643
645 """Try to set the spherical diffusion tensor Dper parameter to the default value. 646 647 The functions tested are both pipe_control.value.set() and prompt.value.set(). 648 """ 649 650 # Set the current data pipe to 'mf'. 651 pipes.switch('mf') 652 653 # Initialise a diffusion tensor. 654 diffusion_tensor.init(1e-9) 655 656 # Set the parameter. 657 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
658 659
661 """Try to set the spherical diffusion tensor Dratio parameter to the default value. 662 663 The functions tested are both pipe_control.value.set() and prompt.value.set(). 664 """ 665 666 # Set the current data pipe to 'mf'. 667 pipes.switch('mf') 668 669 # Initialise a diffusion tensor. 670 diffusion_tensor.init(1e-9) 671 672 # Set the parameter. 673 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio')
674 675
677 """Try to set the spherical diffusion tensor alpha parameter to the default value. 678 679 The functions tested are both pipe_control.value.set() and prompt.value.set(). 680 """ 681 682 # Set the current data pipe to 'mf'. 683 pipes.switch('mf') 684 685 # Initialise a diffusion tensor. 686 diffusion_tensor.init(1e-9) 687 688 # Set the parameter. 689 self.assertRaises(RelaxError, self.value_fns.set, param='alpha')
690 691
693 """Try to set the spherical diffusion tensor beta parameter to the default value. 694 695 The functions tested are both pipe_control.value.set() and prompt.value.set(). 696 """ 697 698 # Set the current data pipe to 'mf'. 699 pipes.switch('mf') 700 701 # Initialise a diffusion tensor. 702 diffusion_tensor.init(1e-9) 703 704 # Set the parameter. 705 self.assertRaises(RelaxError, self.value_fns.set, param='beta')
706 707
709 """Try to set the spherical diffusion tensor gamma parameter to the default value. 710 711 The functions tested are both pipe_control.value.set() and prompt.value.set(). 712 """ 713 714 # Set the current data pipe to 'mf'. 715 pipes.switch('mf') 716 717 # Initialise a diffusion tensor. 718 diffusion_tensor.init(1e-9) 719 720 # Set the parameter. 721 self.assertRaises(RelaxError, self.value_fns.set, param='gamma')
722 723
725 """Try to set the spherical diffusion tensor theta parameter to the default value. 726 727 The functions tested are both pipe_control.value.set() and prompt.value.set(). 728 """ 729 730 # Set the current data pipe to 'mf'. 731 pipes.switch('mf') 732 733 # Initialise a diffusion tensor. 734 diffusion_tensor.init(1e-9) 735 736 # Set the parameter. 737 self.assertRaises(RelaxError, self.value_fns.set, param='theta')
738 739
741 """Try to set the spherical diffusion tensor phi parameter to the default value. 742 743 The functions tested are both pipe_control.value.set() and prompt.value.set(). 744 """ 745 746 # Set the current data pipe to 'mf'. 747 pipes.switch('mf') 748 749 # Initialise a diffusion tensor. 750 diffusion_tensor.init(1e-9) 751 752 # Set the parameter. 753 self.assertRaises(RelaxError, self.value_fns.set, param='phi')
754 755
757 """Set the spheroidal diffusion tensor tm parameter to the default value. 758 759 The functions tested are both pipe_control.value.set() and prompt.value.set(). 760 """ 761 762 # Set the current data pipe to 'mf'. 763 pipes.switch('mf') 764 765 # Initialise a diffusion tensor. 766 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 767 768 # Set the parameter. 769 self.value_fns.set(param='tm') 770 771 # Test the parameter. 772 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
773 774
776 """Set the spheroidal diffusion tensor Diso parameter to the default value. 777 778 The functions tested are both pipe_control.value.set() and prompt.value.set(). 779 """ 780 781 # Set the current data pipe to 'mf'. 782 pipes.switch('mf') 783 784 # Initialise a diffusion tensor. 785 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 786 787 # Set the parameter. 788 self.value_fns.set(param='Diso') 789 790 # Test the parameter. 791 self.assertEqual(cdp.diff_tensor.tm, 1./(6*1.666e7))
792 793
795 """Set the spheroidal diffusion tensor Da parameter to the default value. 796 797 The functions tested are both pipe_control.value.set() and prompt.value.set(). 798 """ 799 800 # Set the current data pipe to 'mf'. 801 pipes.switch('mf') 802 803 # Initialise a diffusion tensor. 804 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 805 806 # Set the parameter. 807 self.value_fns.set(param='Da') 808 809 # Test the parameter. 810 self.assertEqual(cdp.diff_tensor.Da, 0.0)
811 812
814 """Set the spheroidal diffusion tensor Dr parameter to the default value. 815 816 The functions tested are both pipe_control.value.set() and prompt.value.set(). 817 """ 818 819 # Set the current data pipe to 'mf'. 820 pipes.switch('mf') 821 822 # Initialise a diffusion tensor. 823 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 824 825 # Set the parameter. 826 self.assertRaises(RelaxError, self.value_fns.set, param='Dr')
827 828
830 """Set the spheroidal diffusion tensor Dx parameter to the default value. 831 832 The functions tested are both pipe_control.value.set() and prompt.value.set(). 833 """ 834 835 # Set the current data pipe to 'mf'. 836 pipes.switch('mf') 837 838 # Initialise a diffusion tensor. 839 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 840 841 # Set the parameter. 842 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
843 844
846 """Set the spheroidal diffusion tensor Dy parameter to the default value. 847 848 The functions tested are both pipe_control.value.set() and prompt.value.set(). 849 """ 850 851 # Set the current data pipe to 'mf'. 852 pipes.switch('mf') 853 854 # Initialise a diffusion tensor. 855 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 856 857 # Set the parameter. 858 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
859 860
862 """Set the spheroidal diffusion tensor Dz parameter to the default value. 863 864 The functions tested are both pipe_control.value.set() and prompt.value.set(). 865 """ 866 867 # Set the current data pipe to 'mf'. 868 pipes.switch('mf') 869 870 # Initialise a diffusion tensor. 871 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 872 873 # Set the parameter. 874 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
875 876
878 """Try to set the spheroidal diffusion tensor Dpar parameter to the default value (this should not be possible). 879 880 The functions tested are both pipe_control.value.set() and prompt.value.set(). 881 """ 882 883 # Set the current data pipe to 'mf'. 884 pipes.switch('mf') 885 886 # Initialise a diffusion tensor. 887 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 888 889 # Set the parameter. 890 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
891 892
894 """Try to set the spheroidal diffusion tensor Dper parameter to the default value (this should not be possible). 895 896 The functions tested are both pipe_control.value.set() and prompt.value.set(). 897 """ 898 899 # Set the current data pipe to 'mf'. 900 pipes.switch('mf') 901 902 # Initialise a diffusion tensor. 903 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 904 905 # Set the parameter. 906 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
907 908
910 """Set the spheroidal diffusion tensor Dratio parameter to the default value. 911 912 The functions tested are both pipe_control.value.set() and prompt.value.set(). 913 """ 914 915 # Set the current data pipe to 'mf'. 916 pipes.switch('mf') 917 918 # Initialise a diffusion tensor. 919 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 920 921 # Set the parameter. 922 self.value_fns.set(param='Dratio') 923 924 # Test the parameter. 925 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
926 927
929 """Try to set the spheroidal diffusion tensor alpha parameter to the default value. 930 931 The functions tested are both pipe_control.value.set() and prompt.value.set(). 932 """ 933 934 # Set the current data pipe to 'mf'. 935 pipes.switch('mf') 936 937 # Initialise a diffusion tensor. 938 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 939 940 # Set the parameter. 941 self.assertRaises(RelaxError, self.value_fns.set, param='alpha')
942 943
945 """Try to set the spheroidal diffusion tensor beta parameter to the default value. 946 947 The functions tested are both pipe_control.value.set() and prompt.value.set(). 948 """ 949 950 # Set the current data pipe to 'mf'. 951 pipes.switch('mf') 952 953 # Initialise a diffusion tensor. 954 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 955 956 # Set the parameter. 957 self.assertRaises(RelaxError, self.value_fns.set, param='beta')
958 959
961 """Try to set the spheroidal diffusion tensor gamma parameter to the default value. 962 963 The functions tested are both pipe_control.value.set() and prompt.value.set(). 964 """ 965 966 # Set the current data pipe to 'mf'. 967 pipes.switch('mf') 968 969 # Initialise a diffusion tensor. 970 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 971 972 # Set the parameter. 973 self.assertRaises(RelaxError, self.value_fns.set, param='gamma')
974 975
977 """Set the spheroidal diffusion tensor theta parameter to the default value. 978 979 The functions tested are both pipe_control.value.set() and prompt.value.set(). 980 """ 981 982 # Set the current data pipe to 'mf'. 983 pipes.switch('mf') 984 985 # Initialise a diffusion tensor. 986 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 987 988 # Set the parameter. 989 self.value_fns.set(param='theta') 990 991 # Test the parameter. 992 self.assertEqual(cdp.diff_tensor.theta, 0.0)
993 994
996 """Set the spheroidal diffusion tensor phi parameter to the default value. 997 998 The functions tested are both pipe_control.value.set() and prompt.value.set(). 999 """ 1000 1001 # Set the current data pipe to 'mf'. 1002 pipes.switch('mf') 1003 1004 # Initialise a diffusion tensor. 1005 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1006 1007 # Set the parameter. 1008 self.value_fns.set(param='phi') 1009 1010 # Test the parameter. 1011 self.assertEqual(cdp.diff_tensor.phi, 0.0)
1012 1013
1015 """Set the spheroidal diffusion tensor parameters {tm, Da} to the default values. 1016 1017 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1018 """ 1019 1020 # Set the current data pipe to 'mf'. 1021 pipes.switch('mf') 1022 1023 # Initialise a diffusion tensor. 1024 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1025 1026 # Set the parameters. 1027 self.value_fns.set(param=['tm', 'Da']) 1028 1029 # Test the parameter. 1030 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 1031 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1032 1033
1035 """Set the spheroidal diffusion tensor parameters {Diso, Da} to the default values. 1036 1037 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1038 """ 1039 1040 # Set the current data pipe to 'mf'. 1041 pipes.switch('mf') 1042 1043 # Initialise a diffusion tensor. 1044 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1045 1046 # Set the parameters. 1047 self.value_fns.set(param=['Diso', 'Da']) 1048 1049 # Test the parameter. 1050 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7) 1051 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1052 1053
1055 """Set the spheroidal diffusion tensor parameters {tm, Dratio} to the default values. 1056 1057 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1058 """ 1059 1060 # Set the current data pipe to 'mf'. 1061 pipes.switch('mf') 1062 1063 # Initialise a diffusion tensor. 1064 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1065 1066 # Set the parameters. 1067 self.value_fns.set(param=['tm', 'Dratio']) 1068 1069 # Test the parameter. 1070 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 1071 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
1072 1073
1075 """Set the spheroidal diffusion tensor parameters {Dpar, Dper} to the default values. 1076 1077 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1078 """ 1079 1080 # Set the current data pipe to 'mf'. 1081 pipes.switch('mf') 1082 1083 # Initialise a diffusion tensor. 1084 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1085 1086 # Set the parameters. 1087 self.value_fns.set(param=['Dpar', 'Dper']) 1088 1089 # Test the parameter. 1090 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1.666e7) 1091 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1.666e7)
1092 1093
1095 """Set the spheroidal diffusion tensor parameters {Dper, Dpar} to the default values. 1096 1097 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1098 """ 1099 1100 # Set the current data pipe to 'mf'. 1101 pipes.switch('mf') 1102 1103 # Initialise a diffusion tensor. 1104 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1105 1106 # Set the parameters. 1107 self.value_fns.set(param=['Dper', 'Dpar']) 1108 1109 # Test the parameter. 1110 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1.666e7) 1111 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1.666e7)
1112 1113
1115 """Set the spheroidal diffusion tensor parameters {Diso, Dratio} to the default values. 1116 1117 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1118 """ 1119 1120 # Set the current data pipe to 'mf'. 1121 pipes.switch('mf') 1122 1123 # Initialise a diffusion tensor. 1124 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1125 1126 # Set the parameters. 1127 self.value_fns.set(param=['Diso', 'Dratio']) 1128 1129 # Test the parameter. 1130 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7) 1131 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
1132 1133
1135 """Set the spheroidal diffusion tensor parameters {Dpar, Dratio} to the default values (this should not be possible). 1136 1137 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1138 """ 1139 1140 # Set the current data pipe to 'mf'. 1141 pipes.switch('mf') 1142 1143 # Initialise a diffusion tensor. 1144 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1145 1146 # Set the parameters. 1147 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['Dpar', 'Dratio'])
1148 1149
1151 """Set the ellipsoidal diffusion tensor tm parameter to the default value. 1152 1153 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1154 """ 1155 1156 # Set the current data pipe to 'mf'. 1157 pipes.switch('mf') 1158 1159 # Initialise a diffusion tensor. 1160 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1161 1162 # Set the parameter. 1163 self.value_fns.set(param='tm') 1164 1165 # Test the parameter. 1166 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1167 1168
1170 """Set the ellipsoidal diffusion tensor Diso parameter to the default value. 1171 1172 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1173 """ 1174 1175 # Set the current data pipe to 'mf'. 1176 pipes.switch('mf') 1177 1178 # Initialise a diffusion tensor. 1179 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1180 1181 # Set the parameter. 1182 self.value_fns.set(param='Diso') 1183 1184 # Test the parameter. 1185 self.assertEqual(cdp.diff_tensor.tm, 1./(6*1.666e7))
1186 1187
1189 """Set the ellipsoidal diffusion tensor Da parameter to the default value. 1190 1191 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1192 """ 1193 1194 # Set the current data pipe to 'mf'. 1195 pipes.switch('mf') 1196 1197 # Initialise a diffusion tensor. 1198 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1199 1200 # Set the parameter. 1201 self.value_fns.set(param='Da') 1202 1203 # Test the parameter. 1204 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1205 1206
1208 """Set the ellipsoidal diffusion tensor Dr parameter to the default value. 1209 1210 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1211 """ 1212 1213 # Set the current data pipe to 'mf'. 1214 pipes.switch('mf') 1215 1216 # Initialise a diffusion tensor. 1217 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1218 1219 # Set the parameter. 1220 self.value_fns.set(param='Dr') 1221 1222 # Test the parameter. 1223 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1224 1225
1227 """Set the ellipsoidal diffusion tensor Dx parameter to the default value. 1228 1229 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1230 """ 1231 1232 # Set the current data pipe to 'mf'. 1233 pipes.switch('mf') 1234 1235 # Initialise a diffusion tensor. 1236 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1237 1238 # Set the parameter. 1239 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
1240 1241
1243 """Set the ellipsoidal diffusion tensor Dy parameter to the default value. 1244 1245 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1246 """ 1247 1248 # Set the current data pipe to 'mf'. 1249 pipes.switch('mf') 1250 1251 # Initialise a diffusion tensor. 1252 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1253 1254 # Set the parameter. 1255 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
1256 1257
1259 """Set the ellipsoidal diffusion tensor Dz parameter to the default value. 1260 1261 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1262 """ 1263 1264 # Set the current data pipe to 'mf'. 1265 pipes.switch('mf') 1266 1267 # Initialise a diffusion tensor. 1268 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1269 1270 # Set the parameter. 1271 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
1272 1273
1275 """Try to set the ellipsoidal diffusion tensor Dpar parameter to the default value (this should not be possible). 1276 1277 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1278 """ 1279 1280 # Set the current data pipe to 'mf'. 1281 pipes.switch('mf') 1282 1283 # Initialise a diffusion tensor. 1284 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1285 1286 # Set the parameter. 1287 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
1288 1289
1291 """Try to set the ellipsoidal diffusion tensor Dper parameter to the default value (this should not be possible). 1292 1293 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1294 """ 1295 1296 # Set the current data pipe to 'mf'. 1297 pipes.switch('mf') 1298 1299 # Initialise a diffusion tensor. 1300 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1301 1302 # Set the parameter. 1303 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
1304 1305
1307 """Set the ellipsoidal diffusion tensor Dratio parameter to the default value. 1308 1309 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1310 """ 1311 1312 # Set the current data pipe to 'mf'. 1313 pipes.switch('mf') 1314 1315 # Initialise a diffusion tensor. 1316 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1317 1318 # Set the parameter. 1319 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio')
1320 1321
1323 """Try to set the ellipsoidal diffusion tensor alpha parameter to the default value. 1324 1325 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1326 """ 1327 1328 # Set the current data pipe to 'mf'. 1329 pipes.switch('mf') 1330 1331 # Initialise a diffusion tensor. 1332 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1333 1334 # Set the parameter. 1335 self.value_fns.set(param='alpha') 1336 1337 # Test the parameter. 1338 self.assertEqual(cdp.diff_tensor.alpha, 0.0)
1339 1340
1342 """Try to set the ellipsoidal diffusion tensor beta parameter to the default value. 1343 1344 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1345 """ 1346 1347 # Set the current data pipe to 'mf'. 1348 pipes.switch('mf') 1349 1350 # Initialise a diffusion tensor. 1351 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1352 1353 # Set the parameter. 1354 self.value_fns.set(param='beta') 1355 1356 # Test the parameter. 1357 self.assertEqual(cdp.diff_tensor.beta, 0.0)
1358 1359
1361 """Try to set the ellipsoidal diffusion tensor gamma parameter to the default value. 1362 1363 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1364 """ 1365 1366 # Set the current data pipe to 'mf'. 1367 pipes.switch('mf') 1368 1369 # Initialise a diffusion tensor. 1370 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1371 1372 # Set the parameter. 1373 self.value_fns.set(param='gamma') 1374 1375 # Test the parameter. 1376 self.assertEqual(cdp.diff_tensor.gamma, 0.0)
1377 1378
1380 """Set the ellipsoidal diffusion tensor theta parameter to the default value. 1381 1382 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1383 """ 1384 1385 # Set the current data pipe to 'mf'. 1386 pipes.switch('mf') 1387 1388 # Initialise a diffusion tensor. 1389 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1390 1391 # Set the parameter. 1392 self.assertRaises(RelaxError, self.value_fns.set, param='theta')
1393 1394
1396 """Set the ellipsoidal diffusion tensor phi parameter to the default value. 1397 1398 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1399 """ 1400 1401 # Set the current data pipe to 'mf'. 1402 pipes.switch('mf') 1403 1404 # Initialise a diffusion tensor. 1405 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 1406 1407 # Set the parameter. 1408 self.assertRaises(RelaxError, self.value_fns.set, param='phi')
1409 1410
1412 """Set the ellipsoidal diffusion tensor parameters {tm, Da, Dr} to the default values. 1413 1414 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1415 """ 1416 1417 # Set the current data pipe to 'mf'. 1418 pipes.switch('mf') 1419 1420 # Initialise a diffusion tensor. 1421 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 1422 1423 # Set the parameters. 1424 self.value_fns.set(param=['tm', 'Da', 'Dr']) 1425 1426 # Test the parameters. 1427 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 1428 self.assertEqual(cdp.diff_tensor.Da, 0.0) 1429 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1430 1431
1433 """Set the ellipsoidal diffusion tensor parameters {Diso, Da, Dr} to the default values. 1434 1435 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1436 """ 1437 1438 # Set the current data pipe to 'mf'. 1439 pipes.switch('mf') 1440 1441 # Initialise a diffusion tensor. 1442 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 1443 1444 # Set the parameters. 1445 self.value_fns.set(param=['Diso', 'Da', 'Dr']) 1446 1447 # Test the parameters. 1448 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7) 1449 self.assertEqual(cdp.diff_tensor.Da, 0.0) 1450 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1451 1452
1454 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz} to the default values. 1455 1456 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1457 """ 1458 1459 # Set the current data pipe to 'mf'. 1460 pipes.switch('mf') 1461 1462 # Initialise a diffusion tensor. 1463 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 1464 1465 # Set the parameters. 1466 self.value_fns.set(param=['Dx', 'Dy', 'Dz']) 1467 1468 # Test the parameters. 1469 self.assertAlmostEqual(cdp.diff_tensor.Dx, 1.666e7) 1470 self.assertAlmostEqual(cdp.diff_tensor.Dy, 1.666e7) 1471 self.assertAlmostEqual(cdp.diff_tensor.Dz, 1.666e7)
1472 1473
1475 """Try to set the ellipsoidal diffusion tensor parameters {tm, Diso, Dr} to the default values (this should not be possible). 1476 1477 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1478 """ 1479 1480 # Set the current data pipe to 'mf'. 1481 pipes.switch('mf') 1482 1483 # Initialise a diffusion tensor. 1484 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 1485 1486 # Set the parameters. 1487 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['tm', 'Diso', 'Dr'])
1488 1489
1491 """Set the spherical diffusion tensor tm parameter. 1492 1493 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1494 """ 1495 1496 # Set the current data pipe to 'mf'. 1497 pipes.switch('mf') 1498 1499 # Initialise a diffusion tensor. 1500 diffusion_tensor.init(1e-9) 1501 1502 # Set the parameter. 1503 self.value_fns.set(param='tm', val=1e-8) 1504 1505 # Test the parameter. 1506 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1507 1508
1510 """Set the spherical diffusion tensor Diso parameter. 1511 1512 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1513 """ 1514 1515 # Set the current data pipe to 'mf'. 1516 pipes.switch('mf') 1517 1518 # Initialise a diffusion tensor. 1519 diffusion_tensor.init(1e-9) 1520 1521 # Set the parameter. 1522 self.value_fns.set(param='Diso', val=5e7) 1523 1524 # Test the parameter. 1525 self.assertEqual(cdp.diff_tensor.Diso, 5e7)
1526 1527
1529 """Try to set the spherical diffusion tensor Da parameter. 1530 1531 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1532 """ 1533 1534 # Set the current data pipe to 'mf'. 1535 pipes.switch('mf') 1536 1537 # Initialise a diffusion tensor. 1538 diffusion_tensor.init(1e-9) 1539 1540 # Set the parameter. 1541 self.assertRaises(RelaxError, self.value_fns.set, param='Da', val=2e6)
1542 1543
1545 """Try to set the spherical diffusion tensor Dr parameter. 1546 1547 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1548 """ 1549 1550 # Set the current data pipe to 'mf'. 1551 pipes.switch('mf') 1552 1553 # Initialise a diffusion tensor. 1554 diffusion_tensor.init(1e-9) 1555 1556 # Set the parameter. 1557 self.assertRaises(RelaxError, self.value_fns.set, param='Dr', val=2e6)
1558 1559
1561 """Try to set the spherical diffusion tensor Dx parameter. 1562 1563 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1564 """ 1565 1566 # Set the current data pipe to 'mf'. 1567 pipes.switch('mf') 1568 1569 # Initialise a diffusion tensor. 1570 diffusion_tensor.init(1e-9) 1571 1572 # Set the parameter. 1573 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=2e6)
1574 1575
1577 """Try to set the spherical diffusion tensor Dy parameter. 1578 1579 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1580 """ 1581 1582 # Set the current data pipe to 'mf'. 1583 pipes.switch('mf') 1584 1585 # Initialise a diffusion tensor. 1586 diffusion_tensor.init(1e-9) 1587 1588 # Set the parameter. 1589 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=2e6)
1590 1591
1593 """Try to set the spherical diffusion tensor Dz parameter. 1594 1595 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1596 """ 1597 1598 # Set the current data pipe to 'mf'. 1599 pipes.switch('mf') 1600 1601 # Initialise a diffusion tensor. 1602 diffusion_tensor.init(1e-9) 1603 1604 # Set the parameter. 1605 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=2e6)
1606 1607
1609 """Try to set the spherical diffusion tensor Dpar parameter. 1610 1611 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1612 """ 1613 1614 # Set the current data pipe to 'mf'. 1615 pipes.switch('mf') 1616 1617 # Initialise a diffusion tensor. 1618 diffusion_tensor.init(1e-9) 1619 1620 # Set the parameter. 1621 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=2e6)
1622 1623
1625 """Try to set the spherical diffusion tensor Dper parameter. 1626 1627 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1628 """ 1629 1630 # Set the current data pipe to 'mf'. 1631 pipes.switch('mf') 1632 1633 # Initialise a diffusion tensor. 1634 diffusion_tensor.init(1e-9) 1635 1636 # Set the parameter. 1637 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=2e6)
1638 1639
1641 """Try to set the spherical diffusion tensor Dratio parameter. 1642 1643 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1644 """ 1645 1646 # Set the current data pipe to 'mf'. 1647 pipes.switch('mf') 1648 1649 # Initialise a diffusion tensor. 1650 diffusion_tensor.init(1e-9) 1651 1652 # Set the parameter. 1653 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio', val=1.2)
1654 1655
1657 """Try to set the spherical diffusion tensor alpha parameter. 1658 1659 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1660 """ 1661 1662 # Set the current data pipe to 'mf'. 1663 pipes.switch('mf') 1664 1665 # Initialise a diffusion tensor. 1666 diffusion_tensor.init(1e-9) 1667 1668 # Set the parameter. 1669 self.assertRaises(RelaxError, self.value_fns.set, param='alpha', val=pi/2)
1670 1671
1673 """Try to set the spherical diffusion tensor beta parameter. 1674 1675 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1676 """ 1677 1678 # Set the current data pipe to 'mf'. 1679 pipes.switch('mf') 1680 1681 # Initialise a diffusion tensor. 1682 diffusion_tensor.init(1e-9) 1683 1684 # Set the parameter. 1685 self.assertRaises(RelaxError, self.value_fns.set, param='beta', val=pi/2)
1686 1687
1689 """Try to set the spherical diffusion tensor gamma parameter. 1690 1691 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1692 """ 1693 1694 # Set the current data pipe to 'mf'. 1695 pipes.switch('mf') 1696 1697 # Initialise a diffusion tensor. 1698 diffusion_tensor.init(1e-9) 1699 1700 # Set the parameter. 1701 self.assertRaises(RelaxError, self.value_fns.set, param='gamma', val=pi/2)
1702 1703
1705 """Try to set the spherical diffusion tensor theta parameter. 1706 1707 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1708 """ 1709 1710 # Set the current data pipe to 'mf'. 1711 pipes.switch('mf') 1712 1713 # Initialise a diffusion tensor. 1714 diffusion_tensor.init(1e-9) 1715 1716 # Set the parameter. 1717 self.assertRaises(RelaxError, self.value_fns.set, param='theta', val=pi/2)
1718 1719
1721 """Try to set the spherical diffusion tensor phi parameter. 1722 1723 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1724 """ 1725 1726 # Set the current data pipe to 'mf'. 1727 pipes.switch('mf') 1728 1729 # Initialise a diffusion tensor. 1730 diffusion_tensor.init(1e-9) 1731 1732 # Set the parameter. 1733 self.assertRaises(RelaxError, self.value_fns.set, param='phi', val=pi/2)
1734 1735
1737 """Set the spheroidal diffusion tensor tm parameter. 1738 1739 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1740 """ 1741 1742 # Set the current data pipe to 'mf'. 1743 pipes.switch('mf') 1744 1745 # Initialise a diffusion tensor. 1746 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1747 1748 # Set the parameter. 1749 self.value_fns.set(param='tm', val=1e-8) 1750 1751 # Test the parameter. 1752 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1753 1754
1756 """Set the spheroidal diffusion tensor Diso parameter. 1757 1758 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1759 """ 1760 1761 # Set the current data pipe to 'mf'. 1762 pipes.switch('mf') 1763 1764 # Initialise a diffusion tensor. 1765 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1766 1767 # Set the parameter. 1768 self.value_fns.set(param='Diso', val=5e7) 1769 1770 # Test the parameter. 1771 self.assertEqual(cdp.diff_tensor.tm, 1./(6*5e7))
1772 1773
1775 """Set the spheroidal diffusion tensor Da parameter. 1776 1777 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1778 """ 1779 1780 # Set the current data pipe to 'mf'. 1781 pipes.switch('mf') 1782 1783 # Initialise a diffusion tensor. 1784 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1785 1786 # Set the parameter. 1787 self.value_fns.set(param='Da', val=1e6) 1788 1789 # Test the parameter. 1790 self.assertEqual(cdp.diff_tensor.Da, 1e6)
1791 1792
1794 """Set the spheroidal diffusion tensor Dr parameter. 1795 1796 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1797 """ 1798 1799 # Set the current data pipe to 'mf'. 1800 pipes.switch('mf') 1801 1802 # Initialise a diffusion tensor. 1803 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1804 1805 # Set the parameter. 1806 self.assertRaises(RelaxError, self.value_fns.set, param='Dr', val=0.2)
1807 1808
1810 """Set the spheroidal diffusion tensor Dx parameter. 1811 1812 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1813 """ 1814 1815 # Set the current data pipe to 'mf'. 1816 pipes.switch('mf') 1817 1818 # Initialise a diffusion tensor. 1819 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1820 1821 # Set the parameter. 1822 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=1e6)
1823 1824
1826 """Set the spheroidal diffusion tensor Dy parameter. 1827 1828 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1829 """ 1830 1831 # Set the current data pipe to 'mf'. 1832 pipes.switch('mf') 1833 1834 # Initialise a diffusion tensor. 1835 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1836 1837 # Set the parameter. 1838 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=1e6)
1839 1840
1842 """Set the spheroidal diffusion tensor Dz parameter. 1843 1844 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1845 """ 1846 1847 # Set the current data pipe to 'mf'. 1848 pipes.switch('mf') 1849 1850 # Initialise a diffusion tensor. 1851 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1852 1853 # Set the parameter. 1854 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=1e6)
1855 1856
1858 """Try to set the spheroidal diffusion tensor Dpar parameter (this should not be possible). 1859 1860 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1861 """ 1862 1863 # Set the current data pipe to 'mf'. 1864 pipes.switch('mf') 1865 1866 # Initialise a diffusion tensor. 1867 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1868 1869 # Set the parameter. 1870 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=1e6)
1871 1872
1874 """Try to set the spheroidal diffusion tensor Dper parameter (this should not be possible). 1875 1876 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1877 """ 1878 1879 # Set the current data pipe to 'mf'. 1880 pipes.switch('mf') 1881 1882 # Initialise a diffusion tensor. 1883 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1884 1885 # Set the parameter. 1886 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=1e6)
1887 1888
1890 """Set the spheroidal diffusion tensor Dratio parameter. 1891 1892 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1893 """ 1894 1895 # Set the current data pipe to 'mf'. 1896 pipes.switch('mf') 1897 1898 # Initialise a diffusion tensor. 1899 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1900 1901 # Set the parameter. 1902 self.value_fns.set(param='Dratio', val=1.2) 1903 1904 # Test the parameter. 1905 self.assertAlmostEqual(cdp.diff_tensor.Dratio, 1.2)
1906 1907
1909 """Try to set the spheroidal diffusion tensor alpha parameter. 1910 1911 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1912 """ 1913 1914 # Set the current data pipe to 'mf'. 1915 pipes.switch('mf') 1916 1917 # Initialise a diffusion tensor. 1918 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1919 1920 # Set the parameter. 1921 self.assertRaises(RelaxError, self.value_fns.set, param='alpha', val=pi/2)
1922 1923
1925 """Try to set the spheroidal diffusion tensor beta parameter. 1926 1927 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1928 """ 1929 1930 # Set the current data pipe to 'mf'. 1931 pipes.switch('mf') 1932 1933 # Initialise a diffusion tensor. 1934 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1935 1936 # Set the parameter. 1937 self.assertRaises(RelaxError, self.value_fns.set, param='beta', val=pi/2)
1938 1939
1941 """Try to set the spheroidal diffusion tensor gamma parameter. 1942 1943 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1944 """ 1945 1946 # Set the current data pipe to 'mf'. 1947 pipes.switch('mf') 1948 1949 # Initialise a diffusion tensor. 1950 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1951 1952 # Set the parameter. 1953 self.assertRaises(RelaxError, self.value_fns.set, param='gamma', val=pi/2)
1954 1955
1957 """Set the spheroidal diffusion tensor theta parameter. 1958 1959 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1960 """ 1961 1962 # Set the current data pipe to 'mf'. 1963 pipes.switch('mf') 1964 1965 # Initialise a diffusion tensor. 1966 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1967 1968 # Set the parameter. 1969 self.value_fns.set(param='theta', val=pi/2) 1970 1971 # Test the parameter. 1972 self.assertEqual(cdp.diff_tensor.theta, pi/2)
1973 1974
1976 """Set the spheroidal diffusion tensor phi parameter. 1977 1978 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1979 """ 1980 1981 # Set the current data pipe to 'mf'. 1982 pipes.switch('mf') 1983 1984 # Initialise a diffusion tensor. 1985 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 1986 1987 # Set the parameter. 1988 self.value_fns.set(param='phi', val=pi/2) 1989 1990 # Test the parameter. 1991 self.assertEqual(cdp.diff_tensor.phi, pi/2)
1992 1993
1995 """Set the spheroidal diffusion tensor parameters {tm, Da}. 1996 1997 The functions tested are both pipe_control.value.set() and prompt.value.set(). 1998 """ 1999 2000 # Set the current data pipe to 'mf'. 2001 pipes.switch('mf') 2002 2003 # Initialise a diffusion tensor. 2004 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2005 2006 # Set the parameters. 2007 self.value_fns.set(param=['tm', 'Da'], val=[1e-8, 1e6]) 2008 2009 # Test the parameter. 2010 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 2011 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2012 2013
2015 """Set the spheroidal diffusion tensor parameters {Diso, Da}. 2016 2017 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2018 """ 2019 2020 # Set the current data pipe to 'mf'. 2021 pipes.switch('mf') 2022 2023 # Initialise a diffusion tensor. 2024 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2025 2026 # Set the parameters. 2027 self.value_fns.set(param=['Diso', 'Da'], val=[1e7, 1e6]) 2028 2029 # Test the parameter. 2030 self.assertEqual(cdp.diff_tensor.Diso, 1e7) 2031 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2032 2033
2035 """Set the spheroidal diffusion tensor parameters {tm, Dratio}. 2036 2037 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2038 """ 2039 2040 # Set the current data pipe to 'mf'. 2041 pipes.switch('mf') 2042 2043 # Initialise a diffusion tensor. 2044 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2045 2046 # Set the parameters. 2047 self.value_fns.set(param=['tm', 'Dratio'], val=[1e-8, 1.6]) 2048 2049 # Test the parameter. 2050 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 2051 self.assertEqual(cdp.diff_tensor.Dratio, 1.6)
2052 2053
2055 """Set the spheroidal diffusion tensor parameters {Dpar, Dper}. 2056 2057 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2058 """ 2059 2060 # Set the current data pipe to 'mf'. 2061 pipes.switch('mf') 2062 2063 # Initialise a diffusion tensor. 2064 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2065 2066 # Set the parameters. 2067 self.value_fns.set(param=['Dpar', 'Dper'], val=[1e7, 2e7]) 2068 2069 # Test the parameter. 2070 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1e7) 2071 self.assertAlmostEqual(cdp.diff_tensor.Dper, 2e7)
2072 2073
2075 """Set the spheroidal diffusion tensor parameters {Dper, Dpar}. 2076 2077 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2078 """ 2079 2080 # Set the current data pipe to 'mf'. 2081 pipes.switch('mf') 2082 2083 # Initialise a diffusion tensor. 2084 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2085 2086 # Set the parameters. 2087 self.value_fns.set(param=['Dper', 'Dpar'], val=[1e7, 2e7]) 2088 2089 # Test the parameter. 2090 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1e7) 2091 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 2e7)
2092 2093
2095 """Set the spheroidal diffusion tensor parameters {Diso, Dratio}. 2096 2097 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2098 """ 2099 2100 # Set the current data pipe to 'mf'. 2101 pipes.switch('mf') 2102 2103 # Initialise a diffusion tensor. 2104 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2105 2106 # Set the parameters. 2107 self.value_fns.set(param=['Diso', 'Dratio'], val=[1e7, 1.2]) 2108 2109 # Test the parameter. 2110 self.assertEqual(cdp.diff_tensor.Diso, 1e7) 2111 self.assertEqual(cdp.diff_tensor.Dratio, 1.2)
2112 2113
2115 """Set the spheroidal diffusion tensor parameters {Dpar, Dratio} (this should not be possible). 2116 2117 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2118 """ 2119 2120 # Set the current data pipe to 'mf'. 2121 pipes.switch('mf') 2122 2123 # Initialise a diffusion tensor. 2124 diffusion_tensor.init((1e-9, 2e6, 0, 0)) 2125 2126 # Set the parameters. 2127 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['Dpar', 'Dratio'], val=[1e7, 1.2])
2128 2129
2131 """Set the ellipsoidal diffusion tensor tm parameter. 2132 2133 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2134 """ 2135 2136 # Set the current data pipe to 'mf'. 2137 pipes.switch('mf') 2138 2139 # Initialise a diffusion tensor. 2140 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2141 2142 # Set the parameter. 2143 self.value_fns.set(param='tm', val=1e-8) 2144 2145 # Test the parameter. 2146 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
2147 2148
2150 """Set the ellipsoidal diffusion tensor Diso parameter. 2151 2152 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2153 """ 2154 2155 # Set the current data pipe to 'mf'. 2156 pipes.switch('mf') 2157 2158 # Initialise a diffusion tensor. 2159 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2160 2161 # Set the parameter. 2162 self.value_fns.set(param='Diso', val=5e7) 2163 2164 # Test the parameter. 2165 self.assertEqual(cdp.diff_tensor.tm, 1./(6*5e7))
2166 2167
2169 """Set the ellipsoidal diffusion tensor Da parameter. 2170 2171 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2172 """ 2173 2174 # Set the current data pipe to 'mf'. 2175 pipes.switch('mf') 2176 2177 # Initialise a diffusion tensor. 2178 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2179 2180 # Set the parameter. 2181 self.value_fns.set(param='Da', val=1e6) 2182 2183 # Test the parameter. 2184 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2185 2186
2188 """Set the ellipsoidal diffusion tensor Dr parameter. 2189 2190 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2191 """ 2192 2193 # Set the current data pipe to 'mf'. 2194 pipes.switch('mf') 2195 2196 # Initialise a diffusion tensor. 2197 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2198 2199 # Set the parameter. 2200 self.value_fns.set(param='Dr', val=0.3) 2201 2202 # Test the parameter. 2203 self.assertEqual(cdp.diff_tensor.Dr, 0.3)
2204 2205
2207 """Set the ellipsoidal diffusion tensor Dx parameter. 2208 2209 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2210 """ 2211 2212 # Set the current data pipe to 'mf'. 2213 pipes.switch('mf') 2214 2215 # Initialise a diffusion tensor. 2216 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2217 2218 # Set the parameter. 2219 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=1e6)
2220 2221
2223 """Set the ellipsoidal diffusion tensor Dy parameter. 2224 2225 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2226 """ 2227 2228 # Set the current data pipe to 'mf'. 2229 pipes.switch('mf') 2230 2231 # Initialise a diffusion tensor. 2232 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2233 2234 # Set the parameter. 2235 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=1e6)
2236 2237
2239 """Set the ellipsoidal diffusion tensor Dz parameter. 2240 2241 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2242 """ 2243 2244 # Set the current data pipe to 'mf'. 2245 pipes.switch('mf') 2246 2247 # Initialise a diffusion tensor. 2248 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2249 2250 # Set the parameter. 2251 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=1e6)
2252 2253
2255 """Try to set the ellipsoidal diffusion tensor Dpar parameter (this should not be possible). 2256 2257 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2258 """ 2259 2260 # Set the current data pipe to 'mf'. 2261 pipes.switch('mf') 2262 2263 # Initialise a diffusion tensor. 2264 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2265 2266 # Set the parameter. 2267 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=1e6)
2268 2269
2271 """Try to set the ellipsoidal diffusion tensor Dper parameter (this should not be possible). 2272 2273 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2274 """ 2275 2276 # Set the current data pipe to 'mf'. 2277 pipes.switch('mf') 2278 2279 # Initialise a diffusion tensor. 2280 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2281 2282 # Set the parameter. 2283 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=1e6)
2284 2285
2287 """Set the ellipsoidal diffusion tensor Dratio parameter. 2288 2289 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2290 """ 2291 2292 # Set the current data pipe to 'mf'. 2293 pipes.switch('mf') 2294 2295 # Initialise a diffusion tensor. 2296 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2297 2298 # Set the parameter. 2299 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio', val=1.2)
2300 2301
2303 """Try to set the ellipsoidal diffusion tensor alpha parameter. 2304 2305 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2306 """ 2307 2308 # Set the current data pipe to 'mf'. 2309 pipes.switch('mf') 2310 2311 # Initialise a diffusion tensor. 2312 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2313 2314 # Set the parameter. 2315 self.value_fns.set(param='alpha', val=pi/2) 2316 2317 # Test the parameter. 2318 self.assertEqual(cdp.diff_tensor.alpha, pi/2)
2319 2320
2322 """Try to set the ellipsoidal diffusion tensor beta parameter. 2323 2324 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2325 """ 2326 2327 # Set the current data pipe to 'mf'. 2328 pipes.switch('mf') 2329 2330 # Initialise a diffusion tensor. 2331 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2332 2333 # Set the parameter. 2334 self.value_fns.set(param='beta', val=pi/2) 2335 2336 # Test the parameter. 2337 self.assertEqual(cdp.diff_tensor.beta, pi/2)
2338 2339
2341 """Try to set the ellipsoidal diffusion tensor gamma parameter. 2342 2343 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2344 """ 2345 2346 # Set the current data pipe to 'mf'. 2347 pipes.switch('mf') 2348 2349 # Initialise a diffusion tensor. 2350 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2351 2352 # Set the parameter. 2353 self.value_fns.set(param='gamma', val=pi/2) 2354 2355 # Test the parameter. 2356 self.assertEqual(cdp.diff_tensor.gamma, pi/2)
2357 2358
2360 """Set the ellipsoidal diffusion tensor theta parameter. 2361 2362 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2363 """ 2364 2365 # Set the current data pipe to 'mf'. 2366 pipes.switch('mf') 2367 2368 # Initialise a diffusion tensor. 2369 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2370 2371 # Set the parameter. 2372 self.assertRaises(RelaxError, self.value_fns.set, param='theta', val=pi/2)
2373 2374
2376 """Set the ellipsoidal diffusion tensor phi parameter. 2377 2378 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2379 """ 2380 2381 # Set the current data pipe to 'mf'. 2382 pipes.switch('mf') 2383 2384 # Initialise a diffusion tensor. 2385 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0)) 2386 2387 # Set the parameter. 2388 self.assertRaises(RelaxError, self.value_fns.set, param='phi', val=pi/2)
2389 2390
2392 """Set the ellipsoidal diffusion tensor parameters {tm, Da, Dr}. 2393 2394 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2395 """ 2396 2397 # Set the current data pipe to 'mf'. 2398 pipes.switch('mf') 2399 2400 # Initialise a diffusion tensor. 2401 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 2402 2403 # Set the parameters. 2404 self.value_fns.set(param=['tm', 'Da', 'Dr'], val=[1e-8, 1e6, 0.2]) 2405 2406 # Test the parameters. 2407 self.assertEqual(cdp.diff_tensor.tm, 1e-8) 2408 self.assertEqual(cdp.diff_tensor.Da, 1e6) 2409 self.assertEqual(cdp.diff_tensor.Dr, 0.2)
2410 2411
2413 """Set the ellipsoidal diffusion tensor parameters {Diso, Da, Dr}. 2414 2415 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2416 """ 2417 2418 # Set the current data pipe to 'mf'. 2419 pipes.switch('mf') 2420 2421 # Initialise a diffusion tensor. 2422 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 2423 2424 # Set the parameters. 2425 self.value_fns.set(param=['Diso', 'Da', 'Dr'], val=[1e7, 1e6, 0.2]) 2426 2427 # Test the parameters. 2428 self.assertEqual(cdp.diff_tensor.Diso, 1e7) 2429 self.assertEqual(cdp.diff_tensor.Da, 1e6) 2430 self.assertEqual(cdp.diff_tensor.Dr, 0.2)
2431 2432
2434 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz}. 2435 2436 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2437 """ 2438 2439 # Set the current data pipe to 'mf'. 2440 pipes.switch('mf') 2441 2442 # Initialise a diffusion tensor. 2443 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 2444 2445 # Set the parameters. 2446 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=[1e7, 2e7, 3e7]) 2447 2448 # Test the parameters. 2449 self.assertEqual(cdp.diff_tensor.Dx, 1e7) 2450 self.assertEqual(cdp.diff_tensor.Dy, 2e7) 2451 self.assertEqual(cdp.diff_tensor.Dz, 3e7)
2452 2453
2455 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz} all to the same value. 2456 2457 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2458 """ 2459 2460 # Set the current data pipe to 'mf'. 2461 pipes.switch('mf') 2462 2463 # Initialise a diffusion tensor. 2464 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 2465 2466 # Set the parameters. 2467 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=1e7) 2468 2469 # Test the parameters. 2470 self.assertEqual(cdp.diff_tensor.Dx, 1e7) 2471 self.assertEqual(cdp.diff_tensor.Dy, 1e7) 2472 self.assertEqual(cdp.diff_tensor.Dz, 1e7)
2473 2474
2476 """Try to set the ellipsoidal diffusion tensor parameters {tm, Diso, Dr} (this should not be possible). 2477 2478 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2479 """ 2480 2481 # Set the current data pipe to 'mf'. 2482 pipes.switch('mf') 2483 2484 # Initialise a diffusion tensor. 2485 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0)) 2486 2487 # Set the parameters. 2488 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['tm', 'Diso', 'Dr'], val=[1e-8, 1e6, 0.2])
2489 2490 2491 2492 2493 ############################################### 2494 # Reduced spectral density mapping parameters # 2495 ############################################### 2496 2497
2498 - def test_set_jw_all_spins_j0(self):
2499 """Set the RSDM parameter J(0) for all spins. 2500 2501 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2502 """ 2503 2504 # Set the current data pipe to 'jw'. 2505 pipes.switch('jw') 2506 2507 # Set the parameter. 2508 self.value_fns.set(param='j0', val=4.5e-9) 2509 2510 # Test the parameter. 2511 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 4.5e-9) 2512 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
2513 2514
2515 - def test_set_jw_all_spins_jwx(self):
2516 """Set the RSDM parameter J(wX) for all spins. 2517 2518 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2519 """ 2520 2521 # Set the current data pipe to 'jw'. 2522 pipes.switch('jw') 2523 2524 # Set the parameter. 2525 self.value_fns.set(param='jwx', val=2.3e-10) 2526 2527 # Test the parameter. 2528 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 2.3e-10) 2529 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 2.3e-10)
2530 2531
2532 - def test_set_jw_all_spins_jwh(self):
2533 """Set the RSDM parameter J(wH) for all spins. 2534 2535 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2536 """ 2537 2538 # Set the current data pipe to 'jw'. 2539 pipes.switch('jw') 2540 2541 # Set the parameter. 2542 self.value_fns.set(param='jwh', val=1.7e-12) 2543 2544 # Test the parameter. 2545 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 1.7e-12) 2546 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.7e-12)
2547 2548
2549 - def test_set_jw_all_spins_csa(self):
2550 """Set the RSDM CSA parameter for all spins. 2551 2552 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2553 """ 2554 2555 # Set the current data pipe to 'jw'. 2556 pipes.switch('jw') 2557 2558 # Set the parameter. 2559 self.value_fns.set(param='csa', val=-160e-6) 2560 2561 # Test the parameter. 2562 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -160e-6) 2563 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
2564 2565
2567 """Set different RSDM parameters J(0), J(wX), J(wH) for all spins. 2568 2569 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2570 """ 2571 2572 # Set the current data pipe to 'jw'. 2573 pipes.switch('jw') 2574 2575 # Set the parameter. 2576 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12]) 2577 2578 # Test the parameter. 2579 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 6.4e-9) 2580 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 3.5e-10) 2581 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 2.3e-12) 2582 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9) 2583 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 3.5e-10) 2584 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 2.3e-12)
2585 2586
2588 """Set RSDM parameters J(0), J(wX), J(wH) for all spins to the same value. 2589 2590 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2591 """ 2592 2593 # Set the current data pipe to 'jw'. 2594 pipes.switch('jw') 2595 2596 # Set the parameter. 2597 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10) 2598 2599 # Test the parameter. 2600 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 1.9e-10) 2601 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 1.9e-10) 2602 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 1.9e-10) 2603 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10) 2604 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 1.9e-10) 2605 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.9e-10)
2606 2607
2608 - def test_set_jw_defaults_j0(self):
2609 """Set the RSDM parameter J(0) to the default value (there is none!). 2610 2611 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2612 """ 2613 2614 # Set the current data pipe to 'jw'. 2615 pipes.switch('jw') 2616 2617 # Set the parameter. 2618 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
2619 2620
2621 - def test_set_jw_defaults_jwx(self):
2622 """Set the RSDM parameter J(wX) to the default value (there is none!). 2623 2624 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2625 """ 2626 2627 # Set the current data pipe to 'jw'. 2628 pipes.switch('jw') 2629 2630 # Set the parameter. 2631 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwx')
2632 2633
2634 - def test_set_jw_defaults_jwh(self):
2635 """Set the RSDM parameter J(wH) to the default value (there is none!). 2636 2637 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2638 """ 2639 2640 # Set the current data pipe to 'jw'. 2641 pipes.switch('jw') 2642 2643 # Set the parameter. 2644 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwh')
2645 2646
2647 - def test_set_jw_defaults_csa(self):
2648 """Set the RSDM CSA parameter to the default value. 2649 2650 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2651 """ 2652 2653 # Set the current data pipe to 'jw'. 2654 pipes.switch('jw') 2655 2656 # Set the parameter. 2657 self.value_fns.set(param='csa') 2658 2659 # Test the parameter. 2660 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6) 2661 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
2662 2663
2665 """Set different RSDM parameters J(0), J(wX), J(wH) to the default values (there are none!). 2666 2667 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2668 """ 2669 2670 # Set the current data pipe to 'jw'. 2671 pipes.switch('jw') 2672 2673 # Set the parameter. 2674 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'jwx', 'jwh'])
2675 2676
2677 - def test_set_jw_single_spin_j0(self):
2678 """Set the RSDM parameter J(0) for a single spin. 2679 2680 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2681 """ 2682 2683 # Set the current data pipe to 'jw'. 2684 pipes.switch('jw') 2685 2686 # Set the parameter. 2687 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112') 2688 2689 # Test the parameter. 2690 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 2691 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
2692 2693
2695 """Set the RSDM parameter J(wX) for a single spin. 2696 2697 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2698 """ 2699 2700 # Set the current data pipe to 'jw'. 2701 pipes.switch('jw') 2702 2703 # Set the parameter. 2704 self.value_fns.set(param='jwx', val=2.3e-10, spin_id='@112') 2705 2706 # Test the parameter. 2707 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx')) 2708 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 2.3e-10)
2709 2710
2712 """Set the RSDM parameter J(wH) for a single spin. 2713 2714 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2715 """ 2716 2717 # Set the current data pipe to 'jw'. 2718 pipes.switch('jw') 2719 2720 # Set the parameter. 2721 self.value_fns.set(param='jwh', val=1.7e-12, spin_id='@112') 2722 2723 # Test the parameter. 2724 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh')) 2725 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.7e-12)
2726 2727
2729 """Set the RSDM CSA parameter for a single spin. 2730 2731 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2732 """ 2733 2734 # Set the current data pipe to 'jw'. 2735 pipes.switch('jw') 2736 2737 # Set the parameter. 2738 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112') 2739 2740 # Test the parameter. 2741 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa')) 2742 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
2743 2744
2746 """Set different RSDM parameters J(0), J(wX), J(wH) for a single spin. 2747 2748 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2749 """ 2750 2751 # Set the current data pipe to 'jw'. 2752 pipes.switch('jw') 2753 2754 # Set the parameter. 2755 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12], spin_id='@112') 2756 2757 # Test the parameter. 2758 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 2759 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx')) 2760 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh')) 2761 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9) 2762 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 3.5e-10) 2763 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 2.3e-12)
2764 2765
2767 """Set RSDM parameters J(0), J(wX), J(wH) for a single spin to the same value. 2768 2769 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2770 """ 2771 2772 # Set the current data pipe to 'jw'. 2773 pipes.switch('jw') 2774 2775 # Set the parameter. 2776 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10, spin_id='@112') 2777 2778 # Test the parameter. 2779 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0')) 2780 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx')) 2781 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh')) 2782 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10) 2783 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 1.9e-10) 2784 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.9e-10)
2785 2786 2787 2788 ######################### 2789 # Model-free parameters # 2790 ######################### 2791 2792
2794 """Set the model-free local tm parameter for all spins. 2795 2796 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2797 """ 2798 2799 # Set the current data pipe to 'mf'. 2800 pipes.switch('mf') 2801 2802 # Set the parameter. 2803 self.value_fns.set(param='local_tm', val=1e-8) 2804 2805 # Test the parameter. 2806 self.assertEqual(cdp.mol[0].res[0].spin[0].local_tm, 1e-8) 2807 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 1e-8)
2808 2809
2810 - def test_set_mf_all_spins_s2(self):
2811 """Set the model-free S2 parameter for all spins. 2812 2813 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2814 """ 2815 2816 # Set the current data pipe to 'mf'. 2817 pipes.switch('mf') 2818 2819 # Set the parameter. 2820 self.value_fns.set(param='s2', val=0.8) 2821 2822 # Test the parameter. 2823 self.assertEqual(cdp.mol[0].res[0].spin[0].s2, 0.8) 2824 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
2825 2826
2827 - def test_set_mf_all_spins_s2f(self):
2828 """Set the model-free S2f parameter for all spins. 2829 2830 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2831 """ 2832 2833 # Set the current data pipe to 'mf'. 2834 pipes.switch('mf') 2835 2836 # Set the parameter. 2837 self.value_fns.set(param='s2f', val=0.45) 2838 2839 # Test the parameter. 2840 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.45) 2841 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.45)
2842 2843
2844 - def test_set_mf_all_spins_s2s(self):
2845 """Set the model-free S2s parameter for all spins. 2846 2847 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2848 """ 2849 2850 # Set the current data pipe to 'mf'. 2851 pipes.switch('mf') 2852 2853 # Set the parameter. 2854 self.value_fns.set(param='s2s', val=0.1) 2855 2856 # Test the parameter. 2857 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.1) 2858 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.1)
2859 2860
2861 - def test_set_mf_all_spins_te(self):
2862 """Set the model-free te parameter for all spins. 2863 2864 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2865 """ 2866 2867 # Set the current data pipe to 'mf'. 2868 pipes.switch('mf') 2869 2870 # Set the parameter. 2871 self.value_fns.set(param='te', val=12.5e-12) 2872 2873 # Test the parameter. 2874 self.assertEqual(cdp.mol[0].res[0].spin[0].te, 12.5e-12) 2875 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 12.5e-12)
2876 2877
2878 - def test_set_mf_all_spins_tf(self):
2879 """Set the model-free tf parameter for all spins. 2880 2881 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2882 """ 2883 2884 # Set the current data pipe to 'mf'. 2885 pipes.switch('mf') 2886 2887 # Set the parameter. 2888 self.value_fns.set(param='tf', val=20.1e-12) 2889 2890 # Test the parameter. 2891 self.assertEqual(cdp.mol[0].res[0].spin[0].tf, 20.1e-12) 2892 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 20.1e-12)
2893 2894
2895 - def test_set_mf_all_spins_ts(self):
2896 """Set the model-free ts parameter for all spins. 2897 2898 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2899 """ 2900 2901 # Set the current data pipe to 'mf'. 2902 pipes.switch('mf') 2903 2904 # Set the parameter. 2905 self.value_fns.set(param='ts', val=1.23e-9) 2906 2907 # Test the parameter. 2908 self.assertEqual(cdp.mol[0].res[0].spin[0].ts, 1.23e-9) 2909 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1.23e-9)
2910 2911
2912 - def test_set_mf_all_spins_rex(self):
2913 """Set the model-free Rex parameter for all spins. 2914 2915 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2916 """ 2917 2918 # Set the current data pipe to 'mf'. 2919 pipes.switch('mf') 2920 2921 # Set the parameter. 2922 self.value_fns.set(param='rex', val=2.34) 2923 2924 # Test the parameter. 2925 self.assertEqual(cdp.mol[0].res[0].spin[0].rex, 2.34) 2926 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 2.34)
2927 2928
2929 - def test_set_mf_all_spins_csa(self):
2930 """Set the model-free CSA parameter for all spins. 2931 2932 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2933 """ 2934 2935 # Set the current data pipe to 'mf'. 2936 pipes.switch('mf') 2937 2938 # Set the parameter. 2939 self.value_fns.set(param='csa', val=-172e-6) 2940 2941 # Test the parameter. 2942 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6) 2943 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
2944 2945
2947 """Set the model-free S2f and S2s parameters for all spins to different values. 2948 2949 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2950 """ 2951 2952 # Set the current data pipe to 'mf'. 2953 pipes.switch('mf') 2954 2955 # Set the parameter. 2956 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9]) 2957 2958 # Test the parameters. 2959 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.7) 2960 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.9) 2961 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7) 2962 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.9)
2963 2964
2966 """Set the model-free S2f and S2s parameters for all spins to the same value. 2967 2968 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2969 """ 2970 2971 # Set the current data pipe to 'mf'. 2972 pipes.switch('mf') 2973 2974 # Set the parameter. 2975 self.value_fns.set(param=['s2f', 's2s'], val=0.7) 2976 2977 # Test the parameters. 2978 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.7) 2979 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.7) 2980 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7) 2981 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.7)
2982 2983
2985 """Set the model-free local tm parameter to the default value. 2986 2987 The functions tested are both pipe_control.value.set() and prompt.value.set(). 2988 """ 2989 2990 # Set the current data pipe to 'mf'. 2991 pipes.switch('mf') 2992 2993 # Set the parameter. 2994 self.value_fns.set(param='local_tm') 2995 2996 # Test the parameter. 2997 self.assertEqual(cdp.mol[0].res[0].spin[0].local_tm, 10 * 1e-9) 2998 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 10 * 1e-9)
2999 3000
3001 - def test_set_mf_defaults_s2(self):
3002 """Set the model-free S2 parameter to the default value. 3003 3004 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3005 """ 3006 3007 # Set the current data pipe to 'mf'. 3008 pipes.switch('mf') 3009 3010 # Set the parameter. 3011 self.value_fns.set(param='s2') 3012 3013 # Test the parameter. 3014 self.assertEqual(cdp.mol[0].res[0].spin[0].s2, 0.8) 3015 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
3016 3017
3018 - def test_set_mf_defaults_s2f(self):
3019 """Set the model-free S2f parameter to the default value. 3020 3021 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3022 """ 3023 3024 # Set the current data pipe to 'mf'. 3025 pipes.switch('mf') 3026 3027 # Set the parameter. 3028 self.value_fns.set(param='s2f') 3029 3030 # Test the parameter. 3031 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.8) 3032 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.8)
3033 3034
3035 - def test_set_mf_defaults_s2s(self):
3036 """Set the model-free S2s parameter to the default value. 3037 3038 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3039 """ 3040 3041 # Set the current data pipe to 'mf'. 3042 pipes.switch('mf') 3043 3044 # Set the parameter. 3045 self.value_fns.set(param='s2s') 3046 3047 # Test the parameter. 3048 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.8) 3049 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.8)
3050 3051
3052 - def test_set_mf_defaults_te(self):
3053 """Set the model-free te parameter to the default value. 3054 3055 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3056 """ 3057 3058 # Set the current data pipe to 'mf'. 3059 pipes.switch('mf') 3060 3061 # Set the parameter. 3062 self.value_fns.set(param='te') 3063 3064 # Test the parameter. 3065 self.assertEqual(cdp.mol[0].res[0].spin[0].te, 100 * 1e-12) 3066 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 100 * 1e-12)
3067 3068
3069 - def test_set_mf_defaults_tf(self):
3070 """Set the model-free tf parameter to the default value. 3071 3072 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3073 """ 3074 3075 # Set the current data pipe to 'mf'. 3076 pipes.switch('mf') 3077 3078 # Set the parameter. 3079 self.value_fns.set(param='tf') 3080 3081 # Test the parameter. 3082 self.assertEqual(cdp.mol[0].res[0].spin[0].tf, 10 * 1e-12) 3083 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 10 * 1e-12)
3084 3085
3086 - def test_set_mf_defaults_ts(self):
3087 """Set the model-free ts parameter to the default value. 3088 3089 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3090 """ 3091 3092 # Set the current data pipe to 'mf'. 3093 pipes.switch('mf') 3094 3095 # Set the parameter. 3096 self.value_fns.set(param='ts') 3097 3098 # Test the parameter. 3099 self.assertEqual(cdp.mol[0].res[0].spin[0].ts, 1000 * 1e-12) 3100 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1000 * 1e-12)
3101 3102
3103 - def test_set_mf_defaults_rex(self):
3104 """Set the model-free Rex parameter to the default value. 3105 3106 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3107 """ 3108 3109 # Set the current data pipe to 'mf'. 3110 pipes.switch('mf') 3111 3112 # Set the parameter. 3113 self.value_fns.set(param='rex') 3114 3115 # Test the parameter. 3116 self.assertEqual(cdp.mol[0].res[0].spin[0].rex, 0.0) 3117 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 0.0)
3118 3119
3120 - def test_set_mf_defaults_csa(self):
3121 """Set the model-free CSA parameter to the default value. 3122 3123 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3124 """ 3125 3126 # Set the current data pipe to 'mf'. 3127 pipes.switch('mf') 3128 3129 # Set the parameter. 3130 self.value_fns.set(param='csa') 3131 3132 # Test the parameter. 3133 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -172 * 1e-6) 3134 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172 * 1e-6)
3135 3136
3138 """Set the model-free S2f and S2s parameters to the default values. 3139 3140 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3141 """ 3142 3143 # Set the current data pipe to 'mf'. 3144 pipes.switch('mf') 3145 3146 # Set the parameter. 3147 self.value_fns.set(param=['s2f', 's2s']) 3148 3149 # Test the parameters. 3150 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.8) 3151 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.8) 3152 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.8) 3153 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.8)
3154 3155
3157 """Set the model-free local tm parameter for a single spin. 3158 3159 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3160 """ 3161 3162 # Set the current data pipe to 'mf'. 3163 pipes.switch('mf') 3164 3165 # Set the parameter. 3166 self.value_fns.set(param='local_tm', val=1e-8, spin_id='@112') 3167 3168 # Test the parameter. 3169 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'local_tm')) 3170 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 1e-8)
3171 3172
3173 - def test_set_mf_single_spin_s2(self):
3174 """Set the model-free S2 parameter for a single spin. 3175 3176 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3177 """ 3178 3179 # Set the current data pipe to 'mf'. 3180 pipes.switch('mf') 3181 3182 # Set the parameter. 3183 self.value_fns.set(param='s2', val=0.8, spin_id='@112') 3184 3185 # Test the parameter. 3186 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2')) 3187 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
3188 3189
3191 """Set the model-free S2f parameter for a single spin. 3192 3193 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3194 """ 3195 3196 # Set the current data pipe to 'mf'. 3197 pipes.switch('mf') 3198 3199 # Set the parameter. 3200 self.value_fns.set(param='s2f', val=0.45, spin_id='@112') 3201 3202 # Test the parameter. 3203 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f')) 3204 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.45)
3205 3206
3208 """Set the model-free S2s parameter for a single spin. 3209 3210 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3211 """ 3212 3213 # Set the current data pipe to 'mf'. 3214 pipes.switch('mf') 3215 3216 # Set the parameter. 3217 self.value_fns.set(param='s2s', val=0.1, spin_id='@112') 3218 3219 # Test the parameter. 3220 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s')) 3221 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.1)
3222 3223
3224 - def test_set_mf_single_spin_te(self):
3225 """Set the model-free te parameter for a single spin. 3226 3227 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3228 """ 3229 3230 # Set the current data pipe to 'mf'. 3231 pipes.switch('mf') 3232 3233 # Set the parameter. 3234 self.value_fns.set(param='te', val=12.5e-12, spin_id='@112') 3235 3236 # Test the parameter. 3237 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'te')) 3238 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 12.5e-12)
3239 3240
3241 - def test_set_mf_single_spin_tf(self):
3242 """Set the model-free tf parameter for a single spin. 3243 3244 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3245 """ 3246 3247 # Set the current data pipe to 'mf'. 3248 pipes.switch('mf') 3249 3250 # Set the parameter. 3251 self.value_fns.set(param='tf', val=20.1e-12, spin_id='@112') 3252 3253 # Test the parameter. 3254 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'tf')) 3255 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 20.1e-12)
3256 3257
3258 - def test_set_mf_single_spin_ts(self):
3259 """Set the model-free ts parameter for a single spin. 3260 3261 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3262 """ 3263 3264 # Set the current data pipe to 'mf'. 3265 pipes.switch('mf') 3266 3267 # Set the parameter. 3268 self.value_fns.set(param='ts', val=1.23e-9, spin_id='@112') 3269 3270 # Test the parameter. 3271 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'ts')) 3272 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1.23e-9)
3273 3274
3276 """Set the model-free Rex parameter for a single spin. 3277 3278 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3279 """ 3280 3281 # Set the current data pipe to 'mf'. 3282 pipes.switch('mf') 3283 3284 # Set the parameter. 3285 self.value_fns.set(param='rex', val=2.34, spin_id='@112') 3286 3287 # Test the parameter. 3288 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'rex')) 3289 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 2.34)
3290 3291
3293 """Set the model-free CSA parameter for a single spin. 3294 3295 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3296 """ 3297 3298 # Set the current data pipe to 'mf'. 3299 pipes.switch('mf') 3300 3301 # Set the parameter. 3302 self.value_fns.set(param='csa', val=-172e-6, spin_id='@112') 3303 3304 # Test the parameter. 3305 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa')) 3306 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
3307 3308
3310 """Set the model-free S2f and S2s parameters for a single spin to different values. 3311 3312 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3313 """ 3314 3315 # Set the current data pipe to 'mf'. 3316 pipes.switch('mf') 3317 3318 # Set the parameter. 3319 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9], spin_id='@112') 3320 3321 # Test the parameters. 3322 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f')) 3323 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s')) 3324 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7) 3325 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.9)
3326 3327
3329 """Set the model-free S2f and S2s parameters for a single spin to the same value. 3330 3331 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3332 """ 3333 3334 # Set the current data pipe to 'mf'. 3335 pipes.switch('mf') 3336 3337 # Set the parameter. 3338 self.value_fns.set(param=['s2f', 's2s'], val=0.7, spin_id='@112') 3339 3340 # Test the parameters. 3341 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f')) 3342 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s')) 3343 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7) 3344 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.7)
3345 3346 3347 3348 ############################ 3349 # N-state model parameters # 3350 ############################ 3351 3352
3353 - def test_set_n_state_model_rx(self):
3354 """Set the N-state model curve fitting alpha2 parameter. 3355 3356 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3357 """ 3358 3359 # Set the current data pipe to 'n_state'. 3360 pipes.switch('n_state') 3361 3362 # Set the parameter. 3363 self.value_fns.set(param='alpha', val=pi, index=2) 3364 3365 # Test the parameter. 3366 self.assertEqual(cdp.alpha[0], 0.0) 3367 self.assertEqual(cdp.alpha[1], 0.0) 3368 self.assertEqual(cdp.alpha[2], pi) 3369 self.assertEqual(cdp.alpha[3], 0.0)
3370 3371 3372 3373 ####################################### 3374 # Relaxation curve fitting parameters # 3375 ####################################### 3376 3377
3379 """Set the relaxation curve fitting Rx parameter for all spins. 3380 3381 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3382 """ 3383 3384 # Set the current data pipe to 'relax_fit'. 3385 pipes.switch('relax_fit') 3386 3387 # Set the parameter. 3388 self.value_fns.set(param='rx', val=1.2) 3389 3390 # Test the parameter. 3391 self.assertEqual(cdp.mol[0].res[0].spin[0].rx, 1.2) 3392 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 1.2)
3393 3394
3396 """Set the relaxation curve fitting I0 parameter for all spins. 3397 3398 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3399 """ 3400 3401 # Set the current data pipe to 'relax_fit'. 3402 pipes.switch('relax_fit') 3403 3404 # Set the parameter. 3405 self.value_fns.set(param='i0', val=520) 3406 3407 # Test the parameter. 3408 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 520) 3409 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 520)
3410 3411
3413 """Set the relaxation curve fitting Iinf parameter for all spins. 3414 3415 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3416 """ 3417 3418 # Set the current data pipe to 'relax_fit'. 3419 pipes.switch('relax_fit') 3420 3421 # Set the parameter. 3422 self.value_fns.set(param='iinf', val=-1.7) 3423 3424 # Test the parameter. 3425 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, -1.7) 3426 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3427 3428
3430 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to different values. 3431 3432 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3433 """ 3434 3435 # Set the current data pipe to 'relax_fit'. 3436 pipes.switch('relax_fit') 3437 3438 # Set the parameter. 3439 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7]) 3440 3441 # Test the parameter. 3442 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 123456) 3443 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, -1.7) 3444 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 123456) 3445 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3446 3447
3449 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to the same value. 3450 3451 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3452 """ 3453 3454 # Set the current data pipe to 'relax_fit'. 3455 pipes.switch('relax_fit') 3456 3457 # Set the parameter. 3458 self.value_fns.set(param=['i0', 'iinf'], val=0.0) 3459 3460 # Test the parameter. 3461 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 0.0) 3462 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0) 3463 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 0.0) 3464 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3465 3466
3468 """Set the relaxation curve fitting Rx parameter to the default value. 3469 3470 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3471 """ 3472 3473 # Set the current data pipe to 'relax_fit'. 3474 pipes.switch('relax_fit') 3475 3476 # Set the parameter. 3477 self.value_fns.set(param='rx') 3478 3479 # Test the parameter. 3480 self.assertEqual(cdp.mol[0].res[0].spin[0].rx, 8.0) 3481 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 8.0)
3482 3483
3485 """Set the relaxation curve fitting I0 parameter to the default value. 3486 3487 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3488 """ 3489 3490 # Set the current data pipe to 'relax_fit'. 3491 pipes.switch('relax_fit') 3492 3493 # Set the parameter. 3494 self.value_fns.set(param='i0') 3495 3496 # Test the parameter. 3497 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 10000.0) 3498 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 10000.0)
3499 3500
3502 """Set the relaxation curve fitting Iinf parameter to the default value. 3503 3504 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3505 """ 3506 3507 # Set the current data pipe to 'relax_fit'. 3508 pipes.switch('relax_fit') 3509 3510 # Set the parameter. 3511 self.value_fns.set(param='iinf') 3512 3513 # Test the parameter. 3514 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0) 3515 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3516 3517
3519 """Set the relaxation curve fitting parameters {I0, Iinf} to the default values. 3520 3521 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3522 """ 3523 3524 # Set the current data pipe to 'relax_fit'. 3525 pipes.switch('relax_fit') 3526 3527 # Set the parameter. 3528 self.value_fns.set(param=['i0', 'iinf']) 3529 3530 # Test the parameter. 3531 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 10000.0) 3532 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0) 3533 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 10000.0) 3534 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3535 3536
3538 """Set the relaxation curve fitting Rx parameter for all spins. 3539 3540 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3541 """ 3542 3543 # Set the current data pipe to 'relax_fit'. 3544 pipes.switch('relax_fit') 3545 3546 # Set the parameter. 3547 self.value_fns.set(param='rx', val=1.2, spin_id='@112') 3548 3549 # Test the parameter. 3550 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'rx')) 3551 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 1.2)
3552 3553
3555 """Set the relaxation curve fitting I0 parameter for all spins. 3556 3557 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3558 """ 3559 3560 # Set the current data pipe to 'relax_fit'. 3561 pipes.switch('relax_fit') 3562 3563 # Set the parameter. 3564 self.value_fns.set(param='i0', val=520, spin_id='@112') 3565 3566 # Test the parameter. 3567 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0')) 3568 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 520)
3569 3570
3572 """Set the relaxation curve fitting Iinf parameter for all spins. 3573 3574 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3575 """ 3576 3577 # Set the current data pipe to 'relax_fit'. 3578 pipes.switch('relax_fit') 3579 3580 # Set the parameter. 3581 self.value_fns.set(param='iinf', val=-1.7, spin_id='@112') 3582 3583 # Test the parameter. 3584 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf')) 3585 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3586 3587
3589 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to different values. 3590 3591 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3592 """ 3593 3594 # Set the current data pipe to 'relax_fit'. 3595 pipes.switch('relax_fit') 3596 3597 # Set the parameter. 3598 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7], spin_id='@112') 3599 3600 # Test the parameter. 3601 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0')) 3602 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf')) 3603 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 123456) 3604 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3605 3606
3608 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to the same value. 3609 3610 The functions tested are both pipe_control.value.set() and prompt.value.set(). 3611 """ 3612 3613 # Set the current data pipe to 'relax_fit'. 3614 pipes.switch('relax_fit') 3615 3616 # Set the parameter. 3617 self.value_fns.set(param=['i0', 'iinf'], val=0.0, spin_id='@112') 3618 3619 # Test the parameter. 3620 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0')) 3621 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf')) 3622 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 0.0) 3623 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3624