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