1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 from math import pi
24
25
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
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
39 """Set up for all the value unit tests."""
40
41
42 ds.add(pipe_name='ct', pipe_type='ct')
43
44
45 ds.add(pipe_name='mf', pipe_type='mf')
46
47
48 ds.add(pipe_name='mf2', pipe_type='mf')
49
50
51 ds.add(pipe_name='jw', pipe_type='jw')
52
53
54 ds.add(pipe_name='relax_fit', pipe_type='relax_fit')
55
56
57 ds.add(pipe_name='n_state', pipe_type='N-state')
58
59
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
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
95
96
97
98
99
100
101
102
103
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
111 pipes.switch('ct')
112
113
114 self.value_fns.set(param='j0', val=4.5e-9)
115
116
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
128 pipes.switch('ct')
129
130
131 self.value_fns.set(param='f_eta', val=2.3e-10)
132
133
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
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
145 pipes.switch('ct')
146
147
148 self.value_fns.set(param='f_r2', val=1.7e-12)
149
150
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
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
162 pipes.switch('ct')
163
164
165 self.value_fns.set(param='csa', val=-160e-6)
166
167
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
179 pipes.switch('ct')
180
181
182 self.value_fns.set(param='orientation', val=17)
183
184
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
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
196 pipes.switch('ct')
197
198
199 self.value_fns.set(param='tc', val=10)
200
201
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
213 pipes.switch('ct')
214
215
216 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=[6.4e-9, 3.5e-10, 2.3e-12])
217
218
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
234 pipes.switch('ct')
235
236
237 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10)
238
239
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
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
255 pipes.switch('ct')
256
257
258 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
259
260
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
268 pipes.switch('ct')
269
270
271 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_eta')
272
273
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
281 pipes.switch('ct')
282
283
284 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_r2')
285
286
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
294 pipes.switch('ct')
295
296
297 self.value_fns.set(param='csa')
298
299
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
311 pipes.switch('ct')
312
313
314 self.value_fns.set(param='orientation')
315
316
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
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
328 pipes.switch('ct')
329
330
331 self.value_fns.set(param='tc')
332
333
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
345 pipes.switch('ct')
346
347
348 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'f_eta', 'f_r2'])
349
350
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
358 pipes.switch('ct')
359
360
361 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112')
362
363
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
375 pipes.switch('ct')
376
377
378 self.value_fns.set(param='f_eta', val=2.3e-10, spin_id='@112')
379
380
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
392 pipes.switch('ct')
393
394
395 self.value_fns.set(param='f_r2', val=1.7e-12, spin_id='@112')
396
397
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
409 pipes.switch('ct')
410
411
412 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112')
413
414
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
426 pipes.switch('ct')
427
428
429 self.value_fns.set(param='orientation', val=17, spin_id='@112')
430
431
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
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
443 pipes.switch('ct')
444
445
446 self.value_fns.set(param='tc', val=10, spin_id='@112')
447
448
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
460 pipes.switch('ct')
461
462
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
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
481 pipes.switch('ct')
482
483
484 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10, spin_id='@112')
485
486
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
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
509 pipes.switch('mf')
510
511
512 diffusion_tensor.init(1e-9)
513
514
515 self.value_fns.set(param='tm')
516
517
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
528 pipes.switch('mf')
529
530
531 diffusion_tensor.init(1e-9)
532
533
534 self.value_fns.set(param='Diso')
535
536
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
547 pipes.switch('mf')
548
549
550 diffusion_tensor.init(1e-9)
551
552
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
563 pipes.switch('mf')
564
565
566 diffusion_tensor.init(1e-9)
567
568
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
579 pipes.switch('mf')
580
581
582 diffusion_tensor.init(1e-9)
583
584
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
595 pipes.switch('mf')
596
597
598 diffusion_tensor.init(1e-9)
599
600
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
611 pipes.switch('mf')
612
613
614 diffusion_tensor.init(1e-9)
615
616
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
627 pipes.switch('mf')
628
629
630 diffusion_tensor.init(1e-9)
631
632
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
643 pipes.switch('mf')
644
645
646 diffusion_tensor.init(1e-9)
647
648
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
659 pipes.switch('mf')
660
661
662 diffusion_tensor.init(1e-9)
663
664
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
675 pipes.switch('mf')
676
677
678 diffusion_tensor.init(1e-9)
679
680
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
691 pipes.switch('mf')
692
693
694 diffusion_tensor.init(1e-9)
695
696
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
707 pipes.switch('mf')
708
709
710 diffusion_tensor.init(1e-9)
711
712
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
723 pipes.switch('mf')
724
725
726 diffusion_tensor.init(1e-9)
727
728
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
739 pipes.switch('mf')
740
741
742 diffusion_tensor.init(1e-9)
743
744
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
755 pipes.switch('mf')
756
757
758 diffusion_tensor.init((1e-9, 2e6, 0, 0))
759
760
761 self.value_fns.set(param='tm')
762
763
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
774 pipes.switch('mf')
775
776
777 diffusion_tensor.init((1e-9, 2e6, 0, 0))
778
779
780 self.value_fns.set(param='Diso')
781
782
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
793 pipes.switch('mf')
794
795
796 diffusion_tensor.init((1e-9, 2e6, 0, 0))
797
798
799 self.value_fns.set(param='Da')
800
801
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
812 pipes.switch('mf')
813
814
815 diffusion_tensor.init((1e-9, 2e6, 0, 0))
816
817
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
828 pipes.switch('mf')
829
830
831 diffusion_tensor.init((1e-9, 2e6, 0, 0))
832
833
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
844 pipes.switch('mf')
845
846
847 diffusion_tensor.init((1e-9, 2e6, 0, 0))
848
849
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
860 pipes.switch('mf')
861
862
863 diffusion_tensor.init((1e-9, 2e6, 0, 0))
864
865
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
876 pipes.switch('mf')
877
878
879 diffusion_tensor.init((1e-9, 2e6, 0, 0))
880
881
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
892 pipes.switch('mf')
893
894
895 diffusion_tensor.init((1e-9, 2e6, 0, 0))
896
897
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
908 pipes.switch('mf')
909
910
911 diffusion_tensor.init((1e-9, 2e6, 0, 0))
912
913
914 self.value_fns.set(param='Dratio')
915
916
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
927 pipes.switch('mf')
928
929
930 diffusion_tensor.init((1e-9, 2e6, 0, 0))
931
932
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
943 pipes.switch('mf')
944
945
946 diffusion_tensor.init((1e-9, 2e6, 0, 0))
947
948
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
959 pipes.switch('mf')
960
961
962 diffusion_tensor.init((1e-9, 2e6, 0, 0))
963
964
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
975 pipes.switch('mf')
976
977
978 diffusion_tensor.init((1e-9, 2e6, 0, 0))
979
980
981 self.value_fns.set(param='theta')
982
983
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
994 pipes.switch('mf')
995
996
997 diffusion_tensor.init((1e-9, 2e6, 0, 0))
998
999
1000 self.value_fns.set(param='phi')
1001
1002
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
1013 pipes.switch('mf')
1014
1015
1016 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1017
1018
1019 self.value_fns.set(param=['tm', 'Da'])
1020
1021
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
1033 pipes.switch('mf')
1034
1035
1036 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1037
1038
1039 self.value_fns.set(param=['Diso', 'Da'])
1040
1041
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
1053 pipes.switch('mf')
1054
1055
1056 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1057
1058
1059 self.value_fns.set(param=['tm', 'Dratio'])
1060
1061
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
1073 pipes.switch('mf')
1074
1075
1076 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1077
1078
1079 self.value_fns.set(param=['Dpar', 'Dper'])
1080
1081
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
1093 pipes.switch('mf')
1094
1095
1096 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1097
1098
1099 self.value_fns.set(param=['Dper', 'Dpar'])
1100
1101
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
1113 pipes.switch('mf')
1114
1115
1116 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1117
1118
1119 self.value_fns.set(param=['Diso', 'Dratio'])
1120
1121
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
1133 pipes.switch('mf')
1134
1135
1136 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1137
1138
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
1149 pipes.switch('mf')
1150
1151
1152 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1153
1154
1155 self.value_fns.set(param='tm')
1156
1157
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
1168 pipes.switch('mf')
1169
1170
1171 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1172
1173
1174 self.value_fns.set(param='Diso')
1175
1176
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
1187 pipes.switch('mf')
1188
1189
1190 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1191
1192
1193 self.value_fns.set(param='Da')
1194
1195
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
1206 pipes.switch('mf')
1207
1208
1209 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1210
1211
1212 self.value_fns.set(param='Dr')
1213
1214
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
1225 pipes.switch('mf')
1226
1227
1228 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1229
1230
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
1241 pipes.switch('mf')
1242
1243
1244 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1245
1246
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
1257 pipes.switch('mf')
1258
1259
1260 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1261
1262
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
1273 pipes.switch('mf')
1274
1275
1276 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1277
1278
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
1289 pipes.switch('mf')
1290
1291
1292 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1293
1294
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
1305 pipes.switch('mf')
1306
1307
1308 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1309
1310
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
1321 pipes.switch('mf')
1322
1323
1324 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1325
1326
1327 self.value_fns.set(param='alpha')
1328
1329
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
1340 pipes.switch('mf')
1341
1342
1343 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1344
1345
1346 self.value_fns.set(param='beta')
1347
1348
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
1359 pipes.switch('mf')
1360
1361
1362 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1363
1364
1365 self.value_fns.set(param='gamma')
1366
1367
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
1378 pipes.switch('mf')
1379
1380
1381 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1382
1383
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
1394 pipes.switch('mf')
1395
1396
1397 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1398
1399
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
1410 pipes.switch('mf')
1411
1412
1413 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1414
1415
1416 self.value_fns.set(param=['tm', 'Da', 'Dr'])
1417
1418
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
1431 pipes.switch('mf')
1432
1433
1434 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1435
1436
1437 self.value_fns.set(param=['Diso', 'Da', 'Dr'])
1438
1439
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
1452 pipes.switch('mf')
1453
1454
1455 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1456
1457
1458 self.value_fns.set(param=['Dx', 'Dy', 'Dz'])
1459
1460
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
1473 pipes.switch('mf')
1474
1475
1476 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1477
1478
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
1489 pipes.switch('mf')
1490
1491
1492 diffusion_tensor.init(1e-9)
1493
1494
1495 self.value_fns.set(param='tm', val=1e-8)
1496
1497
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
1508 pipes.switch('mf')
1509
1510
1511 diffusion_tensor.init(1e-9)
1512
1513
1514 self.value_fns.set(param='Diso', val=5e7)
1515
1516
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
1527 pipes.switch('mf')
1528
1529
1530 diffusion_tensor.init(1e-9)
1531
1532
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
1543 pipes.switch('mf')
1544
1545
1546 diffusion_tensor.init(1e-9)
1547
1548
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
1559 pipes.switch('mf')
1560
1561
1562 diffusion_tensor.init(1e-9)
1563
1564
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
1575 pipes.switch('mf')
1576
1577
1578 diffusion_tensor.init(1e-9)
1579
1580
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
1591 pipes.switch('mf')
1592
1593
1594 diffusion_tensor.init(1e-9)
1595
1596
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
1607 pipes.switch('mf')
1608
1609
1610 diffusion_tensor.init(1e-9)
1611
1612
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
1623 pipes.switch('mf')
1624
1625
1626 diffusion_tensor.init(1e-9)
1627
1628
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
1639 pipes.switch('mf')
1640
1641
1642 diffusion_tensor.init(1e-9)
1643
1644
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
1655 pipes.switch('mf')
1656
1657
1658 diffusion_tensor.init(1e-9)
1659
1660
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
1671 pipes.switch('mf')
1672
1673
1674 diffusion_tensor.init(1e-9)
1675
1676
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
1687 pipes.switch('mf')
1688
1689
1690 diffusion_tensor.init(1e-9)
1691
1692
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
1703 pipes.switch('mf')
1704
1705
1706 diffusion_tensor.init(1e-9)
1707
1708
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
1719 pipes.switch('mf')
1720
1721
1722 diffusion_tensor.init(1e-9)
1723
1724
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
1735 pipes.switch('mf')
1736
1737
1738 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1739
1740
1741 self.value_fns.set(param='tm', val=1e-8)
1742
1743
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
1754 pipes.switch('mf')
1755
1756
1757 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1758
1759
1760 self.value_fns.set(param='Diso', val=5e7)
1761
1762
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
1773 pipes.switch('mf')
1774
1775
1776 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1777
1778
1779 self.value_fns.set(param='Da', val=1e6)
1780
1781
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
1792 pipes.switch('mf')
1793
1794
1795 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1796
1797
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
1808 pipes.switch('mf')
1809
1810
1811 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1812
1813
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
1824 pipes.switch('mf')
1825
1826
1827 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1828
1829
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
1840 pipes.switch('mf')
1841
1842
1843 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1844
1845
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
1856 pipes.switch('mf')
1857
1858
1859 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1860
1861
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
1872 pipes.switch('mf')
1873
1874
1875 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1876
1877
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
1888 pipes.switch('mf')
1889
1890
1891 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1892
1893
1894 self.value_fns.set(param='Dratio', val=1.2)
1895
1896
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
1907 pipes.switch('mf')
1908
1909
1910 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1911
1912
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
1923 pipes.switch('mf')
1924
1925
1926 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1927
1928
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
1939 pipes.switch('mf')
1940
1941
1942 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1943
1944
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
1955 pipes.switch('mf')
1956
1957
1958 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1959
1960
1961 self.value_fns.set(param='theta', val=pi/2)
1962
1963
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
1974 pipes.switch('mf')
1975
1976
1977 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1978
1979
1980 self.value_fns.set(param='phi', val=pi/2)
1981
1982
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
1993 pipes.switch('mf')
1994
1995
1996 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1997
1998
1999 self.value_fns.set(param=['tm', 'Da'], val=[1e-8, 1e6])
2000
2001
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
2013 pipes.switch('mf')
2014
2015
2016 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2017
2018
2019 self.value_fns.set(param=['Diso', 'Da'], val=[1e7, 1e6])
2020
2021
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
2033 pipes.switch('mf')
2034
2035
2036 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2037
2038
2039 self.value_fns.set(param=['tm', 'Dratio'], val=[1e-8, 1.6])
2040
2041
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
2053 pipes.switch('mf')
2054
2055
2056 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2057
2058
2059 self.value_fns.set(param=['Dpar', 'Dper'], val=[1e7, 2e7])
2060
2061
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
2073 pipes.switch('mf')
2074
2075
2076 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2077
2078
2079 self.value_fns.set(param=['Dper', 'Dpar'], val=[1e7, 2e7])
2080
2081
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
2093 pipes.switch('mf')
2094
2095
2096 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2097
2098
2099 self.value_fns.set(param=['Diso', 'Dratio'], val=[1e7, 1.2])
2100
2101
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
2113 pipes.switch('mf')
2114
2115
2116 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2117
2118
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
2129 pipes.switch('mf')
2130
2131
2132 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2133
2134
2135 self.value_fns.set(param='tm', val=1e-8)
2136
2137
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
2148 pipes.switch('mf')
2149
2150
2151 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2152
2153
2154 self.value_fns.set(param='Diso', val=5e7)
2155
2156
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
2167 pipes.switch('mf')
2168
2169
2170 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2171
2172
2173 self.value_fns.set(param='Da', val=1e6)
2174
2175
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
2186 pipes.switch('mf')
2187
2188
2189 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2190
2191
2192 self.value_fns.set(param='Dr', val=0.3)
2193
2194
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
2205 pipes.switch('mf')
2206
2207
2208 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2209
2210
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
2221 pipes.switch('mf')
2222
2223
2224 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2225
2226
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
2237 pipes.switch('mf')
2238
2239
2240 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2241
2242
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
2253 pipes.switch('mf')
2254
2255
2256 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2257
2258
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
2269 pipes.switch('mf')
2270
2271
2272 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2273
2274
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
2285 pipes.switch('mf')
2286
2287
2288 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2289
2290
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
2301 pipes.switch('mf')
2302
2303
2304 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2305
2306
2307 self.value_fns.set(param='alpha', val=pi/2)
2308
2309
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
2320 pipes.switch('mf')
2321
2322
2323 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2324
2325
2326 self.value_fns.set(param='beta', val=pi/2)
2327
2328
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
2339 pipes.switch('mf')
2340
2341
2342 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2343
2344
2345 self.value_fns.set(param='gamma', val=pi/2)
2346
2347
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
2358 pipes.switch('mf')
2359
2360
2361 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2362
2363
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
2374 pipes.switch('mf')
2375
2376
2377 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2378
2379
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
2390 pipes.switch('mf')
2391
2392
2393 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2394
2395
2396 self.value_fns.set(param=['tm', 'Da', 'Dr'], val=[1e-8, 1e6, 0.2])
2397
2398
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
2411 pipes.switch('mf')
2412
2413
2414 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2415
2416
2417 self.value_fns.set(param=['Diso', 'Da', 'Dr'], val=[1e7, 1e6, 0.2])
2418
2419
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
2432 pipes.switch('mf')
2433
2434
2435 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2436
2437
2438 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=[1e7, 2e7, 3e7])
2439
2440
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
2453 pipes.switch('mf')
2454
2455
2456 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2457
2458
2459 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=1e7)
2460
2461
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
2474 pipes.switch('mf')
2475
2476
2477 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2478
2479
2480 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['tm', 'Diso', 'Dr'], val=[1e-8, 1e6, 0.2])
2481
2482
2483
2484
2485
2486
2487
2488
2489
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
2497 pipes.switch('jw')
2498
2499
2500 self.value_fns.set(param='j0', val=4.5e-9)
2501
2502
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
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
2514 pipes.switch('jw')
2515
2516
2517 self.value_fns.set(param='jwx', val=2.3e-10)
2518
2519
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
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
2531 pipes.switch('jw')
2532
2533
2534 self.value_fns.set(param='jwh', val=1.7e-12)
2535
2536
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
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
2548 pipes.switch('jw')
2549
2550
2551 self.value_fns.set(param='csa', val=-160e-6)
2552
2553
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
2565 pipes.switch('jw')
2566
2567
2568 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12])
2569
2570
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
2586 pipes.switch('jw')
2587
2588
2589 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10)
2590
2591
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
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
2607 pipes.switch('jw')
2608
2609
2610 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
2611
2612
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
2620 pipes.switch('jw')
2621
2622
2623 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwx')
2624
2625
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
2633 pipes.switch('jw')
2634
2635
2636 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwh')
2637
2638
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
2646 pipes.switch('jw')
2647
2648
2649 self.value_fns.set(param='csa')
2650
2651
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
2663 pipes.switch('jw')
2664
2665
2666 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'jwx', 'jwh'])
2667
2668
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
2676 pipes.switch('jw')
2677
2678
2679 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112')
2680
2681
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
2693 pipes.switch('jw')
2694
2695
2696 self.value_fns.set(param='jwx', val=2.3e-10, spin_id='@112')
2697
2698
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
2710 pipes.switch('jw')
2711
2712
2713 self.value_fns.set(param='jwh', val=1.7e-12, spin_id='@112')
2714
2715
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
2727 pipes.switch('jw')
2728
2729
2730 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112')
2731
2732
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
2744 pipes.switch('jw')
2745
2746
2747 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12], spin_id='@112')
2748
2749
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
2765 pipes.switch('jw')
2766
2767
2768 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10, spin_id='@112')
2769
2770
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
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
2792 pipes.switch('mf')
2793
2794
2795 self.value_fns.set(param='local_tm', val=1e-8)
2796
2797
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
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
2809 pipes.switch('mf')
2810
2811
2812 self.value_fns.set(param='s2', val=0.8)
2813
2814
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
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
2826 pipes.switch('mf')
2827
2828
2829 self.value_fns.set(param='s2f', val=0.45)
2830
2831
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
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
2843 pipes.switch('mf')
2844
2845
2846 self.value_fns.set(param='s2s', val=0.1)
2847
2848
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
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
2860 pipes.switch('mf')
2861
2862
2863 self.value_fns.set(param='te', val=12.5e-12)
2864
2865
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
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
2877 pipes.switch('mf')
2878
2879
2880 self.value_fns.set(param='tf', val=20.1e-12)
2881
2882
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
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
2894 pipes.switch('mf')
2895
2896
2897 self.value_fns.set(param='ts', val=1.23e-9)
2898
2899
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
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
2911 pipes.switch('mf')
2912
2913
2914 self.value_fns.set(param='rex', val=2.34)
2915
2916
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
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
2928 pipes.switch('mf')
2929
2930
2931 self.value_fns.set(param='csa', val=-172e-6)
2932
2933
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
2945 pipes.switch('mf')
2946
2947
2948 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9])
2949
2950
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
2964 pipes.switch('mf')
2965
2966
2967 self.value_fns.set(param=['s2f', 's2s'], val=0.7)
2968
2969
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
2983 pipes.switch('mf')
2984
2985
2986 self.value_fns.set(param='local_tm')
2987
2988
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
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
3000 pipes.switch('mf')
3001
3002
3003 self.value_fns.set(param='s2')
3004
3005
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
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
3017 pipes.switch('mf')
3018
3019
3020 self.value_fns.set(param='s2f')
3021
3022
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
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
3034 pipes.switch('mf')
3035
3036
3037 self.value_fns.set(param='s2s')
3038
3039
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
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
3051 pipes.switch('mf')
3052
3053
3054 self.value_fns.set(param='te')
3055
3056
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
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
3068 pipes.switch('mf')
3069
3070
3071 self.value_fns.set(param='tf')
3072
3073
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
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
3085 pipes.switch('mf')
3086
3087
3088 self.value_fns.set(param='ts')
3089
3090
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
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
3102 pipes.switch('mf')
3103
3104
3105 self.value_fns.set(param='rex')
3106
3107
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
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
3119 pipes.switch('mf')
3120
3121
3122 self.value_fns.set(param='csa')
3123
3124
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
3136 pipes.switch('mf')
3137
3138
3139 self.value_fns.set(param=['s2f', 's2s'])
3140
3141
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
3155 pipes.switch('mf')
3156
3157
3158 self.value_fns.set(param='local_tm', val=1e-8, spin_id='@112')
3159
3160
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
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
3172 pipes.switch('mf')
3173
3174
3175 self.value_fns.set(param='s2', val=0.8, spin_id='@112')
3176
3177
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
3189 pipes.switch('mf')
3190
3191
3192 self.value_fns.set(param='s2f', val=0.45, spin_id='@112')
3193
3194
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
3206 pipes.switch('mf')
3207
3208
3209 self.value_fns.set(param='s2s', val=0.1, spin_id='@112')
3210
3211
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
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
3223 pipes.switch('mf')
3224
3225
3226 self.value_fns.set(param='te', val=12.5e-12, spin_id='@112')
3227
3228
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
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
3240 pipes.switch('mf')
3241
3242
3243 self.value_fns.set(param='tf', val=20.1e-12, spin_id='@112')
3244
3245
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
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
3257 pipes.switch('mf')
3258
3259
3260 self.value_fns.set(param='ts', val=1.23e-9, spin_id='@112')
3261
3262
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
3274 pipes.switch('mf')
3275
3276
3277 self.value_fns.set(param='rex', val=2.34, spin_id='@112')
3278
3279
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
3291 pipes.switch('mf')
3292
3293
3294 self.value_fns.set(param='csa', val=-172e-6, spin_id='@112')
3295
3296
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
3308 pipes.switch('mf')
3309
3310
3311 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9], spin_id='@112')
3312
3313
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
3327 pipes.switch('mf')
3328
3329
3330 self.value_fns.set(param=['s2f', 's2s'], val=0.7, spin_id='@112')
3331
3332
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
3342
3343
3344
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
3352 pipes.switch('n_state')
3353
3354
3355 self.value_fns.set(param='alpha2', val=pi)
3356
3357
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
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
3377 pipes.switch('relax_fit')
3378
3379
3380 self.value_fns.set(param='rx', val=1.2)
3381
3382
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
3394 pipes.switch('relax_fit')
3395
3396
3397 self.value_fns.set(param='i0', val=520)
3398
3399
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
3411 pipes.switch('relax_fit')
3412
3413
3414 self.value_fns.set(param='iinf', val=-1.7)
3415
3416
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
3428 pipes.switch('relax_fit')
3429
3430
3431 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7])
3432
3433
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
3447 pipes.switch('relax_fit')
3448
3449
3450 self.value_fns.set(param=['i0', 'iinf'], val=0.0)
3451
3452
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
3466 pipes.switch('relax_fit')
3467
3468
3469 self.value_fns.set(param='rx')
3470
3471
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
3483 pipes.switch('relax_fit')
3484
3485
3486 self.value_fns.set(param='i0')
3487
3488
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
3500 pipes.switch('relax_fit')
3501
3502
3503 self.value_fns.set(param='iinf')
3504
3505
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
3517 pipes.switch('relax_fit')
3518
3519
3520 self.value_fns.set(param=['i0', 'iinf'])
3521
3522
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
3536 pipes.switch('relax_fit')
3537
3538
3539 self.value_fns.set(param='rx', val=1.2, spin_id='@112')
3540
3541
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
3553 pipes.switch('relax_fit')
3554
3555
3556 self.value_fns.set(param='i0', val=520, spin_id='@112')
3557
3558
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
3570 pipes.switch('relax_fit')
3571
3572
3573 self.value_fns.set(param='iinf', val=-1.7, spin_id='@112')
3574
3575
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
3587 pipes.switch('relax_fit')
3588
3589
3590 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7], spin_id='@112')
3591
3592
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
3606 pipes.switch('relax_fit')
3607
3608
3609 self.value_fns.set(param=['i0', 'iinf'], val=0.0, spin_id='@112')
3610
3611
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