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