Changeset c52f66f in sasview for sansmodels/src/sans/models/test/utest_modelmultiplication.py
- Timestamp:
- Mar 29, 2010 7:47:59 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 6546e4b
- Parents:
- 277fad8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/test/utest_modelmultiplication.py
rc1e865a rc52f66f 47 47 48 48 for item in self.model.getParamList(): 49 self.assert_(item in list3) 49 if not 'scale' in item: 50 self.assert_(item in list3) 50 51 for item in self.model2.getParamList(): 51 52 #model3 parameters should not include effect_radius* … … 54 55 55 56 ## test set value for parameters and get paramaters 56 self.model3.setParam("scale ", 15)57 self.assertEqual(self.model3.getParam("scale "), 15)57 self.model3.setParam("scale_factor", 15) 58 self.assertEqual(self.model3.getParam("scale_factor"), 15) 58 59 self.model3.setParam("radius", 20) 59 60 self.assertEqual(self.model3.getParam("radius"), 20) 60 61 self.model3.setParam("radius.width", 15) 61 62 self.assertEqual(self.model3.getParam("radius.width"), 15) 63 self.model3.setParam("scale_factor", 15) 64 self.assertEqual(self.model3.getParam("scale_factor"), 15) 65 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 62 66 63 67 ## Dispersity … … 126 130 127 131 for item in self.model.getParamList(): 128 self.assert_(item in list3) 132 if not 'scale' in item: 133 self.assert_(item in list3) 129 134 for item in self.model2.getParamList(): 130 135 #model3 parameters should not include effect_radius* … … 133 138 134 139 ## test set value for parameters and get paramaters 135 self.model3.setParam("scale ", 15)136 self.assertEqual(self.model3.getParam("scale "), 15)140 self.model3.setParam("scale_factor", 15) 141 self.assertEqual(self.model3.getParam("scale_factor"), 15) 137 142 self.model3.setParam("radius", 20) 138 143 self.assertEqual(self.model3.getParam("radius"), 20) 139 144 self.model3.setParam("radius.width", 15) 140 145 self.assertEqual(self.model3.getParam("radius.width"), 15) 146 self.model3.setParam("scale_factor", 15) 147 self.assertEqual(self.model3.getParam("scale_factor"), 15) 148 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 141 149 142 150 ## Dispersity … … 204 212 205 213 for item in self.model.getParamList(): 206 self.assert_(item in list3) 214 if not 'scale' in item: 215 self.assert_(item in list3) 207 216 for item in self.model2.getParamList(): 208 217 #model3 parameters should not include effect_radius* … … 211 220 212 221 ## test set value for parameters and get paramaters 213 self.model3.setParam("scale ", 15)214 self.assertEqual(self.model3.getParam("scale "), 15)222 self.model3.setParam("scale_factor", 15) 223 self.assertEqual(self.model3.getParam("scale_factor"), 15) 215 224 self.model3.setParam("radius", 20) 216 225 self.assertEqual(self.model3.getParam("radius"), 20) 217 226 self.model3.setParam("radius.width", 15) 218 227 self.assertEqual(self.model3.getParam("radius.width"), 15) 228 self.model3.setParam("scale_factor", 15) 229 self.assertEqual(self.model3.getParam("scale_factor"), 15) 230 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 219 231 220 232 ## Dispersity … … 283 295 284 296 for item in self.model.getParamList(): 285 self.assert_(item in list3) 297 if not 'scale' in item: 298 self.assert_(item in list3) 286 299 for item in self.model2.getParamList(): 287 300 #model3 parameters should not include effect_radius* … … 290 303 291 304 ## test set value for parameters and get paramaters 292 self.model3.setParam("scale ", 15)293 self.assertEqual(self.model3.getParam("scale "), 15)305 self.model3.setParam("scale_factor", 15) 306 self.assertEqual(self.model3.getParam("scale_factor"), 15) 294 307 self.model3.setParam("radius", 20) 295 308 self.assertEqual(self.model3.getParam("radius"), 20) 296 309 self.model3.setParam("radius.width", 15) 297 310 self.assertEqual(self.model3.getParam("radius.width"), 15) 311 self.model3.setParam("scale_factor", 15) 312 self.assertEqual(self.model3.getParam("scale_factor"), 15) 313 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 298 314 299 315 ## Dispersity … … 365 381 366 382 for item in self.model.getParamList(): 367 self.assert_(item in list3) 383 if not 'scale' in item: 384 self.assert_(item in list3) 368 385 for item in self.model2.getParamList(): 369 386 #model3 parameters should not include effect_radius* … … 372 389 373 390 ## test set value for parameters and get paramaters 374 self.model3.setParam("scale ", 15)375 self.assertEqual(self.model3.getParam("scale "), 15)391 self.model3.setParam("scale_factor", 15) 392 self.assertEqual(self.model3.getParam("scale_factor"), 15) 376 393 self.model3.setParam("radius", 20) 377 394 self.assertEqual(self.model3.getParam("radius"), 20) 378 395 self.model3.setParam("radius.width", 15) 379 396 self.assertEqual(self.model3.getParam("radius.width"), 15) 397 self.model3.setParam("scale_factor", 15) 398 self.assertEqual(self.model3.getParam("scale_factor"), 15) 399 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 380 400 381 401 ## Dispersity … … 443 463 444 464 for item in self.model.getParamList(): 445 self.assert_(item in list3) 465 #model3 parameters should not include scale* 466 if not 'scale' in item: 467 self.assert_(item in list3) 446 468 for item in self.model2.getParamList(): 447 469 #model3 parameters should not include effect_radius* … … 450 472 451 473 ## test set value for parameters and get paramaters 452 self.model3.setParam("scale", 15) 453 self.assertEqual(self.model3.getParam("scale"), 15) 474 #self.model3.setParam("scale", 15) 475 #self.assertEqual(self.model3.getParam("scale"), 15) 476 self.model3.setParam("scale_factor", 0.1) 477 self.assertEqual(self.model3.getParam("scale_factor"), 0.1) 454 478 self.model3.setParam("radius", 20) 455 479 self.assertEqual(self.model3.getParam("radius"), 20) 456 480 self.model3.setParam("radius.width", 15) 457 481 self.assertEqual(self.model3.getParam("radius.width"), 15) 482 self.model3.setParam("scale_factor", 15) 483 self.assertEqual(self.model3.getParam("scale_factor"), 15) 484 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 458 485 459 486 ## Dispersity … … 521 548 522 549 for item in self.model.getParamList(): 523 self.assert_(item in list3) 550 if not 'scale' in item: 551 self.assert_(item in list3) 524 552 for item in self.model2.getParamList(): 525 553 #model3 parameters should not include effect_radius* … … 528 556 529 557 ## test set value for parameters and get paramaters 530 self.model3.setParam("scale ", 15)531 self.assertEqual(self.model3.getParam("scale "), 15)558 self.model3.setParam("scale_factor", 15) 559 self.assertEqual(self.model3.getParam("scale_factor"), 15) 532 560 self.model3.setParam("radius", 20) 533 561 self.assertEqual(self.model3.getParam("radius"), 20) 534 562 self.model3.setParam("radius.width", 15) 535 563 self.assertEqual(self.model3.getParam("radius.width"), 15) 564 self.model3.setParam("scale_factor", 15) 565 self.assertEqual(self.model3.getParam("scale_factor"), 15) 566 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 536 567 537 568 ## Dispersity … … 599 630 600 631 for item in self.model.getParamList(): 601 self.assert_(item in list3) 632 if not 'scale' in item: 633 self.assert_(item in list3) 602 634 for item in self.model2.getParamList(): 603 635 #model3 parameters should not include effect_radius* … … 606 638 607 639 ## test set value for parameters and get paramaters 608 self.model3.setParam("scale", 15) 609 self.assertEqual(self.model3.getParam("scale"), 15) 640 #self.model3.setParam("scale", 15) 641 #self.assertEqual(self.model3.getParam("scale"), 15) 642 self.model3.setParam("scale_factor", 15) 643 self.assertEqual(self.model3.getParam("scale_factor"), 15) 610 644 self.model3.setParam("radius", 20) 611 645 self.assertEqual(self.model3.getParam("radius"), 20) 612 646 self.model3.setParam("radius.width", 15) 613 647 self.assertEqual(self.model3.getParam("radius.width"), 15) 648 self.model3.setParam("scale_factor", 15) 649 self.assertEqual(self.model3.getParam("scale_factor"), 15) 650 self.assertEqual(self.model3.getParam("volfraction"), self.model.getParam("scale")) 614 651 615 652 ## Dispersity
Note: See TracChangeset
for help on using the changeset viewer.