Changeset 2510b9b in sasview
- Timestamp:
- Feb 7, 2017 2:05:10 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- a99a4045, 1a8e13f0, b61bd57, 03137f1, 18da4a8, 1e13b53
- Parents:
- 2ab9c432 (diff), bcabf4e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (02/07/17 14:05:10)
- git-committer:
- GitHub <noreply@…> (02/07/17 14:05:10)
- Files:
-
- 2 added
- 1 deleted
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/test/save_states/fitstate.fitv
rbbb8a56 r406644a 2 2 <SASroot version="1.0" xmlns="cansas1d/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="cansas1d/1.0 http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd"> 3 3 <SASentry> 4 <Title> 5 1000A Sphere Desmeared Simulated USANS Data 6 </Title> 7 <Run> 8 1000A_sphere_dsm.xml 9 </Run> 4 <Title>latex particles 0.5micron diameter in D2O slit</Title> 5 <Run>latex_smeared.xml </Run> 10 6 <SASdata> 11 7 <Idata> 12 <Q unit="1/A"> 13 3.0525e-005 14 </Q> 15 <I unit="1/cm"> 16 165100000.0 17 </I> 18 <Qdev unit="1/A"> 19 3.0525e-007 20 </Qdev> 21 <Idev unit="1/cm"> 22 1794400.0 23 </Idev> 24 </Idata> 25 <Idata> 26 <Q unit="1/A"> 27 3.33e-005 28 </Q> 29 <I unit="1/cm"> 30 190450000.0 31 </I> 32 <Qdev unit="1/A"> 33 3.33e-007 34 </Qdev> 35 <Idev unit="1/cm"> 36 2040000.0 37 </Idev> 38 </Idata> 39 <Idata> 40 <Q unit="1/A"> 41 3.885e-005 42 </Q> 43 <I unit="1/cm"> 44 179720000.0 45 </I> 46 <Qdev unit="1/A"> 47 3.885e-007 48 </Qdev> 49 <Idev unit="1/cm"> 50 975310.0 51 </Idev> 52 </Idata> 53 <Idata> 54 <Q unit="1/A"> 55 4.44e-005 56 </Q> 57 <I unit="1/cm"> 58 164980000.0 59 </I> 60 <Qdev unit="1/A"> 61 4.44e-007 62 </Qdev> 63 <Idev unit="1/cm"> 64 908780.0 65 </Idev> 66 </Idata> 67 <Idata> 68 <Q unit="1/A"> 69 4.995e-005 70 </Q> 71 <I unit="1/cm"> 72 163980000.0 73 </I> 74 <Qdev unit="1/A"> 75 4.995e-007 76 </Qdev> 77 <Idev unit="1/cm"> 78 907320.0 79 </Idev> 80 </Idata> 81 <Idata> 82 <Q unit="1/A"> 83 5.55e-005 84 </Q> 85 <I unit="1/cm"> 86 156350000.0 87 </I> 88 <Qdev unit="1/A"> 89 5.55e-007 90 </Qdev> 91 <Idev unit="1/cm"> 92 872480.0 93 </Idev> 94 </Idata> 95 <Idata> 96 <Q unit="1/A"> 97 6.105e-005 98 </Q> 99 <I unit="1/cm"> 100 172440000.0 101 </I> 102 <Qdev unit="1/A"> 103 6.105e-007 104 </Qdev> 105 <Idev unit="1/cm"> 106 9556000.0 107 </Idev> 108 </Idata> 109 <Idata> 110 <Q unit="1/A"> 111 6.66e-005 112 </Q> 113 <I unit="1/cm"> 114 158680000.0 115 </I> 116 <Qdev unit="1/A"> 117 6.66e-007 118 </Qdev> 119 <Idev unit="1/cm"> 120 894190.0 121 </Idev> 122 </Idata> 123 <Idata> 124 <Q unit="1/A"> 125 7.215e-005 126 </Q> 127 <I unit="1/cm"> 128 168260000.0 129 </I> 130 <Qdev unit="1/A"> 131 7.215e-007 132 </Qdev> 133 <Idev unit="1/cm"> 134 948630.0 135 </Idev> 136 </Idata> 137 <Idata> 138 <Q unit="1/A"> 139 7.77e-005 140 </Q> 141 <I unit="1/cm"> 142 147240000.0 143 </I> 144 <Qdev unit="1/A"> 145 7.77e-007 146 </Qdev> 147 <Idev unit="1/cm"> 148 850120.0 149 </Idev> 150 </Idata> 151 <Idata> 152 <Q unit="1/A"> 153 8.325e-005 154 </Q> 155 <I unit="1/cm"> 156 154710000.0 157 </I> 158 <Qdev unit="1/A"> 159 8.325e-007 160 </Qdev> 161 <Idev unit="1/cm"> 162 892610.0 163 </Idev> 164 </Idata> 165 <Idata> 166 <Q unit="1/A"> 167 8.88e-005 168 </Q> 169 <I unit="1/cm"> 170 154150000.0 171 </I> 172 <Qdev unit="1/A"> 173 8.88e-007 174 </Qdev> 175 <Idev unit="1/cm"> 176 897530.0 177 </Idev> 178 </Idata> 179 <Idata> 180 <Q unit="1/A"> 181 9.435e-005 182 </Q> 183 <I unit="1/cm"> 184 150060000.0 185 </I> 186 <Qdev unit="1/A"> 187 9.435e-007 188 </Qdev> 189 <Idev unit="1/cm"> 190 885510.0 191 </Idev> 192 </Idata> 193 <Idata> 194 <Q unit="1/A"> 195 9.99e-005 196 </Q> 197 <I unit="1/cm"> 198 141700000.0 199 </I> 200 <Qdev unit="1/A"> 201 9.99e-007 202 </Qdev> 203 <Idev unit="1/cm"> 204 8498900.0 205 </Idev> 206 </Idata> 207 <Idata> 208 <Q unit="1/A"> 209 0.00010545 210 </Q> 211 <I unit="1/cm"> 212 145840000.0 213 </I> 214 <Qdev unit="1/A"> 215 1.0545e-006 216 </Qdev> 217 <Idev unit="1/cm"> 218 880320.0 219 </Idev> 220 </Idata> 221 <Idata> 222 <Q unit="1/A"> 223 0.000111 224 </Q> 225 <I unit="1/cm"> 226 137260000.0 227 </I> 228 <Qdev unit="1/A"> 229 1.11e-006 230 </Qdev> 231 <Idev unit="1/cm"> 232 487940.0 233 </Idev> 234 </Idata> 235 <Idata> 236 <Q unit="1/A"> 237 0.0001221 238 </Q> 239 <I unit="1/cm"> 240 126900000.0 241 </I> 242 <Qdev unit="1/A"> 243 1.221e-006 244 </Qdev> 245 <Idev unit="1/cm"> 246 465360.0 247 </Idev> 248 </Idata> 249 <Idata> 250 <Q unit="1/A"> 251 0.0001332 252 </Q> 253 <I unit="1/cm"> 254 125450000.0 255 </I> 256 <Qdev unit="1/A"> 257 1.332e-006 258 </Qdev> 259 <Idev unit="1/cm"> 260 471620.0 261 </Idev> 262 </Idata> 263 <Idata> 264 <Q unit="1/A"> 265 0.0001443 266 </Q> 267 <I unit="1/cm"> 268 112110000.0 269 </I> 270 <Qdev unit="1/A"> 271 1.443e-006 272 </Qdev> 273 <Idev unit="1/cm"> 274 439800.0 275 </Idev> 276 </Idata> 277 <Idata> 278 <Q unit="1/A"> 279 0.0001554 280 </Q> 281 <I unit="1/cm"> 282 109740000.0 283 </I> 284 <Qdev unit="1/A"> 285 1.554e-006 286 </Qdev> 287 <Idev unit="1/cm"> 288 444060.0 289 </Idev> 290 </Idata> 291 <Idata> 292 <Q unit="1/A"> 293 0.0001665 294 </Q> 295 <I unit="1/cm"> 296 97546000.0 297 </I> 298 <Qdev unit="1/A"> 299 1.665e-006 300 </Qdev> 301 <Idev unit="1/cm"> 302 4150700.0 303 </Idev> 304 </Idata> 305 <Idata> 306 <Q unit="1/A"> 307 0.0001776 308 </Q> 309 <I unit="1/cm"> 310 88127000.0 311 </I> 312 <Qdev unit="1/A"> 313 1.776e-006 314 </Qdev> 315 <Idev unit="1/cm"> 316 392070.0 317 </Idev> 318 </Idata> 319 <Idata> 320 <Q unit="1/A"> 321 0.0001887 322 </Q> 323 <I unit="1/cm"> 324 82576000.0 325 </I> 326 <Qdev unit="1/A"> 327 1.887e-006 328 </Qdev> 329 <Idev unit="1/cm"> 330 382470.0 331 </Idev> 332 </Idata> 333 <Idata> 334 <Q unit="1/A"> 335 0.0001998 336 </Q> 337 <I unit="1/cm"> 338 77312000.0 339 </I> 340 <Qdev unit="1/A"> 341 1.998e-006 342 </Qdev> 343 <Idev unit="1/cm"> 344 375780.0 345 </Idev> 346 </Idata> 347 <Idata> 348 <Q unit="1/A"> 349 0.0002109 350 </Q> 351 <I unit="1/cm"> 352 66194000.0 353 </I> 354 <Qdev unit="1/A"> 355 2.109e-006 356 </Qdev> 357 <Idev unit="1/cm"> 358 343090.0 359 </Idev> 360 </Idata> 361 <Idata> 362 <Q unit="1/A"> 363 0.000222 364 </Q> 365 <I unit="1/cm"> 366 61870000.0 367 </I> 368 <Qdev unit="1/A"> 369 2.22e-006 370 </Qdev> 371 <Idev unit="1/cm"> 372 337290.0 373 </Idev> 374 </Idata> 375 <Idata> 376 <Q unit="1/A"> 377 0.0002331 378 </Q> 379 <I unit="1/cm"> 380 54257000.0 381 </I> 382 <Qdev unit="1/A"> 383 2.331e-006 384 </Qdev> 385 <Idev unit="1/cm"> 386 316830.0 387 </Idev> 388 </Idata> 389 <Idata> 390 <Q unit="1/A"> 391 0.0002442 392 </Q> 393 <I unit="1/cm"> 394 47924000.0 395 </I> 396 <Qdev unit="1/A"> 397 2.442e-006 398 </Qdev> 399 <Idev unit="1/cm"> 400 3004000.0 401 </Idev> 402 </Idata> 403 <Idata> 404 <Q unit="1/A"> 405 0.0002553 406 </Q> 407 <I unit="1/cm"> 408 40953000.0 409 </I> 410 <Qdev unit="1/A"> 411 2.553e-006 412 </Qdev> 413 <Idev unit="1/cm"> 414 278010.0 415 </Idev> 416 </Idata> 417 <Idata> 418 <Q unit="1/A"> 419 0.0002664 420 </Q> 421 <I unit="1/cm"> 422 34975000.0 423 </I> 424 <Qdev unit="1/A"> 425 2.664e-006 426 </Qdev> 427 <Idev unit="1/cm"> 428 257230.0 429 </Idev> 430 </Idata> 431 <Idata> 432 <Q unit="1/A"> 433 0.0002775 434 </Q> 435 <I unit="1/cm"> 436 29218000.0 437 </I> 438 <Qdev unit="1/A"> 439 2.775e-006 440 </Qdev> 441 <Idev unit="1/cm"> 442 165020.0 443 </Idev> 444 </Idata> 445 <Idata> 446 <Q unit="1/A"> 447 0.00030525 448 </Q> 449 <I unit="1/cm"> 450 19276000.0 451 </I> 452 <Qdev unit="1/A"> 453 3.0525e-006 454 </Qdev> 455 <Idev unit="1/cm"> 456 135210.0 457 </Idev> 458 </Idata> 459 <Idata> 460 <Q unit="1/A"> 461 0.000333 462 </Q> 463 <I unit="1/cm"> 464 10557000.0 465 </I> 466 <Qdev unit="1/A"> 467 3.33e-006 468 </Qdev> 469 <Idev unit="1/cm"> 470 98308.0 471 </Idev> 472 </Idata> 473 <Idata> 474 <Q unit="1/A"> 475 0.00036075 476 </Q> 477 <I unit="1/cm"> 478 5664700.0 479 </I> 480 <Qdev unit="1/A"> 481 3.6075e-006 482 </Qdev> 483 <Idev unit="1/cm"> 484 69421.0 485 </Idev> 486 </Idata> 487 <Idata> 488 <Q unit="1/A"> 489 0.0003885 490 </Q> 491 <I unit="1/cm"> 492 1947500.0 493 </I> 494 <Qdev unit="1/A"> 495 3.885e-006 496 </Qdev> 497 <Idev unit="1/cm"> 498 313730.0 499 </Idev> 500 </Idata> 501 <Idata> 502 <Q unit="1/A"> 503 0.00041625 504 </Q> 505 <I unit="1/cm"> 506 241770.0 507 </I> 508 <Qdev unit="1/A"> 509 4.1625e-006 510 </Qdev> 511 <Idev unit="1/cm"> 512 4755.1 513 </Idev> 514 </Idata> 515 <Idata> 516 <Q unit="1/A"> 517 0.000444 518 </Q> 519 <I unit="1/cm"> 520 114540.0 521 </I> 522 <Qdev unit="1/A"> 523 4.44e-006 524 </Qdev> 525 <Idev unit="1/cm"> 526 2326.3 527 </Idev> 528 </Idata> 529 <Idata> 530 <Q unit="1/A"> 531 0.00047175 532 </Q> 533 <I unit="1/cm"> 534 208800.0 535 </I> 536 <Qdev unit="1/A"> 537 4.7175e-006 538 </Qdev> 539 <Idev unit="1/cm"> 540 4001.1 541 </Idev> 542 </Idata> 543 <Idata> 544 <Q unit="1/A"> 545 0.0004995 546 </Q> 547 <I unit="1/cm"> 548 670290.0 549 </I> 550 <Qdev unit="1/A"> 551 4.995e-006 552 </Qdev> 553 <Idev unit="1/cm"> 554 11420.0 555 </Idev> 556 </Idata> 557 <Idata> 558 <Q unit="1/A"> 559 0.00052725 560 </Q> 561 <I unit="1/cm"> 562 1137400.0 563 </I> 564 <Qdev unit="1/A"> 565 5.2725e-006 566 </Qdev> 567 <Idev unit="1/cm"> 568 18885.0 569 </Idev> 570 </Idata> 571 <Idata> 572 <Q unit="1/A"> 573 0.000555 574 </Q> 575 <I unit="1/cm"> 576 1278100.0 577 </I> 578 <Qdev unit="1/A"> 579 5.55e-006 580 </Qdev> 581 <Idev unit="1/cm"> 582 15763.0 583 </Idev> 584 </Idata> 585 <Idata> 586 <Q unit="1/A"> 587 0.0006105 588 </Q> 589 <I unit="1/cm"> 590 1225600.0 591 </I> 592 <Qdev unit="1/A"> 593 6.105e-006 594 </Qdev> 595 <Idev unit="1/cm"> 596 176810.0 597 </Idev> 598 </Idata> 599 <Idata> 600 <Q unit="1/A"> 601 0.000666 602 </Q> 603 <I unit="1/cm"> 604 583310.0 605 </I> 606 <Qdev unit="1/A"> 607 6.66e-006 608 </Qdev> 609 <Idev unit="1/cm"> 610 11772.0 611 </Idev> 612 </Idata> 613 <Idata> 614 <Q unit="1/A"> 615 0.0007215 616 </Q> 617 <I unit="1/cm"> 618 69003.0 619 </I> 620 <Qdev unit="1/A"> 621 7.215e-006 622 </Qdev> 623 <Idev unit="1/cm"> 624 1907.7 625 </Idev> 626 </Idata> 627 <Idata> 628 <Q unit="1/A"> 629 0.000777 630 </Q> 631 <I unit="1/cm"> 632 23263.0 633 </I> 634 <Qdev unit="1/A"> 635 7.77e-006 636 </Qdev> 637 <Idev unit="1/cm"> 638 683.84 639 </Idev> 640 </Idata> 641 <Idata> 642 <Q unit="1/A"> 643 0.0008325 644 </Q> 645 <I unit="1/cm"> 646 97644.0 647 </I> 648 <Qdev unit="1/A"> 649 8.325e-006 650 </Qdev> 651 <Idev unit="1/cm"> 652 2565.3 653 </Idev> 654 </Idata> 655 <Idata> 656 <Q unit="1/A"> 657 0.000888 658 </Q> 659 <I unit="1/cm"> 660 233120.0 661 </I> 662 <Qdev unit="1/A"> 663 8.88e-006 664 </Qdev> 665 <Idev unit="1/cm"> 666 5864.3 667 </Idev> 668 </Idata> 669 <Idata> 670 <Q unit="1/A"> 671 0.0009435 672 </Q> 673 <I unit="1/cm"> 674 202080.0 675 </I> 676 <Qdev unit="1/A"> 677 9.435e-006 678 </Qdev> 679 <Idev unit="1/cm"> 680 6035.5 681 </Idev> 682 </Idata> 683 <Idata> 684 <Q unit="1/A"> 685 0.000999 686 </Q> 687 <I unit="1/cm"> 688 80861.0 689 </I> 690 <Qdev unit="1/A"> 691 9.99e-006 692 </Qdev> 693 <Idev unit="1/cm"> 694 30528.0 695 </Idev> 696 </Idata> 697 <Idata> 698 <Q unit="1/A"> 699 0.0010545 700 </Q> 701 <I unit="1/cm"> 702 7683.4 703 </I> 704 <Qdev unit="1/A"> 705 1.0545e-005 706 </Qdev> 707 <Idev unit="1/cm"> 708 354.56 709 </Idev> 710 </Idata> 711 <Idata> 712 <Q unit="1/A"> 713 0.00111 714 </Q> 715 <I unit="1/cm"> 716 11329.0 717 </I> 718 <Qdev unit="1/A"> 719 1.11e-005 720 </Qdev> 721 <Idev unit="1/cm"> 722 382.48 723 </Idev> 724 </Idata> 725 <Idata> 726 <Q unit="1/A"> 727 0.001221 728 </Q> 729 <I unit="1/cm"> 730 87375.0 731 </I> 732 <Qdev unit="1/A"> 733 1.221e-005 734 </Qdev> 735 <Idev unit="1/cm"> 736 2658.0 737 </Idev> 738 </Idata> 739 <Idata> 740 <Q unit="1/A"> 741 0.001332 742 </Q> 743 <I unit="1/cm"> 744 10915.0 745 </I> 746 <Qdev unit="1/A"> 747 1.332e-005 748 </Qdev> 749 <Idev unit="1/cm"> 750 517.94 751 </Idev> 752 </Idata> 753 <Idata> 754 <Q unit="1/A"> 755 0.001443 756 </Q> 757 <I unit="1/cm"> 758 7683.6 759 </I> 760 <Qdev unit="1/A"> 761 1.443e-005 762 </Qdev> 763 <Idev unit="1/cm"> 764 376.72 765 </Idev> 766 </Idata> 767 <Idata> 768 <Q unit="1/A"> 769 0.001554 770 </Q> 771 <I unit="1/cm"> 772 31538.0 773 </I> 774 <Qdev unit="1/A"> 775 1.554e-005 776 </Qdev> 777 <Idev unit="1/cm"> 778 1461.6 779 </Idev> 780 </Idata> 781 <Idata> 782 <Q unit="1/A"> 783 0.001665 784 </Q> 785 <I unit="1/cm"> 786 2991.0 787 </I> 788 <Qdev unit="1/A"> 789 1.665e-005 790 </Qdev> 791 <Idev unit="1/cm"> 792 2025.4 793 </Idev> 794 </Idata> 795 <Idata> 796 <Q unit="1/A"> 797 0.001776 798 </Q> 799 <I unit="1/cm"> 800 6126.4 801 </I> 802 <Qdev unit="1/A"> 803 1.776e-005 804 </Qdev> 805 <Idev unit="1/cm"> 806 413.24 807 </Idev> 808 </Idata> 809 <Idata> 810 <Q unit="1/A"> 811 0.001887 812 </Q> 813 <I unit="1/cm"> 814 9246.2 815 </I> 816 <Qdev unit="1/A"> 817 1.887e-005 818 </Qdev> 819 <Idev unit="1/cm"> 820 642.09 821 </Idev> 822 </Idata> 823 <Idata> 824 <Q unit="1/A"> 825 0.001998 826 </Q> 827 <I unit="1/cm"> 828 861.73 829 </I> 830 <Qdev unit="1/A"> 831 1.998e-005 832 </Qdev> 833 <Idev unit="1/cm"> 834 67.504 835 </Idev> 836 </Idata> 837 <Idata> 838 <Q unit="1/A"> 839 0.002109 840 </Q> 841 <I unit="1/cm"> 842 8017.5 843 </I> 844 <Qdev unit="1/A"> 845 2.109e-005 846 </Qdev> 847 <Idev unit="1/cm"> 848 550.7 849 </Idev> 850 </Idata> 851 <Idata> 852 <Q unit="1/A"> 853 0.00222 854 </Q> 855 <I unit="1/cm"> 856 5502.9 857 </I> 858 <Qdev unit="1/A"> 859 2.22e-005 860 </Qdev> 861 <Idev unit="1/cm"> 862 494.11 863 </Idev> 864 </Idata> 865 <Idata> 866 <Q unit="1/A"> 867 0.002331 868 </Q> 869 <I unit="1/cm"> 870 741.32 871 </I> 872 <Qdev unit="1/A"> 873 2.331e-005 874 </Qdev> 875 <Idev unit="1/cm"> 876 83.931 877 </Idev> 878 </Idata> 879 <Idata> 880 <Q unit="1/A"> 881 0.002442 882 </Q> 883 <I unit="1/cm"> 884 2919.8 885 </I> 886 <Qdev unit="1/A"> 887 2.442e-005 888 </Qdev> 889 <Idev unit="1/cm"> 890 3303.4 891 </Idev> 892 </Idata> 893 <Idata> 894 <Q unit="1/A"> 895 0.002553 896 </Q> 897 <I unit="1/cm"> 898 1667.6 899 </I> 900 <Qdev unit="1/A"> 901 2.553e-005 902 </Qdev> 903 <Idev unit="1/cm"> 904 206.1 905 </Idev> 906 </Idata> 907 <Idata> 908 <Q unit="1/A"> 909 0.002664 910 </Q> 911 <I unit="1/cm"> 912 584.11 913 </I> 914 <Qdev unit="1/A"> 915 2.664e-005 916 </Qdev> 917 <Idev unit="1/cm"> 918 74.745 919 </Idev> 920 </Idata> 921 <Idata> 922 <Q unit="1/A"> 923 0.002775 924 </Q> 925 <I unit="1/cm"> 926 1585.4 927 </I> 928 <Qdev unit="1/A"> 929 2.775e-005 930 </Qdev> 931 <Idev unit="1/cm"> 932 167.96 933 </Idev> 934 </Idata> 935 <Idata> 936 <Q unit="1/A"> 937 0.0030525 938 </Q> 939 <I unit="1/cm"> 940 1422.7 941 </I> 942 <Qdev unit="1/A"> 943 3.0525e-005 944 </Qdev> 945 <Idev unit="1/cm"> 946 183.59 947 </Idev> 948 </Idata> 949 <Idata> 950 <Q unit="1/A"> 951 0.00333 952 </Q> 953 <I unit="1/cm"> 954 70.932 955 </I> 956 <Qdev unit="1/A"> 957 3.33e-005 958 </Qdev> 959 <Idev unit="1/cm"> 960 16.5 961 </Idev> 962 </Idata> 963 <Idata> 964 <Q unit="1/A"> 965 0.0036075 966 </Q> 967 <I unit="1/cm"> 968 400.33 969 </I> 970 <Qdev unit="1/A"> 971 3.6075e-005 972 </Qdev> 973 <Idev unit="1/cm"> 974 63.21 975 </Idev> 976 </Idata> 977 <Idata> 978 <Q unit="1/A"> 979 0.003885 980 </Q> 981 <I unit="1/cm"> 982 393.52 983 </I> 984 <Qdev unit="1/A"> 985 3.885e-005 986 </Qdev> 987 <Idev unit="1/cm"> 988 659.6 989 </Idev> 990 </Idata> 991 <Idata> 992 <Q unit="1/A"> 993 0.0041625 994 </Q> 995 <I unit="1/cm"> 996 212.31 997 </I> 998 <Qdev unit="1/A"> 999 4.1625e-005 1000 </Qdev> 1001 <Idev unit="1/cm"> 1002 47.277 1003 </Idev> 1004 </Idata> 1005 <Idata> 1006 <Q unit="1/A"> 1007 0.00444 1008 </Q> 1009 <I unit="1/cm"> 1010 39.89 1011 </I> 1012 <Qdev unit="1/A"> 1013 4.44e-005 1014 </Qdev> 1015 <Idev unit="1/cm"> 1016 11.694 1017 </Idev> 1018 </Idata> 1019 <Idata> 1020 <Q unit="1/A"> 1021 0.0047175 1022 </Q> 1023 <I unit="1/cm"> 1024 71.693 1025 </I> 1026 <Qdev unit="1/A"> 1027 4.7175e-005 1028 </Qdev> 1029 <Idev unit="1/cm"> 1030 18.86 1031 </Idev> 1032 </Idata> 1033 <Idata> 1034 <Q unit="1/A"> 1035 0.004995 1036 </Q> 1037 <I unit="1/cm"> 1038 2.5476 1039 </I> 1040 <Qdev unit="1/A"> 1041 4.995e-005 1042 </Qdev> 1043 <Idev unit="1/cm"> 1044 0.77203 1045 </Idev> 1046 </Idata> 1047 <Idata> 1048 <Q unit="1/A"> 1049 0.0052725 1050 </Q> 1051 <I unit="1/cm"> 1052 157.13 1053 </I> 1054 <Qdev unit="1/A"> 1055 5.2725e-005 1056 </Qdev> 1057 <Idev unit="1/cm"> 1058 30.429 1059 </Idev> 8 <Q unit="1/A">7.7457e-05</Q> 9 <I unit="1/cm">8432.04</I> 10 <Idev unit="1/cm">153.745</Idev> 11 <dQw unit="1/A">0.0</dQw> 12 <dQl unit="1/A">0.117</dQl> 13 </Idata> 14 <Idata> 15 <Q unit="1/A">8.3007e-05</Q> 16 <I unit="1/cm">8298.38</I> 17 <Idev unit="1/cm">152.01</Idev> 18 <dQw unit="1/A">0.0</dQw> 19 <dQl unit="1/A">0.117</dQl> 20 </Idata> 21 <Idata> 22 <Q unit="1/A">8.8557e-05</Q> 23 <I unit="1/cm">8091.51</I> 24 <Idev unit="1/cm">149.908</Idev> 25 <dQw unit="1/A">0.0</dQw> 26 <dQl unit="1/A">0.117</dQl> 27 </Idata> 28 <Idata> 29 <Q unit="1/A">9.4107e-05</Q> 30 <I unit="1/cm">7947.7</I> 31 <Idev unit="1/cm">148.184</Idev> 32 <dQw unit="1/A">0.0</dQw> 33 <dQl unit="1/A">0.117</dQl> 34 </Idata> 35 <Idata> 36 <Q unit="1/A">9.9657e-05</Q> 37 <I unit="1/cm">8174.04</I> 38 <Idev unit="1/cm">149.824</Idev> 39 <dQw unit="1/A">0.0</dQw> 40 <dQl unit="1/A">0.117</dQl> 41 </Idata> 42 <Idata> 43 <Q unit="1/A">0.000105207</Q> 44 <I unit="1/cm">7890.52</I> 45 <Idev unit="1/cm">147.061</Idev> 46 <dQw unit="1/A">0.0</dQw> 47 <dQl unit="1/A">0.117</dQl> 48 </Idata> 49 <Idata> 50 <Q unit="1/A">0.000110757</Q> 51 <I unit="1/cm">8067.04</I> 52 <Idev unit="1/cm">74.9155</Idev> 53 <dQw unit="1/A">0.0</dQw> 54 <dQl unit="1/A">0.117</dQl> 55 </Idata> 56 <Idata> 57 <Q unit="1/A">0.000121857</Q> 58 <I unit="1/cm">7995.24</I> 59 <Idev unit="1/cm">74.0244</Idev> 60 <dQw unit="1/A">0.0</dQw> 61 <dQl unit="1/A">0.117</dQl> 62 </Idata> 63 <Idata> 64 <Q unit="1/A">0.000132957</Q> 65 <I unit="1/cm">7969.3</I> 66 <Idev unit="1/cm">73.7818</Idev> 67 <dQw unit="1/A">0.0</dQw> 68 <dQl unit="1/A">0.117</dQl> 69 </Idata> 70 <Idata> 71 <Q unit="1/A">0.000144057</Q> 72 <I unit="1/cm">7953.56</I> 73 <Idev unit="1/cm">73.6532</Idev> 74 <dQw unit="1/A">0.0</dQw> 75 <dQl unit="1/A">0.117</dQl> 76 </Idata> 77 <Idata> 78 <Q unit="1/A">0.000155157</Q> 79 <I unit="1/cm">7896.35</I> 80 <Idev unit="1/cm">73.3392</Idev> 81 <dQw unit="1/A">0.0</dQw> 82 <dQl unit="1/A">0.117</dQl> 83 </Idata> 84 <Idata> 85 <Q unit="1/A">0.000166257</Q> 86 <I unit="1/cm">7877.91</I> 87 <Idev unit="1/cm">73.1936</Idev> 88 <dQw unit="1/A">0.0</dQw> 89 <dQl unit="1/A">0.117</dQl> 90 </Idata> 91 <Idata> 92 <Q unit="1/A">0.000177357</Q> 93 <I unit="1/cm">7769.46</I> 94 <Idev unit="1/cm">72.6739</Idev> 95 <dQw unit="1/A">0.0</dQw> 96 <dQl unit="1/A">0.117</dQl> 97 </Idata> 98 <Idata> 99 <Q unit="1/A">0.000188457</Q> 100 <I unit="1/cm">7746.93</I> 101 <Idev unit="1/cm">72.5899</Idev> 102 <dQw unit="1/A">0.0</dQw> 103 <dQl unit="1/A">0.117</dQl> 104 </Idata> 105 <Idata> 106 <Q unit="1/A">0.000199557</Q> 107 <I unit="1/cm">7820.8</I> 108 <Idev unit="1/cm">72.9063</Idev> 109 <dQw unit="1/A">0.0</dQw> 110 <dQl unit="1/A">0.117</dQl> 111 </Idata> 112 <Idata> 113 <Q unit="1/A">0.000210657</Q> 114 <I unit="1/cm">7656.83</I> 115 <Idev unit="1/cm">72.1007</Idev> 116 <dQw unit="1/A">0.0</dQw> 117 <dQl unit="1/A">0.117</dQl> 118 </Idata> 119 <Idata> 120 <Q unit="1/A">0.000221757</Q> 121 <I unit="1/cm">7777.33</I> 122 <Idev unit="1/cm">72.6551</Idev> 123 <dQw unit="1/A">0.0</dQw> 124 <dQl unit="1/A">0.117</dQl> 125 </Idata> 126 <Idata> 127 <Q unit="1/A">0.000232857</Q> 128 <I unit="1/cm">7613.01</I> 129 <Idev unit="1/cm">71.8768</Idev> 130 <dQw unit="1/A">0.0</dQw> 131 <dQl unit="1/A">0.117</dQl> 132 </Idata> 133 <Idata> 134 <Q unit="1/A">0.000243957</Q> 135 <I unit="1/cm">7498.28</I> 136 <Idev unit="1/cm">71.316</Idev> 137 <dQw unit="1/A">0.0</dQw> 138 <dQl unit="1/A">0.117</dQl> 139 </Idata> 140 <Idata> 141 <Q unit="1/A">0.000255057</Q> 142 <I unit="1/cm">7494.75</I> 143 <Idev unit="1/cm">71.2836</Idev> 144 <dQw unit="1/A">0.0</dQw> 145 <dQl unit="1/A">0.117</dQl> 146 </Idata> 147 <Idata> 148 <Q unit="1/A">0.000266157</Q> 149 <I unit="1/cm">7266.92</I> 150 <Idev unit="1/cm">70.182</Idev> 151 <dQw unit="1/A">0.0</dQw> 152 <dQl unit="1/A">0.117</dQl> 153 </Idata> 154 <Idata> 155 <Q unit="1/A">0.000277257</Q> 156 <I unit="1/cm">7292.37</I> 157 <Idev unit="1/cm">57.4236</Idev> 158 <dQw unit="1/A">0.0</dQw> 159 <dQl unit="1/A">0.117</dQl> 160 </Idata> 161 <Idata> 162 <Q unit="1/A">0.000305007</Q> 163 <I unit="1/cm">7214.55</I> 164 <Idev unit="1/cm">57.0526</Idev> 165 <dQw unit="1/A">0.0</dQw> 166 <dQl unit="1/A">0.117</dQl> 167 </Idata> 168 <Idata> 169 <Q unit="1/A">0.000332757</Q> 170 <I unit="1/cm">7103.18</I> 171 <Idev unit="1/cm">56.5915</Idev> 172 <dQw unit="1/A">0.0</dQw> 173 <dQl unit="1/A">0.117</dQl> 174 </Idata> 175 <Idata> 176 <Q unit="1/A">0.000360507</Q> 177 <I unit="1/cm">6883.81</I> 178 <Idev unit="1/cm">55.7205</Idev> 179 <dQw unit="1/A">0.0</dQw> 180 <dQl unit="1/A">0.117</dQl> 181 </Idata> 182 <Idata> 183 <Q unit="1/A">0.000388257</Q> 184 <I unit="1/cm">6818.14</I> 185 <Idev unit="1/cm">55.4232</Idev> 186 <dQw unit="1/A">0.0</dQw> 187 <dQl unit="1/A">0.117</dQl> 188 </Idata> 189 <Idata> 190 <Q unit="1/A">0.000416007</Q> 191 <I unit="1/cm">6591.98</I> 192 <Idev unit="1/cm">54.4991</Idev> 193 <dQw unit="1/A">0.0</dQw> 194 <dQl unit="1/A">0.117</dQl> 195 </Idata> 196 <Idata> 197 <Q unit="1/A">0.000443757</Q> 198 <I unit="1/cm">6420.5</I> 199 <Idev unit="1/cm">53.7756</Idev> 200 <dQw unit="1/A">0.0</dQw> 201 <dQl unit="1/A">0.117</dQl> 202 </Idata> 203 <Idata> 204 <Q unit="1/A">0.000471507</Q> 205 <I unit="1/cm">6120.15</I> 206 <Idev unit="1/cm">52.5042</Idev> 207 <dQw unit="1/A">0.0</dQw> 208 <dQl unit="1/A">0.117</dQl> 209 </Idata> 210 <Idata> 211 <Q unit="1/A">0.000499257</Q> 212 <I unit="1/cm">5950.12</I> 213 <Idev unit="1/cm">51.7582</Idev> 214 <dQw unit="1/A">0.0</dQw> 215 <dQl unit="1/A">0.117</dQl> 216 </Idata> 217 <Idata> 218 <Q unit="1/A">0.000527007</Q> 219 <I unit="1/cm">5792.76</I> 220 <Idev unit="1/cm">51.0591</Idev> 221 <dQw unit="1/A">0.0</dQw> 222 <dQl unit="1/A">0.117</dQl> 223 </Idata> 224 <Idata> 225 <Q unit="1/A">0.000554757</Q> 226 <I unit="1/cm">5524.39</I> 227 <Idev unit="1/cm">43.2058</Idev> 228 <dQw unit="1/A">0.0</dQw> 229 <dQl unit="1/A">0.117</dQl> 230 </Idata> 231 <Idata> 232 <Q unit="1/A">0.000610257</Q> 233 <I unit="1/cm">5127.92</I> 234 <Idev unit="1/cm">41.599</Idev> 235 <dQw unit="1/A">0.0</dQw> 236 <dQl unit="1/A">0.117</dQl> 237 </Idata> 238 <Idata> 239 <Q unit="1/A">0.000665757</Q> 240 <I unit="1/cm">4753.49</I> 241 <Idev unit="1/cm">40.0733</Idev> 242 <dQw unit="1/A">0.0</dQw> 243 <dQl unit="1/A">0.117</dQl> 244 </Idata> 245 <Idata> 246 <Q unit="1/A">0.000721257</Q> 247 <I unit="1/cm">4355.25</I> 248 <Idev unit="1/cm">38.3487</Idev> 249 <dQw unit="1/A">0.0</dQw> 250 <dQl unit="1/A">0.117</dQl> 251 </Idata> 252 <Idata> 253 <Q unit="1/A">0.000776757</Q> 254 <I unit="1/cm">3878.25</I> 255 <Idev unit="1/cm">36.2076</Idev> 256 <dQw unit="1/A">0.0</dQw> 257 <dQl unit="1/A">0.117</dQl> 258 </Idata> 259 <Idata> 260 <Q unit="1/A">0.000832257</Q> 261 <I unit="1/cm">3471.25</I> 262 <Idev unit="1/cm">34.2637</Idev> 263 <dQw unit="1/A">0.0</dQw> 264 <dQl unit="1/A">0.117</dQl> 265 </Idata> 266 <Idata> 267 <Q unit="1/A">0.000887757</Q> 268 <I unit="1/cm">3022.77</I> 269 <Idev unit="1/cm">31.9597</Idev> 270 <dQw unit="1/A">0.0</dQw> 271 <dQl unit="1/A">0.117</dQl> 272 </Idata> 273 <Idata> 274 <Q unit="1/A">0.000943257</Q> 275 <I unit="1/cm">2600.33</I> 276 <Idev unit="1/cm">29.6463</Idev> 277 <dQw unit="1/A">0.0</dQw> 278 <dQl unit="1/A">0.117</dQl> 279 </Idata> 280 <Idata> 281 <Q unit="1/A">0.000998757</Q> 282 <I unit="1/cm">2309.11</I> 283 <Idev unit="1/cm">27.9459</Idev> 284 <dQw unit="1/A">0.0</dQw> 285 <dQl unit="1/A">0.117</dQl> 286 </Idata> 287 <Idata> 288 <Q unit="1/A">0.00105426</Q> 289 <I unit="1/cm">1975.45</I> 290 <Idev unit="1/cm">25.8603</Idev> 291 <dQw unit="1/A">0.0</dQw> 292 <dQl unit="1/A">0.117</dQl> 293 </Idata> 294 <Idata> 295 <Q unit="1/A">0.00110976</Q> 296 <I unit="1/cm">1701.57</I> 297 <Idev unit="1/cm">21.4532</Idev> 298 <dQw unit="1/A">0.0</dQw> 299 <dQl unit="1/A">0.117</dQl> 300 </Idata> 301 <Idata> 302 <Q unit="1/A">0.00122076</Q> 303 <I unit="1/cm">1156.72</I> 304 <Idev unit="1/cm">17.7038</Idev> 305 <dQw unit="1/A">0.0</dQw> 306 <dQl unit="1/A">0.117</dQl> 307 </Idata> 308 <Idata> 309 <Q unit="1/A">0.00133176</Q> 310 <I unit="1/cm">748.659</I> 311 <Idev unit="1/cm">14.2685</Idev> 312 <dQw unit="1/A">0.0</dQw> 313 <dQl unit="1/A">0.117</dQl> 314 </Idata> 315 <Idata> 316 <Q unit="1/A">0.00144276</Q> 317 <I unit="1/cm">465.515</I> 318 <Idev unit="1/cm">11.2799</Idev> 319 <dQw unit="1/A">0.0</dQw> 320 <dQl unit="1/A">0.117</dQl> 321 </Idata> 322 <Idata> 323 <Q unit="1/A">0.00155376</Q> 324 <I unit="1/cm">252.307</I> 325 <Idev unit="1/cm">8.35705</Idev> 326 <dQw unit="1/A">0.0</dQw> 327 <dQl unit="1/A">0.117</dQl> 328 </Idata> 329 <Idata> 330 <Q unit="1/A">0.00166476</Q> 331 <I unit="1/cm">157.822</I> 332 <Idev unit="1/cm">6.66382</Idev> 333 <dQw unit="1/A">0.0</dQw> 334 <dQl unit="1/A">0.117</dQl> 335 </Idata> 336 <Idata> 337 <Q unit="1/A">0.00177576</Q> 338 <I unit="1/cm">117.146</I> 339 <Idev unit="1/cm">5.78352</Idev> 340 <dQw unit="1/A">0.0</dQw> 341 <dQl unit="1/A">0.117</dQl> 342 </Idata> 343 <Idata> 344 <Q unit="1/A">0.00188676</Q> 345 <I unit="1/cm">93.1465</I> 346 <Idev unit="1/cm">5.19397</Idev> 347 <dQw unit="1/A">0.0</dQw> 348 <dQl unit="1/A">0.117</dQl> 349 </Idata> 350 <Idata> 351 <Q unit="1/A">0.00199776</Q> 352 <I unit="1/cm">103.864</I> 353 <Idev unit="1/cm">5.46342</Idev> 354 <dQw unit="1/A">0.0</dQw> 355 <dQl unit="1/A">0.117</dQl> 356 </Idata> 357 <Idata> 358 <Q unit="1/A">0.00210876</Q> 359 <I unit="1/cm">128.147</I> 360 <Idev unit="1/cm">6.0333</Idev> 361 <dQw unit="1/A">0.0</dQw> 362 <dQl unit="1/A">0.117</dQl> 363 </Idata> 364 <Idata> 365 <Q unit="1/A">0.00221976</Q> 366 <I unit="1/cm">135.96</I> 367 <Idev unit="1/cm">6.20529</Idev> 368 <dQw unit="1/A">0.0</dQw> 369 <dQl unit="1/A">0.117</dQl> 370 </Idata> 371 <Idata> 372 <Q unit="1/A">0.00233076</Q> 373 <I unit="1/cm">138.712</I> 374 <Idev unit="1/cm">6.26599</Idev> 375 <dQw unit="1/A">0.0</dQw> 376 <dQl unit="1/A">0.117</dQl> 377 </Idata> 378 <Idata> 379 <Q unit="1/A">0.00244176</Q> 380 <I unit="1/cm">126.272</I> 381 <Idev unit="1/cm">5.99155</Idev> 382 <dQw unit="1/A">0.0</dQw> 383 <dQl unit="1/A">0.117</dQl> 384 </Idata> 385 <Idata> 386 <Q unit="1/A">0.00255276</Q> 387 <I unit="1/cm">114.46</I> 388 <Idev unit="1/cm">5.72081</Idev> 389 <dQw unit="1/A">0.0</dQw> 390 <dQl unit="1/A">0.117</dQl> 391 </Idata> 392 <Idata> 393 <Q unit="1/A">0.00266376</Q> 394 <I unit="1/cm">74.2613</I> 395 <Idev unit="1/cm">4.67786</Idev> 396 <dQw unit="1/A">0.0</dQw> 397 <dQl unit="1/A">0.117</dQl> 398 </Idata> 399 <Idata> 400 <Q unit="1/A">0.00277476</Q> 401 <I unit="1/cm">72.3794</I> 402 <Idev unit="1/cm">4.62347</Idev> 403 <dQw unit="1/A">0.0</dQw> 404 <dQl unit="1/A">0.117</dQl> 405 </Idata> 406 <Idata> 407 <Q unit="1/A">0.00288576</Q> 408 <I unit="1/cm">47.3385</I> 409 <Idev unit="1/cm">3.82544</Idev> 410 <dQw unit="1/A">0.0</dQw> 411 <dQl unit="1/A">0.117</dQl> 412 </Idata> 413 <Idata> 414 <Q unit="1/A">0.00299676</Q> 415 <I unit="1/cm">36.0379</I> 416 <Idev unit="1/cm">3.40491</Idev> 417 <dQw unit="1/A">0.0</dQw> 418 <dQl unit="1/A">0.117</dQl> 419 </Idata> 420 <Idata> 421 <Q unit="1/A">0.00310776</Q> 422 <I unit="1/cm">30.3854</I> 423 <Idev unit="1/cm">3.17364</Idev> 424 <dQw unit="1/A">0.0</dQw> 425 <dQl unit="1/A">0.117</dQl> 426 </Idata> 427 <Idata> 428 <Q unit="1/A">0.00321876</Q> 429 <I unit="1/cm">24.7429</I> 430 <Idev unit="1/cm">2.92505</Idev> 431 <dQw unit="1/A">0.0</dQw> 432 <dQl unit="1/A">0.117</dQl> 433 </Idata> 434 <Idata> 435 <Q unit="1/A">0.00332976</Q> 436 <I unit="1/cm">28.5101</I> 437 <Idev unit="1/cm">3.09348</Idev> 438 <dQw unit="1/A">0.0</dQw> 439 <dQl unit="1/A">0.117</dQl> 440 </Idata> 441 <Idata> 442 <Q unit="1/A">0.00344076</Q> 443 <I unit="1/cm">27.9635</I> 444 <Idev unit="1/cm">3.06924</Idev> 445 <dQw unit="1/A">0.0</dQw> 446 <dQl unit="1/A">0.117</dQl> 447 </Idata> 448 <Idata> 449 <Q unit="1/A">0.00355176</Q> 450 <I unit="1/cm">33.3649</I> 451 <Idev unit="1/cm">3.29833</Idev> 452 <dQw unit="1/A">0.0</dQw> 453 <dQl unit="1/A">0.117</dQl> 454 </Idata> 455 <Idata> 456 <Q unit="1/A">0.00366276</Q> 457 <I unit="1/cm">35.237</I> 458 <Idev unit="1/cm">3.37337</Idev> 459 <dQw unit="1/A">0.0</dQw> 460 <dQl unit="1/A">0.117</dQl> 461 </Idata> 462 <Idata> 463 <Q unit="1/A">0.00377376</Q> 464 <I unit="1/cm">29.0365</I> 465 <Idev unit="1/cm">3.11578</Idev> 466 <dQw unit="1/A">0.0</dQw> 467 <dQl unit="1/A">0.117</dQl> 468 </Idata> 469 <Idata> 470 <Q unit="1/A">0.00388476</Q> 471 <I unit="1/cm">32.5455</I> 472 <Idev unit="1/cm">3.26424</Idev> 473 <dQw unit="1/A">0.0</dQw> 474 <dQl unit="1/A">0.117</dQl> 475 </Idata> 476 <Idata> 477 <Q unit="1/A">0.00399576</Q> 478 <I unit="1/cm">23.1284</I> 479 <Idev unit="1/cm">2.84982</Idev> 480 <dQw unit="1/A">0.0</dQw> 481 <dQl unit="1/A">0.117</dQl> 482 </Idata> 483 <Idata> 484 <Q unit="1/A">0.00410676</Q> 485 <I unit="1/cm">23.6642</I> 486 <Idev unit="1/cm">2.87489</Idev> 487 <dQw unit="1/A">0.0</dQw> 488 <dQl unit="1/A">0.117</dQl> 489 </Idata> 490 <Idata> 491 <Q unit="1/A">0.00421776</Q> 492 <I unit="1/cm">19.3575</I> 493 <Idev unit="1/cm">2.66567</Idev> 494 <dQw unit="1/A">0.0</dQw> 495 <dQl unit="1/A">0.117</dQl> 496 </Idata> 497 <Idata> 498 <Q unit="1/A">0.00432876</Q> 499 <I unit="1/cm">12.8971</I> 500 <Idev unit="1/cm">2.31662</Idev> 501 <dQw unit="1/A">0.0</dQw> 502 <dQl unit="1/A">0.117</dQl> 503 </Idata> 504 <Idata> 505 <Q unit="1/A">0.00443976</Q> 506 <I unit="1/cm">12.8958</I> 507 <Idev unit="1/cm">2.31647</Idev> 508 <dQw unit="1/A">0.0</dQw> 509 <dQl unit="1/A">0.117</dQl> 510 </Idata> 511 <Idata> 512 <Q unit="1/A">0.00455076</Q> 513 <I unit="1/cm">9.66256</I> 514 <Idev unit="1/cm">2.12012</Idev> 515 <dQw unit="1/A">0.0</dQw> 516 <dQl unit="1/A">0.117</dQl> 517 </Idata> 518 <Idata> 519 <Q unit="1/A">0.00466176</Q> 520 <I unit="1/cm">9.66792</I> 521 <Idev unit="1/cm">2.1208</Idev> 522 <dQw unit="1/A">0.0</dQw> 523 <dQl unit="1/A">0.117</dQl> 524 </Idata> 525 <Idata> 526 <Q unit="1/A">0.00477276</Q> 527 <I unit="1/cm">9.39793</I> 528 <Idev unit="1/cm">2.10354</Idev> 529 <dQw unit="1/A">0.0</dQw> 530 <dQl unit="1/A">0.117</dQl> 531 </Idata> 532 <Idata> 533 <Q unit="1/A">0.00488376</Q> 534 <I unit="1/cm">13.7138</I> 535 <Idev unit="1/cm">2.36412</Idev> 536 <dQw unit="1/A">0.0</dQw> 537 <dQl unit="1/A">0.117</dQl> 538 </Idata> 539 <Idata> 540 <Q unit="1/A">0.00499476</Q> 541 <I unit="1/cm">14.2495</I> 542 <Idev unit="1/cm">2.39427</Idev> 543 <dQw unit="1/A">0.0</dQw> 544 <dQl unit="1/A">0.117</dQl> 545 </Idata> 546 <Idata> 547 <Q unit="1/A">0.00510576</Q> 548 <I unit="1/cm">9.12935</I> 549 <Idev unit="1/cm">2.08632</Idev> 550 <dQw unit="1/A">0.0</dQw> 551 <dQl unit="1/A">0.117</dQl> 552 </Idata> 553 <Idata> 554 <Q unit="1/A">0.00521676</Q> 555 <I unit="1/cm">11.822</I> 556 <Idev unit="1/cm">2.25339</Idev> 557 <dQw unit="1/A">0.0</dQw> 558 <dQl unit="1/A">0.117</dQl> 559 </Idata> 560 <Idata> 561 <Q unit="1/A">0.00532776</Q> 562 <I unit="1/cm">10.7551</I> 563 <Idev unit="1/cm">2.18935</Idev> 564 <dQw unit="1/A">0.0</dQw> 565 <dQl unit="1/A">0.117</dQl> 566 </Idata> 567 <Idata> 568 <Q unit="1/A">0.00543876</Q> 569 <I unit="1/cm">11.8258</I> 570 <Idev unit="1/cm">2.25385</Idev> 571 <dQw unit="1/A">0.0</dQw> 572 <dQl unit="1/A">0.117</dQl> 573 </Idata> 574 <Idata> 575 <Q unit="1/A">0.00554976</Q> 576 <I unit="1/cm">8.04703</I> 577 <Idev unit="1/cm">2.01492</Idev> 578 <dQw unit="1/A">0.0</dQw> 579 <dQl unit="1/A">0.117</dQl> 1060 580 </Idata> 1061 581 </SASdata> 1062 <SASsample >1063 <ID >1064 1065 < /ID>582 <SASsample name=""> 583 <ID/> 584 <thickness unit="mm">1.0</thickness> 585 <transmission>0.84031</transmission> 1066 586 </SASsample> 1067 587 <SASinstrument> 1068 <name> 1069 1070 </name> 588 <name/> 1071 589 <SASsource> 1072 <radiation> 1073 neutron 1074 </radiation> 590 <radiation>neutron</radiation> 591 <wavelength unit="A">2.38</wavelength> 1075 592 </SASsource> 1076 593 <SAScollimation/> 1077 594 <SASdetector> 1078 <name> 1079 BT5 DETECTOR ARRAY 1080 </name> 595 <name/> 1081 596 </SASdetector> 1082 597 </SASinstrument> 1083 <SASprocess> 1084 <name> 1085 1086 </name> 1087 <date> 1088 1089 </date> 1090 <description> 1091 1092 </description> 1093 <SASprocessnote> 1094 Macintosh HD:Users:ajj:Documents:Work:Devel:DANSE:test data:simulated:SIMUL_1000A_sphere_dsm.txt 1095 Chi^2 = 0.998099 PowerLaw m = -4.09 Iterations = 17 1096 0 box smooth passes and 0 smoothing spline passes 1097 CREATED: Wed, May 26, 2010 at 2:43:15 PM 1098 </SASprocessnote> 1099 </SASprocess> 598 <SASnote>free form description of processing</SASnote> 1100 599 <fitting_plug_in version="1.0"> 1101 <filename> 1102 1000A_sphere_dsm.xml 1103 </filename> 1104 <timestamp epoch="1281367930.14"> 1105 Mon Aug 09 11:32:10 2010 1106 </timestamp> 600 <filename>latex_smeared.xml [Oct 07 10:40]</filename> 601 <timestamp epoch="1479496054.62">Fri Nov 18 14:07:34 2016</timestamp> 1107 602 <Attributes> 1108 603 <is_data is_data="True"/> 1109 <group_id group_id=" 1000A_sphere_dsm.xml"/>1110 <data_name data_name=" 1000A_sphere_dsm.xml"/>1111 <data_id data_id=" 1000A_sphere_dsm.xml"/>604 <group_id group_id="latex_smeared.xml [1]"/> 605 <data_name data_name="latex_smeared.xml "/> 606 <data_id data_id="latex_smeared.xml 1479495991.26"/> 1112 607 <name name=""/> 1113 <data_name data_name="1000A_sphere_dsm.xml"/> 1114 <engine_type engine_type="scipy"/> 1115 <qmin qmin="3.0525e-005"/> 1116 <qmax qmax="0.0052725"/> 1117 <npts npts="None"/> 1118 <shape_rbutton shape_rbutton="True"/> 1119 <shape_indep_rbutton shape_indep_rbutton="False"/> 1120 <plugin_rbutton plugin_rbutton="False"/> 1121 <struct_rbutton struct_rbutton="False"/> 1122 <formfactorcombobox formfactorcombobox="0"/> 1123 <structurecombobox structurecombobox="0"/> 1124 <disp_box disp_box="2"/> 1125 <enable_smearer enable_smearer="False"/> 1126 <disable_smearer disable_smearer="True"/> 608 <data_name data_name="latex_smeared.xml "/> 609 <qmin qmin="7.7457e-05"/> 610 <qmax qmax="0.00554976"/> 611 <npts npts="50"/> 612 <categorycombobox categorycombobox="Sphere"/> 613 <formfactorcombobox formfactorcombobox="sphere"/> 614 <structurecombobox structurecombobox="None"/> 615 <multi_factor multi_factor="None"/> 616 <magnetic_on magnetic_on="False"/> 617 <enable_smearer enable_smearer="True"/> 618 <disable_smearer disable_smearer="False"/> 1127 619 <pinhole_smearer pinhole_smearer="False"/> 1128 620 <slit_smearer slit_smearer="False"/> 1129 621 <enable_disp enable_disp="False"/> 1130 622 <disable_disp disable_disp="True"/> 1131 <slit_smearer slit_smearer="False"/> 623 <dI_noweight dI_noweight="False"/> 624 <dI_didata dI_didata="True"/> 625 <dI_sqrdata dI_sqrdata="False"/> 626 <dI_idata dI_idata="False"/> 1132 627 <enable2D enable2D="False"/> 1133 <cb1 cb1=" True"/>1134 <tcChi tcChi=" 86.3"/>1135 <smearer smearer="< DataLoader.qsmearing._BaseSmearer object at 0x03665F30>"/>628 <cb1 cb1="False"/> 629 <tcChi tcChi="24.584"/> 630 <smearer smearer="<sas.sascalc.data_util.qsmearing.PySmear object at 0x18D2ACD0>"/> 1136 631 <smear_type smear_type="None"/> 1137 632 <dq_l dq_l="None"/> 1138 <dq_r dq_r="None"/> 633 <dq_r dq_r="0.0"/> 634 <dx_max dx_max="0.0"/> 635 <dx_min dx_min="0.0"/> 636 <dxl dxl="0.0"/> 637 <dxw dxw=""/> 1139 638 <values/> 1140 639 <weights/> 640 <disp_obj_dict/> 1141 641 <parameters> 1142 <parameter error_displayed="True" error_value=" 1.57" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="background" selected_to_fit="True" unit="[1/cm]" value="-214"/>1143 <parameter error_displayed="True" error_value=" 1.64" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="radius" selected_to_fit="True" unit="[A]" value="1.01e+004"/>1144 <parameter error_displayed=" False" error_value="" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="scale" selected_to_fit="True" unit="" value="0.198"/>1145 <parameter error_displayed="True" error_value=" 0.0537" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="sldSolv" selected_to_fit="True" unit="[1/A^(2)]" value="8.19e-007"/>1146 <parameter error_displayed=" False" error_value="" maximum_displayed="False" maximum_value="" minimum_displayed="False" minimum_value="" name="sldSph" selected_to_fit="True" unit="[1/A^(2)]" value="2.26e-006"/>642 <parameter error_displayed="True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="0" name="scale" selected_to_fit="True" unit="" value="1.7527e-06"/> 643 <parameter error_displayed="True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="background" selected_to_fit="True" unit="1/cm" value="0.060082"/> 644 <parameter error_displayed="True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="sld" selected_to_fit="True" unit="1e-6/Ang^2" value="-705.77"/> 645 <parameter error_displayed="True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="-inf" name="sld_solvent" selected_to_fit="True" unit="1e-6/Ang^2" value="-361.37"/> 646 <parameter error_displayed="True" error_value="NaN" maximum_displayed="True" maximum_value="inf" minimum_displayed="True" minimum_value="0" name="radius" selected_to_fit="True" unit="Ang" value="2462.1"/> 1147 647 </parameters> 648 <str_parameters/> 1148 649 <orientation_parameters/> 1149 650 <dispersity_parameters/> -
src/sas/sascalc/dataloader/readers/cansas_reader.py
r0639476 rbcabf4e 20 20 import inspect 21 21 # For saving individual sections of data 22 from sas.sascalc.dataloader.data_info import Data1D, DataInfo, plottable_1D 23 from sas.sascalc.dataloader.data_info import Collimation, TransmissionSpectrum, Detector, Process, Aperture 24 from sas.sascalc.dataloader.data_info import combine_data_info_with_plottable as combine_data 22 from sas.sascalc.dataloader.data_info import Data1D, Data2D, DataInfo, \ 23 plottable_1D, plottable_2D 24 from sas.sascalc.dataloader.data_info import Collimation, TransmissionSpectrum, \ 25 Detector, Process, Aperture 26 from sas.sascalc.dataloader.data_info import \ 27 combine_data_info_with_plottable as combine_data 25 28 import sas.sascalc.dataloader.readers.xml_reader as xml_reader 26 29 from sas.sascalc.dataloader.readers.xml_reader import XMLreader … … 56 59 The CanSAS reader requires PyXML 0.8.4 or later. 57 60 """ 58 # #CanSAS version - defaults to version 1.061 # CanSAS version - defaults to version 1.0 59 62 cansas_version = "1.0" 60 63 base_ns = "{cansas1d/1.0}" … … 63 66 invalid = True 64 67 frm = "" 65 # #Log messages and errors68 # Log messages and errors 66 69 logging = None 67 70 errors = set() 68 # #Namespace hierarchy for current xml_file object71 # Namespace hierarchy for current xml_file object 69 72 names = None 70 73 ns_list = None 71 # #Temporary storage location for loading multiple data sets in a single file74 # Temporary storage location for loading multiple data sets in a single file 72 75 current_datainfo = None 73 76 current_dataset = None 74 77 current_data1d = None 75 78 data = None 76 # #List of data1D objects to be sent back to SasView79 # List of data1D objects to be sent back to SasView 77 80 output = None 78 # #Wildcards81 # Wildcards 79 82 type = ["XML files (*.xml)|*.xml", "SasView Save Files (*.svs)|*.svs"] 80 # #List of allowed extensions83 # List of allowed extensions 81 84 ext = ['.xml', '.XML', '.svs', '.SVS'] 82 # #Flag to bypass extension check85 # Flag to bypass extension check 83 86 allow_all = True 84 87 … … 220 223 self.parent_class = tagname_original 221 224 if tagname == 'SASdata': 222 self._initialize_new_data_set() 223 ## Recursion step to access data within the group 225 self._initialize_new_data_set(node) 226 if isinstance(self.current_dataset, plottable_2D): 227 x_bins = attr.get("x_bins", "") 228 y_bins = attr.get("y_bins", "") 229 if x_bins is not "" and y_bins is not "": 230 self.current_dataset.shape = (x_bins, y_bins) 231 else: 232 self.current_dataset.shape = () 233 # Recursion step to access data within the group 224 234 self._parse_entry(node, True) 225 235 if tagname == "SASsample": … … 234 244 self.add_intermediate() 235 245 else: 236 data_point, unit = self._get_node_value(node, tagname) 237 238 ## If this is a dataset, store the data appropriately 246 if isinstance(self.current_dataset, plottable_2D): 247 data_point = node.text 248 unit = attr.get('unit', '') 249 else: 250 data_point, unit = self._get_node_value(node, tagname) 251 252 # If this is a dataset, store the data appropriately 239 253 if tagname == 'Run': 240 254 self.current_datainfo.run_name[data_point] = name … … 245 259 self.current_datainfo.notes.append(data_point) 246 260 247 # # I and Q Data248 elif tagname == 'I' :261 # I and Q - 1D data 262 elif tagname == 'I' and isinstance(self.current_dataset, plottable_1D): 249 263 self.current_dataset.yaxis("Intensity", unit) 250 264 self.current_dataset.y = np.append(self.current_dataset.y, data_point) 251 elif tagname == 'Idev' :265 elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_1D): 252 266 self.current_dataset.dy = np.append(self.current_dataset.dy, data_point) 253 267 elif tagname == 'Q': … … 265 279 pass 266 280 267 ## Sample Information 281 # I and Qx, Qy - 2D data 282 elif tagname == 'I' and isinstance(self.current_dataset, plottable_2D): 283 self.current_dataset.yaxis("Intensity", unit) 284 self.current_dataset.data = np.fromstring(data_point, dtype=float, sep=",") 285 elif tagname == 'Idev' and isinstance(self.current_dataset, plottable_2D): 286 self.current_dataset.err_data = np.fromstring(data_point, dtype=float, sep=",") 287 elif tagname == 'Qx': 288 self.current_dataset.xaxis("Qx", unit) 289 self.current_dataset.qx_data = np.fromstring(data_point, dtype=float, sep=",") 290 elif tagname == 'Qy': 291 self.current_dataset.yaxis("Qy", unit) 292 self.current_dataset.qy_data = np.fromstring(data_point, dtype=float, sep=",") 293 elif tagname == 'Qxdev': 294 self.current_dataset.xaxis("Qxdev", unit) 295 self.current_dataset.dqx_data = np.fromstring(data_point, dtype=float, sep=",") 296 elif tagname == 'Qydev': 297 self.current_dataset.yaxis("Qydev", unit) 298 self.current_dataset.dqy_data = np.fromstring(data_point, dtype=float, sep=",") 299 elif tagname == 'Mask': 300 inter = [item == "1" for item in data_point.split(",")] 301 self.current_dataset.mask = np.asarray(inter, dtype=bool) 302 303 # Sample Information 268 304 elif tagname == 'ID' and self.parent_class == 'SASsample': 269 305 self.current_datainfo.sample.ID = data_point … … 299 335 self.current_datainfo.sample.orientation_unit = unit 300 336 301 # #Instrumental Information337 # Instrumental Information 302 338 elif tagname == 'name' and self.parent_class == 'SASinstrument': 303 339 self.current_datainfo.instrument = data_point 304 # #Detector Information340 # Detector Information 305 341 elif tagname == 'name' and self.parent_class == 'SASdetector': 306 342 self.detector.name = data_point … … 347 383 self.detector.orientation.z = data_point 348 384 self.detector.orientation_unit = unit 349 # #Collimation and Aperture385 # Collimation and Aperture 350 386 elif tagname == 'length' and self.parent_class == 'SAScollimation': 351 387 self.collimation.length = data_point … … 366 402 self.collimation.size_unit = unit 367 403 368 # #Process Information404 # Process Information 369 405 elif tagname == 'name' and self.parent_class == 'SASprocess': 370 406 self.process.name = data_point … … 386 422 self.process.term.append(dic) 387 423 388 # #Transmission Spectrum424 # Transmission Spectrum 389 425 elif tagname == 'T' and self.parent_class == 'Tdata': 390 426 self.transspectrum.transmission = np.append(self.transspectrum.transmission, data_point) … … 397 433 self.transspectrum.wavelength_unit = unit 398 434 399 # #Source Information435 # Source Information 400 436 elif tagname == 'wavelength' and (self.parent_class == 'SASsource' or self.parent_class == 'SASData'): 401 437 self.current_datainfo.source.wavelength = data_point … … 424 460 self.current_datainfo.source.beam_shape = data_point 425 461 426 # #Everything else goes in meta_data462 # Everything else goes in meta_data 427 463 else: 428 464 new_key = self._create_unique_key(self.current_datainfo.meta_data, tagname) … … 438 474 self.add_data_set() 439 475 empty = None 440 if self.output[0].dx is not None:441 self.output[0].dxl = np.empty(0)442 self.output[0].dxw = np.empty(0)443 else:444 self.output[0].dx = np.empty(0)445 476 return self.output[0], empty 446 477 … … 514 545 self.current_datainfo = DataInfo() 515 546 516 def _initialize_new_data_set(self, parent_list=None):547 def _initialize_new_data_set(self, node=None): 517 548 """ 518 549 A private class method to generate a new 1D data object. 519 550 Outside methods should call add_data_set() to be sure any existing data is stored properly. 520 551 521 :param parent_list: List of names of parent elements 522 """ 523 524 if parent_list is None: 525 parent_list = [] 552 :param node: XML node to determine if 1D or 2D data 553 """ 526 554 x = np.array(0) 527 555 y = np.array(0) 556 for child in node: 557 if child.tag.replace(self.base_ns, "") == "Idata": 558 for i_child in child: 559 if i_child.tag.replace(self.base_ns, "") == "Qx": 560 self.current_dataset = plottable_2D() 561 return 528 562 self.current_dataset = plottable_1D(x, y) 529 563 … … 560 594 """ 561 595 562 # #Append errors to dataset and reset class errors596 # Append errors to dataset and reset class errors 563 597 self.current_datainfo.errors = set() 564 598 for error in self.errors: … … 566 600 self.errors.clear() 567 601 568 # #Combine all plottables with datainfo and append each to output569 # #Type cast data arrays to float64 and find min/max as appropriate602 # Combine all plottables with datainfo and append each to output 603 # Type cast data arrays to float64 and find min/max as appropriate 570 604 for dataset in self.data: 571 if dataset.x is not None: 572 dataset.x = np.delete(dataset.x, [0]) 573 dataset.x = dataset.x.astype(np.float64) 574 dataset.xmin = np.min(dataset.x) 575 dataset.xmax = np.max(dataset.x) 576 if dataset.y is not None: 577 dataset.y = np.delete(dataset.y, [0]) 578 dataset.y = dataset.y.astype(np.float64) 579 dataset.ymin = np.min(dataset.y) 580 dataset.ymax = np.max(dataset.y) 581 if dataset.dx is not None: 582 dataset.dx = np.delete(dataset.dx, [0]) 583 dataset.dx = dataset.dx.astype(np.float64) 584 if dataset.dxl is not None: 585 dataset.dxl = np.delete(dataset.dxl, [0]) 586 dataset.dxl = dataset.dxl.astype(np.float64) 587 if dataset.dxw is not None: 588 dataset.dxw = np.delete(dataset.dxw, [0]) 589 dataset.dxw = dataset.dxw.astype(np.float64) 590 if dataset.dy is not None: 591 dataset.dy = np.delete(dataset.dy, [0]) 592 dataset.dy = dataset.dy.astype(np.float64) 593 np.trim_zeros(dataset.x) 594 np.trim_zeros(dataset.y) 595 np.trim_zeros(dataset.dy) 605 if isinstance(dataset, plottable_1D): 606 if dataset.x is not None: 607 dataset.x = np.delete(dataset.x, [0]) 608 dataset.x = dataset.x.astype(np.float64) 609 dataset.xmin = np.min(dataset.x) 610 dataset.xmax = np.max(dataset.x) 611 if dataset.y is not None: 612 dataset.y = np.delete(dataset.y, [0]) 613 dataset.y = dataset.y.astype(np.float64) 614 dataset.ymin = np.min(dataset.y) 615 dataset.ymax = np.max(dataset.y) 616 if dataset.dx is not None: 617 dataset.dx = np.delete(dataset.dx, [0]) 618 dataset.dx = dataset.dx.astype(np.float64) 619 if dataset.dxl is not None: 620 dataset.dxl = np.delete(dataset.dxl, [0]) 621 dataset.dxl = dataset.dxl.astype(np.float64) 622 if dataset.dxw is not None: 623 dataset.dxw = np.delete(dataset.dxw, [0]) 624 dataset.dxw = dataset.dxw.astype(np.float64) 625 if dataset.dy is not None: 626 dataset.dy = np.delete(dataset.dy, [0]) 627 dataset.dy = dataset.dy.astype(np.float64) 628 np.trim_zeros(dataset.x) 629 np.trim_zeros(dataset.y) 630 np.trim_zeros(dataset.dy) 631 elif isinstance(dataset, plottable_2D): 632 dataset.data = dataset.data.astype(np.float64) 633 dataset.qx_data = dataset.qx_data.astype(np.float64) 634 dataset.xmin = np.min(dataset.qx_data) 635 dataset.xmax = np.max(dataset.qx_data) 636 dataset.qy_data = dataset.qy_data.astype(np.float64) 637 dataset.ymin = np.min(dataset.qy_data) 638 dataset.ymax = np.max(dataset.qy_data) 639 dataset.q_data = np.sqrt(dataset.qx_data * dataset.qx_data 640 + dataset.qy_data * dataset.qy_data) 641 if dataset.err_data is not None: 642 dataset.err_data = dataset.err_data.astype(np.float64) 643 if dataset.dqx_data is not None: 644 dataset.dqx_data = dataset.dqx_data.astype(np.float64) 645 if dataset.dqy_data is not None: 646 dataset.dqy_data = dataset.dqy_data.astype(np.float64) 647 if dataset.mask is not None: 648 dataset.mask = dataset.mask.astype(dtype=bool) 649 650 if len(dataset.shape) == 2: 651 n_rows, n_cols = dataset.shape 652 dataset.y_bins = dataset.qy_data[0::int(n_cols)] 653 dataset.x_bins = dataset.qx_data[:int(n_cols)] 654 dataset.data = dataset.data.flatten() 655 else: 656 dataset.y_bins = [] 657 dataset.x_bins = [] 658 dataset.data = dataset.data.flatten() 659 596 660 final_dataset = combine_data(dataset, self.current_datainfo) 597 661 self.output.append(final_dataset) … … 693 757 and local_unit.lower() != "none": 694 758 if HAS_CONVERTER == True: 695 # #Check local units - bad units raise KeyError759 # Check local units - bad units raise KeyError 696 760 data_conv_q = Converter(local_unit) 697 761 value_unit = default_unit … … 740 804 A method to check all resolution data sets are the same size as I and Q 741 805 """ 742 dql_exists = False 743 dqw_exists = False 744 dq_exists = False 745 di_exists = False 746 if self.current_dataset.dxl is not None: 747 dql_exists = True 748 if self.current_dataset.dxw is not None: 749 dqw_exists = True 750 if self.current_dataset.dx is not None: 751 dq_exists = True 752 if self.current_dataset.dy is not None: 753 di_exists = True 754 if dqw_exists and not dql_exists: 755 array_size = self.current_dataset.dxw.size - 1 756 self.current_dataset.dxl = np.append(self.current_dataset.dxl, np.zeros([array_size])) 757 elif dql_exists and not dqw_exists: 758 array_size = self.current_dataset.dxl.size - 1 759 self.current_dataset.dxw = np.append(self.current_dataset.dxw, np.zeros([array_size])) 760 elif not dql_exists and not dqw_exists and not dq_exists: 761 array_size = self.current_dataset.x.size - 1 762 self.current_dataset.dx = np.append(self.current_dataset.dx, np.zeros([array_size])) 763 if not di_exists: 764 array_size = self.current_dataset.y.size - 1 765 self.current_dataset.dy = np.append(self.current_dataset.dy, np.zeros([array_size])) 766 806 if isinstance(self.current_dataset, plottable_1D): 807 dql_exists = False 808 dqw_exists = False 809 dq_exists = False 810 di_exists = False 811 if self.current_dataset.dxl is not None: 812 dql_exists = True 813 if self.current_dataset.dxw is not None: 814 dqw_exists = True 815 if self.current_dataset.dx is not None: 816 dq_exists = True 817 if self.current_dataset.dy is not None: 818 di_exists = True 819 if dqw_exists and not dql_exists: 820 array_size = self.current_dataset.dxw.size - 1 821 self.current_dataset.dxl = np.append(self.current_dataset.dxl, 822 np.zeros([array_size])) 823 elif dql_exists and not dqw_exists: 824 array_size = self.current_dataset.dxl.size - 1 825 self.current_dataset.dxw = np.append(self.current_dataset.dxw, 826 np.zeros([array_size])) 827 elif not dql_exists and not dqw_exists and not dq_exists: 828 array_size = self.current_dataset.x.size - 1 829 self.current_dataset.dx = np.append(self.current_dataset.dx, 830 np.zeros([array_size])) 831 if not di_exists: 832 array_size = self.current_dataset.y.size - 1 833 self.current_dataset.dy = np.append(self.current_dataset.dy, 834 np.zeros([array_size])) 835 elif isinstance(self.current_dataset, plottable_2D): 836 dqx_exists = False 837 dqy_exists = False 838 di_exists = False 839 mask_exists = False 840 if self.current_dataset.dqx_data is not None: 841 dqx_exists = True 842 if self.current_dataset.dqy_data is not None: 843 dqy_exists = True 844 if self.current_dataset.err_data is not None: 845 di_exists = True 846 if self.current_dataset.mask is not None: 847 mask_exists = True 848 if not dqy_exists: 849 array_size = self.current_dataset.qy_data.size - 1 850 self.current_dataset.dqy_data = np.append( 851 self.current_dataset.dqy_data, np.zeros([array_size])) 852 if not dqx_exists: 853 array_size = self.current_dataset.qx_data.size - 1 854 self.current_dataset.dqx_data = np.append( 855 self.current_dataset.dqx_data, np.zeros([array_size])) 856 if not di_exists: 857 array_size = self.current_dataset.data.size - 1 858 self.current_dataset.err_data = np.append( 859 self.current_dataset.err_data, np.zeros([array_size])) 860 if not mask_exists: 861 array_size = self.current_dataset.data.size - 1 862 self.current_dataset.mask = np.append( 863 self.current_dataset.mask, 864 np.ones([array_size] ,dtype=bool)) 767 865 768 866 ####### All methods below are for writing CanSAS XML files ####### 769 770 867 771 868 def write(self, filename, datainfo): … … 792 889 :param datainfo: Data1D object 793 890 """ 794 if not issubclass(datainfo.__class__, Data1D): 795 raise RuntimeError, "The cansas writer expects a Data1D instance" 891 is_2d = False 892 if issubclass(datainfo.__class__, Data2D): 893 is_2d = True 796 894 797 895 # Get PIs and create root element … … 813 911 self._write_run_names(datainfo, entry_node) 814 912 # Add Data info to SASEntry 815 self._write_data(datainfo, entry_node) 913 if is_2d: 914 self._write_data_2d(datainfo, entry_node) 915 else: 916 self._write_data(datainfo, entry_node) 816 917 # Transmission Spectrum Info 817 918 self._write_trans_spectrum(datainfo, entry_node) … … 907 1008 def _write_data(self, datainfo, entry_node): 908 1009 """ 909 Writes theI and Q data to the XML file1010 Writes 1D I and Q data to the XML file 910 1011 911 1012 :param datainfo: The Data1D object the information is coming from … … 935 1036 self.write_node(point, "dQl", datainfo.dxl[i], 936 1037 {'unit': datainfo.x_unit}) 1038 1039 def _write_data_2d(self, datainfo, entry_node): 1040 """ 1041 Writes 2D data to the XML file 1042 1043 :param datainfo: The Data2D object the information is coming from 1044 :param entry_node: lxml node ElementTree object to be appended to 1045 """ 1046 attr = {} 1047 if datainfo.data.shape: 1048 attr["x_bins"] = str(len(datainfo.x_bins)) 1049 attr["y_bins"] = str(len(datainfo.y_bins)) 1050 node = self.create_element("SASdata", attr) 1051 self.append(node, entry_node) 1052 1053 point = self.create_element("Idata") 1054 node.append(point) 1055 qx = ','.join([str(datainfo.qx_data[i]) for i in xrange(len(datainfo.qx_data))]) 1056 qy = ','.join([str(datainfo.qy_data[i]) for i in xrange(len(datainfo.qy_data))]) 1057 intensity = ','.join([str(datainfo.data[i]) for i in xrange(len(datainfo.data))]) 1058 1059 self.write_node(point, "Qx", qx, 1060 {'unit': datainfo._xunit}) 1061 self.write_node(point, "Qy", qy, 1062 {'unit': datainfo._yunit}) 1063 self.write_node(point, "I", intensity, 1064 {'unit': datainfo._zunit}) 1065 if datainfo.err_data is not None: 1066 err = ','.join([str(datainfo.err_data[i]) for i in 1067 xrange(len(datainfo.err_data))]) 1068 self.write_node(point, "Idev", err, 1069 {'unit': datainfo._zunit}) 1070 if datainfo.dqy_data is not None: 1071 dqy = ','.join([str(datainfo.dqy_data[i]) for i in 1072 xrange(len(datainfo.dqy_data))]) 1073 self.write_node(point, "Qydev", dqy, 1074 {'unit': datainfo._yunit}) 1075 if datainfo.dqx_data is not None: 1076 dqx = ','.join([str(datainfo.dqx_data[i]) for i in 1077 xrange(len(datainfo.dqx_data))]) 1078 self.write_node(point, "Qxdev", dqx, 1079 {'unit': datainfo._xunit}) 1080 if datainfo.mask is not None: 1081 mask = ','.join( 1082 ["1" if datainfo.mask[i] else "0" 1083 for i in xrange(len(datainfo.mask))]) 1084 self.write_node(point, "Mask", mask) 937 1085 938 1086 def _write_trans_spectrum(self, datainfo, entry_node): -
src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid_v1_0.xsd
r250fec92 raf08e55 24 24 25 25 <complexType name="IdataType"> 26 <xsd:choice> 26 27 <sequence> 27 28 <element name="Q" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> … … 40 41 <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other" /> 41 42 </sequence> 43 <sequence> 44 <element name="Qx" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 45 <element name="Qy" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 46 <element name="I" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 47 <element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 48 <element name="Qydev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 49 <element name="Qxdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 50 <element name="Mask" minOccurs="0" maxOccurs="1" type="string" default="0" /> 51 </sequence> 52 </xsd:choice> 42 53 </complexType> 43 54 … … 51 62 <attribute name="name" type="string" use="optional" default="" /> 52 63 <attribute name="timestamp" type="dateTime" use="optional" /> 64 <attribute name="x_bins" type="string" use="optional" /> 65 <attribute name="y_bins" type="string" use="optional" /> 53 66 </complexType> 54 67 -
src/sas/sascalc/dataloader/readers/schema/cansas1d_invalid_v1_1.xsd
r250fec92 raf08e55 24 24 25 25 <complexType name="IdataType"> 26 <xsd:choice> 26 27 <sequence> 27 28 <element name="Q" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> … … 40 41 <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other" /> 41 42 </sequence> 43 <sequence> 44 <element name="Qx" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 45 <element name="Qy" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 46 <element name="I" minOccurs="1" maxOccurs="1" type="tns:floatUnitType" /> 47 <element name="Idev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 48 <element name="Qydev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 49 <element name="Qxdev" minOccurs="0" maxOccurs="1" type="tns:floatUnitType" default="0" /> 50 <element name="Mask" minOccurs="0" maxOccurs="1" type="string" default="0" /> 51 </sequence> 52 </xsd:choice> 42 53 </complexType> 43 54 … … 51 62 <attribute name="name" type="string" use="optional" default="" /> 52 63 <attribute name="timestamp" type="dateTime" use="optional" /> 64 <attribute name="x_bins" type="string" use="optional" /> 65 <attribute name="y_bins" type="string" use="optional" /> 53 66 </complexType> 54 67 -
src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py
r6ffa0dd rca224b1 134 134 """ 135 135 for group_id in self.plot_panels.keys(): 136 panel = self.plot_panels[group_id] 137 panel.graph.reset() 138 self.hide_panel(group_id) 136 self.clear_panel_by_id(group_id) 139 137 self.plot_panels = {} 140 138 -
src/sas/sasgui/perspectives/fitting/basepage.py
r505706a ra6fccd7 1105 1105 """ 1106 1106 for key, value in self.master_category_dict.iteritems(): 1107 formfactor = state.formfactorcombobox.split(":") 1108 if isinstance(formfactor, list): 1109 formfactor = formfactor[0] 1107 1110 for list_item in value: 1108 if state.formfactorcomboboxin list_item:1111 if formfactor in list_item: 1109 1112 return self.categorybox.Items.index(key) 1110 1113 return 0 … … 1152 1155 self._show_combox_helper() 1153 1156 # select the current model 1154 try: 1155 # to support older version 1156 category_pos = int(state.categorycombobox) 1157 except: 1158 state.formfactorcombobox = state.formfactorcombobox.lower() 1159 state.formfactorcombobox = \ 1160 state.formfactorcombobox.replace('model', '') 1161 state.formfactorcombobox = unicode(state.formfactorcombobox) 1162 state.categorycombobox = unicode(state.categorycombobox) 1163 if state.categorycombobox in self.categorybox.Items: 1164 category_pos = self.categorybox.Items.index( 1165 state.categorycombobox) 1166 else: 1167 # Look in master list for model name (model.lower) 1168 category_pos = self.get_cat_combo_box_pos(state) 1157 state._convert_to_sasmodels() 1158 state.categorycombobox = unicode(state.categorycombobox) 1159 if state.categorycombobox in self.categorybox.Items: 1160 category_pos = self.categorybox.Items.index( 1161 state.categorycombobox) 1162 else: 1163 # Look in master list for model name (model.lower) 1164 category_pos = self.get_cat_combo_box_pos(state) 1169 1165 1170 1166 self.categorybox.Select(category_pos) 1171 1167 self._show_combox(None) 1172 try: 1173 # to support older version 1174 formfactor_pos = int(state.formfactorcombobox) 1175 except: 1176 formfactor_pos = 0 1177 for ind_form in range(self.formfactorbox.GetCount()): 1178 if self.formfactorbox.GetString(ind_form) == \ 1179 (state.formfactorcombobox): 1180 formfactor_pos = int(ind_form) 1168 from models import PLUGIN_NAME_BASE 1169 if self.categorybox.GetValue() == 'Customized Models' \ 1170 and PLUGIN_NAME_BASE not in state.formfactorcombobox: 1171 state.formfactorcombobox = \ 1172 PLUGIN_NAME_BASE + state.formfactorcombobox 1173 formfactor_pos = 0 1174 for ind_form in range(self.formfactorbox.GetCount()): 1175 if self.formfactorbox.GetString(ind_form) == \ 1176 (state.formfactorcombobox): 1177 formfactor_pos = int(ind_form) 1178 break 1179 1180 self.formfactorbox.Select(formfactor_pos) 1181 1182 structfactor_pos = 0 1183 if state.structurecombobox is not None: 1184 state.structurecombobox = unicode(state.structurecombobox) 1185 for ind_struct in range(self.structurebox.GetCount()): 1186 if self.structurebox.GetString(ind_struct) == \ 1187 (state.structurecombobox): 1188 structfactor_pos = int(ind_struct) 1181 1189 break 1182 1183 self.formfactorbox.Select(formfactor_pos)1184 1185 structfactor_pos = 01186 try:1187 # to support older version1188 structfactor_pos = int(state.structurecombobox)1189 except:1190 if state.structurecombobox is not None:1191 state.structurecombobox = unicode(state.structurecombobox)1192 for ind_struct in range(self.structurebox.GetCount()):1193 if self.structurebox.GetString(ind_struct) == \1194 (state.structurecombobox):1195 structfactor_pos = int(ind_struct)1196 break1197 1190 1198 1191 self.structurebox.SetSelection(structfactor_pos) … … 1384 1377 # self.state.struct_rbutton = self.struct_rbutton.GetValue() 1385 1378 # self.state.plugin_rbutton = self.plugin_rbutton.GetValue() 1386 self.state.structurecombobox = self.structurebox.Get Label()1387 self.state.formfactorcombobox = self.formfactorbox.Get Label()1388 self.state.categorycombobox = self.categorybox.Get Label()1379 self.state.structurecombobox = self.structurebox.GetValue() 1380 self.state.formfactorcombobox = self.formfactorbox.GetValue() 1381 self.state.categorycombobox = self.categorybox.GetValue() 1389 1382 1390 1383 # post state to fit panel … … 1587 1580 if len(statelist) == 0 or len(listtorestore) == 0: 1588 1581 return 1589 if len(statelist) != len(listtorestore):1590 return1591 1582 1592 1583 for j in range(len(listtorestore)): 1593 item_page = listtorestore[j] 1594 item_page_info = statelist[j] 1595 # change the state of the check box for simple parameters 1596 if item_page[0] is not None: 1597 item_page[0].SetValue(item_page_info[0]) 1598 if item_page[2] is not None: 1599 item_page[2].SetValue(item_page_info[2]) 1600 if item_page[2].__class__.__name__ == "ComboBox": 1601 if item_page_info[2] in self.model.fun_list: 1602 fun_val = self.model.fun_list[item_page_info[2]] 1603 self.model.setParam(item_page_info[1], fun_val) 1604 if item_page[3] is not None: 1605 # show or hide text +/- 1606 if item_page_info[2]: 1607 item_page[3].Show(True) 1608 else: 1609 item_page[3].Hide() 1610 if item_page[4] is not None: 1611 # show of hide the text crtl for fitting error 1612 if item_page_info[4][0]: 1613 item_page[4].Show(True) 1614 item_page[4].SetValue(item_page_info[4][1]) 1615 else: 1616 item_page[3].Hide() 1617 if item_page[5] is not None: 1618 # show of hide the text crtl for fitting error 1619 item_page[5].Show(item_page_info[5][0]) 1620 item_page[5].SetValue(item_page_info[5][1]) 1621 1622 if item_page[6] is not None: 1623 # show of hide the text crtl for fitting error 1624 item_page[6].Show(item_page_info[6][0]) 1625 item_page[6].SetValue(item_page_info[6][1]) 1584 for param in statelist: 1585 if param[1] == listtorestore[j][1]: 1586 item_page = listtorestore[j] 1587 item_page_info = param 1588 if (item_page_info[1] == "theta" or item_page_info[1] == 1589 "phi") and not self._is_2D(): 1590 break 1591 # change the state of the check box for simple parameters 1592 if item_page[0] is not None: 1593 item_page[0].SetValue(item_page_info[0]) 1594 if item_page[2] is not None: 1595 item_page[2].SetValue(item_page_info[2]) 1596 if item_page[2].__class__.__name__ == "ComboBox": 1597 if item_page_info[2] in self.model.fun_list: 1598 fun_val = self.model.fun_list[item_page_info[2]] 1599 self.model.setParam(item_page_info[1], fun_val) 1600 if item_page[3] is not None: 1601 # show or hide text +/- 1602 if item_page_info[2]: 1603 item_page[3].Show(True) 1604 else: 1605 item_page[3].Hide() 1606 if item_page[4] is not None: 1607 # show of hide the text crtl for fitting error 1608 if item_page_info[4][0]: 1609 item_page[4].Show(True) 1610 item_page[4].SetValue(str(item_page_info[4][1])) 1611 else: 1612 item_page[3].Hide() 1613 if item_page[5] is not None: 1614 # show of hide the text crtl for fitting error 1615 item_page[5].Show(True) 1616 item_page[5].SetValue(str(item_page_info[5][1])) 1617 if item_page[6] is not None: 1618 # show of hide the text crtl for fitting error 1619 item_page[6].Show(True) 1620 item_page[6].SetValue(str(item_page_info[6][1])) 1621 break 1626 1622 1627 1623 def _reset_strparam_state(self, listtorestore, statelist): -
src/sas/sasgui/perspectives/fitting/fitpage.py
r24fd27a ra6fccd7 1190 1190 self.state.slit_smearer = self.slit_smearer.GetValue() 1191 1191 1192 self.state.structurecombobox = self.structurebox.GetLabel() 1193 self.state.formfactorcombobox = self.formfactorbox.GetLabel() 1192 self.state.structurecombobox = self.structurebox.GetValue() 1193 self.state.formfactorcombobox = self.formfactorbox.GetValue() 1194 self.state.categorycombobox = self.categorybox.GetValue() 1194 1195 self.enable_fit_button() 1195 1196 if self.model is not None: -
src/sas/sasgui/perspectives/fitting/models.py
r313c5c9 r0de74af 23 23 PLUGIN_LOG = os.path.join(os.path.expanduser("~"), '.sasview', PLUGIN_DIR, 24 24 "plugins.log") 25 PLUGIN_NAME_BASE = '[plug-in] ' 25 26 26 27 def get_model_python_path(): … … 181 182 try: 182 183 model = load_custom_model(path) 183 model.name = "[plug-in] "+model.name184 model.name = PLUGIN_NAME_BASE + model.name 184 185 plugins[model.name] = model 185 186 except Exception: -
src/sas/sasgui/perspectives/fitting/pagestate.py
rc8e1996 r6d2b50b 25 25 from lxml import etree 26 26 27 from sasmodels import convert 27 28 import sasmodels.weights 28 29 … … 271 272 # store value of chisqr 272 273 self.tcChi = None 274 self.version = (1,0,0) 273 275 274 276 def clone(self): … … 349 351 obj.cb1 = copy.deepcopy(self.cb1) 350 352 obj.smearer = copy.deepcopy(self.smearer) 353 obj.version = copy.deepcopy(self.version) 351 354 352 355 for name, state in self.saved_states.iteritems(): … … 355 358 obj.saved_states[copy_name] = copy_state 356 359 return obj 360 361 def _old_first_model(self): 362 """ 363 Handle save states from 4.0.1 and before where the first item in the 364 selection boxes of category, formfactor and structurefactor were not 365 saved. 366 :return: None 367 """ 368 if self.formfactorcombobox == '': 369 FIRST_FORM = { 370 'Shapes' : 'BCCrystalModel', 371 'Uncategorized' : 'LineModel', 372 'StructureFactor' : 'HardsphereStructure', 373 'Ellipsoid' : 'core_shell_ellipsoid', 374 'Lamellae' : 'lamellar', 375 'Paracrystal' : 'bcc_paracrystal', 376 'Parallelepiped' : 'core_shell_parallelepiped', 377 'Shape Independent' : 'be_polyelectrolyte', 378 'Sphere' : 'adsorbed_layer', 379 'Structure Factor' : 'hardsphere', 380 'Customized Models' : '' 381 } 382 if self.categorycombobox == '': 383 if len(self.parameters) == 3: 384 self.categorycombobox = "Shape-Independent" 385 self.formfactorcombobox = 'PowerLawAbsModel' 386 elif len(self.parameters) == 9: 387 self.categorycombobox = 'Cylinder' 388 self.formfactorcombobox = 'barbell' 389 else: 390 msg = "Save state does not have enough information to load" 391 msg += " the all of the data." 392 logging.warning(msg=msg) 393 else: 394 self.formfactorcombobox = FIRST_FORM[self.categorycombobox] 395 396 @staticmethod 397 def param_remap_to_sasmodels_convert(params, is_string=False): 398 """ 399 Remaps the parameters for sasmodels conversion 400 401 :param params: list of parameters (likely self.parameters) 402 :return: remapped dictionary of parameters 403 """ 404 p = dict() 405 for fittable, name, value, _, uncert, lower, upper, units in params: 406 if not value: 407 value = numpy.nan 408 if not uncert or uncert[1] == '' or uncert[1] == 'None': 409 uncert[0] = False 410 uncert[1] = numpy.nan 411 if not upper or upper[1] == '' or upper[1] == 'None': 412 upper[0] = False 413 upper[1] = numpy.nan 414 if not lower or lower[1] == '' or lower[1] == 'None': 415 lower[0] = False 416 lower[1] = numpy.nan 417 if is_string: 418 p[name] = str(value) 419 else: 420 p[name] = float(value) 421 p[name + ".fittable"] = bool(fittable) 422 p[name + ".std"] = float(uncert[1]) 423 p[name + ".upper"] = float(upper[1]) 424 p[name + ".lower"] = float(lower[1]) 425 p[name + ".units"] = units 426 return p 427 428 @staticmethod 429 def param_remap_from_sasmodels_convert(params): 430 """ 431 Converts {name : value} map back to [] param list 432 :param params: parameter map returned from sasmodels 433 :return: None 434 """ 435 p_map = [] 436 for name, info in params.iteritems(): 437 if ".fittable" in name or ".std" in name or ".upper" in name or \ 438 ".lower" in name or ".units" in name: 439 pass 440 else: 441 fittable = params.get(name + ".fittable", True) 442 std = params.get(name + ".std", '0.0') 443 upper = params.get(name + ".upper", 'inf') 444 lower = params.get(name + ".lower", '-inf') 445 units = params.get(name + ".units") 446 if std is not None and std is not numpy.nan: 447 std = [True, str(std)] 448 else: 449 std = [False, ''] 450 if lower is not None and lower is not numpy.nan: 451 lower = [True, str(lower)] 452 else: 453 lower = [True, '-inf'] 454 if upper is not None and upper is not numpy.nan: 455 upper = [True, str(upper)] 456 else: 457 upper = [True, 'inf'] 458 param_list = [bool(fittable), str(name), str(info), 459 "+/-", std, lower, upper, str(units)] 460 p_map.append(param_list) 461 return p_map 462 463 def _convert_to_sasmodels(self): 464 """ 465 Convert parameters to a form usable by sasmodels converter 466 467 :return: None 468 """ 469 # Create conversion dictionary to send to sasmodels 470 self._old_first_model() 471 p = self.param_remap_to_sasmodels_convert(self.parameters) 472 structurefactor, params = convert.convert_model(self.structurecombobox, 473 p, False, self.version) 474 formfactor, params = convert.convert_model(self.formfactorcombobox, 475 params, False, self.version) 476 if len(self.str_parameters) > 0: 477 str_pars = self.param_remap_to_sasmodels_convert( 478 self.str_parameters, True) 479 formfactor, str_params = convert.convert_model( 480 self.formfactorcombobox, str_pars, False, self.version) 481 for key, value in str_params.iteritems(): 482 params[key] = value 483 484 if self.formfactorcombobox == 'SphericalSLDModel': 485 self.multi_factor += 1 486 self.formfactorcombobox = formfactor 487 self.structurecombobox = structurefactor 488 self.parameters = [] 489 self.parameters = self.param_remap_from_sasmodels_convert(params) 357 490 358 491 def _repr_helper(self, list, rep): … … 682 815 683 816 attr = newdoc.createAttribute("version") 684 attr.nodeValue = '1.0' 817 import sasview 818 attr.nodeValue = sasview.__version__ 819 # attr.nodeValue = '1.0' 685 820 top_element.setAttributeNode(attr) 686 821 … … 875 1010 raise RuntimeError, msg 876 1011 877 if node.get('version') and node.get('version') == '1.0': 1012 if node.get('version'): 1013 # Get the version for model conversion purposes 1014 self.version = tuple(int(e) for e in 1015 str.split(node.get('version'), ".")) 1016 # The tuple must be at least 3 items long 1017 while len(self.version) < 3: 1018 ver_list = list(self.version) 1019 ver_list.append(0) 1020 self.version = tuple(ver_list) 878 1021 879 1022 # Get file name … … 1033 1176 if self.cansas: 1034 1177 return self._read_cansas(path) 1035 1036 def _data2d_to_xml_doc(self, datainfo):1037 """1038 Create an XML document to contain the content of a Data2D1039 1040 :param datainfo: Data2D object1041 1042 """1043 if not issubclass(datainfo.__class__, Data2D):1044 raise RuntimeError, "The cansas writer expects a Data2D instance"1045 1046 title = "cansas1d/%s" % self.version1047 title += "http://svn.smallangles.net/svn/canSAS/1dwg/trunk/cansas1d.xsd"1048 doc = xml.dom.minidom.Document()1049 main_node = doc.createElement("SASroot")1050 main_node.setAttribute("version", self.version)1051 main_node.setAttribute("xmlns", "cansas1d/%s" % self.version)1052 main_node.setAttribute("xmlns:xsi",1053 "http://www.w3.org/2001/XMLSchema-instance")1054 main_node.setAttribute("xsi:schemaLocation", title)1055 1056 doc.appendChild(main_node)1057 1058 entry_node = doc.createElement("SASentry")1059 main_node.appendChild(entry_node)1060 1061 write_node(doc, entry_node, "Title", datainfo.title)1062 if datainfo is not None:1063 write_node(doc, entry_node, "data_class",1064 datainfo.__class__.__name__)1065 for item in datainfo.run:1066 runname = {}1067 if item in datainfo.run_name and \1068 len(str(datainfo.run_name[item])) > 1:1069 runname = {'name': datainfo.run_name[item]}1070 write_node(doc, entry_node, "Run", item, runname)1071 # Data info1072 new_node = doc.createElement("SASdata")1073 entry_node.appendChild(new_node)1074 for item in LIST_OF_DATA_2D_ATTR:1075 element = doc.createElement(item[0])1076 element.setAttribute(item[0], str(getattr(datainfo, item[1])))1077 new_node.appendChild(element)1078 1079 for item in LIST_OF_DATA_2D_VALUES:1080 root_node = doc.createElement(item[0])1081 new_node.appendChild(root_node)1082 temp_list = getattr(datainfo, item[1])1083 1084 if temp_list is None or len(temp_list) == 0:1085 element = doc.createElement(item[0])1086 element.appendChild(doc.createTextNode(str(temp_list)))1087 root_node.appendChild(element)1088 else:1089 for value in temp_list:1090 element = doc.createElement(item[0])1091 element.setAttribute(item[0], str(value))1092 root_node.appendChild(element)1093 1094 # Sample info1095 sample = doc.createElement("SASsample")1096 if datainfo.sample.name is not None:1097 sample.setAttribute("name", str(datainfo.sample.name))1098 entry_node.appendChild(sample)1099 write_node(doc, sample, "ID", str(datainfo.sample.ID))1100 write_node(doc, sample, "thickness", datainfo.sample.thickness,1101 {"unit": datainfo.sample.thickness_unit})1102 write_node(doc, sample, "transmission", datainfo.sample.transmission)1103 write_node(doc, sample, "temperature", datainfo.sample.temperature,1104 {"unit": datainfo.sample.temperature_unit})1105 1106 for item in datainfo.sample.details:1107 write_node(doc, sample, "details", item)1108 1109 pos = doc.createElement("position")1110 written = write_node(doc, pos, "x", datainfo.sample.position.x,1111 {"unit": datainfo.sample.position_unit})1112 written = written | write_node(doc, pos, "y",1113 datainfo.sample.position.y,1114 {"unit": datainfo.sample.position_unit})1115 written = written | write_node(doc, pos, "z",1116 datainfo.sample.position.z,1117 {"unit": datainfo.sample.position_unit})1118 if written:1119 sample.appendChild(pos)1120 1121 ori = doc.createElement("orientation")1122 written = write_node(doc, ori, "roll", datainfo.sample.orientation.x,1123 {"unit": datainfo.sample.orientation_unit})1124 written = written | write_node(doc, ori, "pitch",1125 datainfo.sample.orientation.y,1126 {"unit":1127 datainfo.sample.orientation_unit})1128 written = written | write_node(doc, ori, "yaw",1129 datainfo.sample.orientation.z,1130 {"unit":1131 datainfo.sample.orientation_unit})1132 if written:1133 sample.appendChild(ori)1134 1135 # Instrument info1136 instr = doc.createElement("SASinstrument")1137 entry_node.appendChild(instr)1138 1139 write_node(doc, instr, "name", datainfo.instrument)1140 1141 # Source1142 source = doc.createElement("SASsource")1143 if datainfo.source.name is not None:1144 source.setAttribute("name", str(datainfo.source.name))1145 instr.appendChild(source)1146 1147 write_node(doc, source, "radiation", datainfo.source.radiation)1148 write_node(doc, source, "beam_shape", datainfo.source.beam_shape)1149 size = doc.createElement("beam_size")1150 if datainfo.source.beam_size_name is not None:1151 size.setAttribute("name", str(datainfo.source.beam_size_name))1152 written = write_node(doc, size, "x", datainfo.source.beam_size.x,1153 {"unit": datainfo.source.beam_size_unit})1154 written = written | write_node(doc, size, "y",1155 datainfo.source.beam_size.y,1156 {"unit": datainfo.source.beam_size_unit})1157 written = written | write_node(doc, size, "z",1158 datainfo.source.beam_size.z,1159 {"unit": datainfo.source.beam_size_unit})1160 if written:1161 source.appendChild(size)1162 1163 write_node(doc, source, "wavelength", datainfo.source.wavelength,1164 {"unit": datainfo.source.wavelength_unit})1165 write_node(doc, source, "wavelength_min",1166 datainfo.source.wavelength_min,1167 {"unit": datainfo.source.wavelength_min_unit})1168 write_node(doc, source, "wavelength_max",1169 datainfo.source.wavelength_max,1170 {"unit": datainfo.source.wavelength_max_unit})1171 write_node(doc, source, "wavelength_spread",1172 datainfo.source.wavelength_spread,1173 {"unit": datainfo.source.wavelength_spread_unit})1174 1175 # Collimation1176 for item in datainfo.collimation:1177 coll = doc.createElement("SAScollimation")1178 if item.name is not None:1179 coll.setAttribute("name", str(item.name))1180 instr.appendChild(coll)1181 1182 write_node(doc, coll, "length", item.length,1183 {"unit": item.length_unit})1184 1185 for apert in item.aperture:1186 ap = doc.createElement("aperture")1187 if apert.name is not None:1188 ap.setAttribute("name", str(apert.name))1189 if apert.type is not None:1190 ap.setAttribute("type", str(apert.type))1191 coll.appendChild(ap)1192 1193 write_node(doc, ap, "distance", apert.distance,1194 {"unit": apert.distance_unit})1195 1196 size = doc.createElement("size")1197 if apert.size_name is not None:1198 size.setAttribute("name", str(apert.size_name))1199 written = write_node(doc, size, "x", apert.size.x,1200 {"unit": apert.size_unit})1201 written = written | write_node(doc, size, "y", apert.size.y,1202 {"unit": apert.size_unit})1203 written = written | write_node(doc, size, "z", apert.size.z,1204 {"unit": apert.size_unit})1205 if written:1206 ap.appendChild(size)1207 1208 # Detectors1209 for item in datainfo.detector:1210 det = doc.createElement("SASdetector")1211 written = write_node(doc, det, "name", item.name)1212 written = written | write_node(doc, det, "SDD", item.distance,1213 {"unit": item.distance_unit})1214 written = written | write_node(doc, det, "slit_length",1215 item.slit_length,1216 {"unit": item.slit_length_unit})1217 if written:1218 instr.appendChild(det)1219 1220 off = doc.createElement("offset")1221 written = write_node(doc, off, "x", item.offset.x,1222 {"unit": item.offset_unit})1223 written = written | write_node(doc, off, "y", item.offset.y,1224 {"unit": item.offset_unit})1225 written = written | write_node(doc, off, "z", item.offset.z,1226 {"unit": item.offset_unit})1227 if written:1228 det.appendChild(off)1229 1230 center = doc.createElement("beam_center")1231 written = write_node(doc, center, "x", item.beam_center.x,1232 {"unit": item.beam_center_unit})1233 written = written | write_node(doc, center, "y",1234 item.beam_center.y,1235 {"unit": item.beam_center_unit})1236 written = written | write_node(doc, center, "z",1237 item.beam_center.z,1238 {"unit": item.beam_center_unit})1239 if written:1240 det.appendChild(center)1241 1242 pix = doc.createElement("pixel_size")1243 written = write_node(doc, pix, "x", item.pixel_size.x,1244 {"unit": item.pixel_size_unit})1245 written = written | write_node(doc, pix, "y", item.pixel_size.y,1246 {"unit": item.pixel_size_unit})1247 written = written | write_node(doc, pix, "z", item.pixel_size.z,1248 {"unit": item.pixel_size_unit})1249 if written:1250 det.appendChild(pix)1251 1252 ori = doc.createElement("orientation")1253 written = write_node(doc, ori, "roll", item.orientation.x,1254 {"unit": item.orientation_unit})1255 written = written | write_node(doc, ori, "pitch",1256 item.orientation.y,1257 {"unit": item.orientation_unit})1258 written = written | write_node(doc, ori, "yaw", item.orientation.z,1259 {"unit": item.orientation_unit})1260 if written:1261 det.appendChild(ori)1262 1263 # Processes info1264 for item in datainfo.process:1265 node = doc.createElement("SASprocess")1266 entry_node.appendChild(node)1267 1268 write_node(doc, node, "name", item.name)1269 write_node(doc, node, "date", item.date)1270 write_node(doc, node, "description", item.description)1271 for term in item.term:1272 value = term['value']1273 del term['value']1274 write_node(doc, node, "term", value, term)1275 for note in item.notes:1276 write_node(doc, node, "SASprocessnote", note)1277 # Return the document, and the SASentry node associated with1278 # the data we just wrote1279 return doc, entry_node1280 1178 1281 1179 def _parse_state(self, entry): … … 1354 1252 """ 1355 1253 node = dom.xpath('ns:data_class', namespaces={'ns': CANSAS_NS}) 1356 if not node or node[0].text.lstrip().rstrip() != "Data2D": 1357 return_value, _ = self._parse_entry(dom) 1358 numpy.trim_zeros(return_value.x) 1359 numpy.trim_zeros(return_value.y) 1360 numpy.trim_zeros(return_value.dy) 1361 size_dx = return_value.dx.size 1362 size_dxl = return_value.dxl.size 1363 size_dxw = return_value.dxw.size 1364 if size_dxl == 0 and size_dxw == 0: 1365 return_value.dxl = None 1366 return_value.dxw = None 1367 numpy.trim_zeros(return_value.dx) 1368 elif size_dx == 0: 1369 return_value.dx = None 1370 size_dx = size_dxl 1371 numpy.trim_zeros(return_value.dxl) 1372 numpy.trim_zeros(return_value.dxw) 1373 1374 return return_value, _ 1375 1376 # Parse 2D 1377 data_info = Data2D() 1378 1379 # Look up title 1380 self._store_content('ns:Title', dom, 'title', data_info) 1381 1382 # Look up run number 1383 nodes = dom.xpath('ns:Run', namespaces={'ns': CANSAS_NS}) 1384 for item in nodes: 1385 if item.text is not None: 1386 value = item.text.strip() 1387 if len(value) > 0: 1388 data_info.run.append(value) 1389 if item.get('name') is not None: 1390 data_info.run_name[value] = item.get('name') 1391 1392 # Look up instrument name 1393 self._store_content('ns:SASinstrument/ns:name', dom, 1394 'instrument', data_info) 1395 1396 # Notes 1397 note_list = dom.xpath('ns:SASnote', namespaces={'ns': CANSAS_NS}) 1398 for note in note_list: 1399 try: 1400 if note.text is not None: 1401 note_value = note.text.strip() 1402 if len(note_value) > 0: 1403 data_info.notes.append(note_value) 1404 except Exception: 1405 err_mess = "cansas_reader.read: error processing entry notes\n" 1406 err_mess += " %s" % sys.exc_value 1407 self.errors.append(err_mess) 1408 logging.error(err_mess) 1409 1410 # Sample info ################### 1411 entry = get_content('ns:SASsample', dom) 1412 if entry is not None: 1413 data_info.sample.name = entry.get('name') 1414 1415 self._store_content('ns:SASsample/ns:ID', dom, 'ID', data_info.sample) 1416 self._store_float('ns:SASsample/ns:thickness', dom, 'thickness', 1417 data_info.sample) 1418 self._store_float('ns:SASsample/ns:transmission', dom, 'transmission', 1419 data_info.sample) 1420 self._store_float('ns:SASsample/ns:temperature', dom, 'temperature', 1421 data_info.sample) 1422 1423 nodes = dom.xpath('ns:SASsample/ns:details', 1424 namespaces={'ns': CANSAS_NS}) 1425 for item in nodes: 1426 try: 1427 if item.text is not None: 1428 detail_value = item.text.strip() 1429 if len(detail_value) > 0: 1430 data_info.sample.details.append(detail_value) 1431 except Exception: 1432 err_mess = "cansas_reader.read: error processing entry notes\n" 1433 err_mess += " %s" % sys.exc_value 1434 self.errors.append(err_mess) 1435 logging.error(err_mess) 1436 1437 # Position (as a vector) 1438 self._store_float('ns:SASsample/ns:position/ns:x', dom, 'position.x', 1439 data_info.sample) 1440 self._store_float('ns:SASsample/ns:position/ns:y', dom, 'position.y', 1441 data_info.sample) 1442 self._store_float('ns:SASsample/ns:position/ns:z', dom, 'position.z', 1443 data_info.sample) 1444 1445 # Orientation (as a vector) 1446 self._store_float('ns:SASsample/ns:orientation/ns:roll', 1447 dom, 'orientation.x', data_info.sample) 1448 self._store_float('ns:SASsample/ns:orientation/ns:pitch', 1449 dom, 'orientation.y', data_info.sample) 1450 self._store_float('ns:SASsample/ns:orientation/ns:yaw', 1451 dom, 'orientation.z', data_info.sample) 1452 1453 # Source info ################### 1454 entry = get_content('ns:SASinstrument/ns:SASsource', dom) 1455 if entry is not None: 1456 data_info.source.name = entry.get('name') 1457 1458 self._store_content('ns:SASinstrument/ns:SASsource/ns:radiation', 1459 dom, 'radiation', data_info.source) 1460 self._store_content('ns:SASinstrument/ns:SASsource/ns:beam_shape', 1461 dom, 'beam_shape', data_info.source) 1462 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength', 1463 dom, 'wavelength', data_info.source) 1464 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_min', 1465 dom, 'wavelength_min', data_info.source) 1466 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_max', 1467 dom, 'wavelength_max', data_info.source) 1468 self._store_float('ns:SASinstrument/ns:SASsource/ns:wavelength_spread', 1469 dom, 'wavelength_spread', data_info.source) 1470 1471 # Beam size (as a vector) 1472 entry = get_content('ns:SASinstrument/ns:SASsource/ns:beam_size', dom) 1473 if entry is not None: 1474 data_info.source.beam_size_name = entry.get('name') 1475 1476 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:x', 1477 dom, 'beam_size.x', data_info.source) 1478 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:y', 1479 dom, 'beam_size.y', data_info.source) 1480 self._store_float('ns:SASinstrument/ns:SASsource/ns:beam_size/ns:z', 1481 dom, 'beam_size.z', data_info.source) 1482 1483 # Collimation info ################### 1484 nodes = dom.xpath('ns:SASinstrument/ns:SAScollimation', 1485 namespaces={'ns': CANSAS_NS}) 1486 for item in nodes: 1487 collim = Collimation() 1488 if item.get('name') is not None: 1489 collim.name = item.get('name') 1490 self._store_float('ns:length', item, 'length', collim) 1491 1492 # Look for apertures 1493 apert_list = item.xpath('ns:aperture', 1494 namespaces={'ns': CANSAS_NS}) 1495 for apert in apert_list: 1496 aperture = Aperture() 1497 1498 # Get the name and type of the aperture 1499 aperture.name = apert.get('name') 1500 aperture.type = apert.get('type') 1501 1502 self._store_float('ns:distance', apert, 'distance', aperture) 1503 1504 entry = get_content('ns:size', apert) 1505 if entry is not None: 1506 aperture.size_name = entry.get('name') 1507 1508 self._store_float('ns:size/ns:x', apert, 'size.x', aperture) 1509 self._store_float('ns:size/ns:y', apert, 'size.y', aperture) 1510 self._store_float('ns:size/ns:z', apert, 'size.z', aperture) 1511 1512 collim.aperture.append(aperture) 1513 1514 data_info.collimation.append(collim) 1515 1516 # Detector info ###################### 1517 nodes = dom.xpath('ns:SASinstrument/ns:SASdetector', 1518 namespaces={'ns': CANSAS_NS}) 1519 for item in nodes: 1520 1521 detector = Detector() 1522 1523 self._store_content('ns:name', item, 'name', detector) 1524 self._store_float('ns:SDD', item, 'distance', detector) 1525 1526 # Detector offset (as a vector) 1527 self._store_float('ns:offset/ns:x', item, 'offset.x', detector) 1528 self._store_float('ns:offset/ns:y', item, 'offset.y', detector) 1529 self._store_float('ns:offset/ns:z', item, 'offset.z', detector) 1530 1531 # Detector orientation (as a vector) 1532 self._store_float('ns:orientation/ns:roll', item, 1533 'orientation.x', detector) 1534 self._store_float('ns:orientation/ns:pitch', item, 1535 'orientation.y', detector) 1536 self._store_float('ns:orientation/ns:yaw', item, 1537 'orientation.z', detector) 1538 1539 # Beam center (as a vector) 1540 self._store_float('ns:beam_center/ns:x', item, 1541 'beam_center.x', detector) 1542 self._store_float('ns:beam_center/ns:y', item, 1543 'beam_center.y', detector) 1544 self._store_float('ns:beam_center/ns:z', item, 1545 'beam_center.z', detector) 1546 1547 # Pixel size (as a vector) 1548 self._store_float('ns:pixel_size/ns:x', item, 1549 'pixel_size.x', detector) 1550 self._store_float('ns:pixel_size/ns:y', item, 1551 'pixel_size.y', detector) 1552 self._store_float('ns:pixel_size/ns:z', item, 1553 'pixel_size.z', detector) 1554 1555 self._store_float('ns:slit_length', item, 'slit_length', detector) 1556 1557 data_info.detector.append(detector) 1558 1559 # Processes info ###################### 1560 nodes = dom.xpath('ns:SASprocess', namespaces={'ns': CANSAS_NS}) 1561 for item in nodes: 1562 process = Process() 1563 self._store_content('ns:name', item, 'name', process) 1564 self._store_content('ns:date', item, 'date', process) 1565 self._store_content('ns:description', item, 'description', process) 1566 1567 term_list = item.xpath('ns:term', namespaces={'ns': CANSAS_NS}) 1568 for term in term_list: 1569 try: 1570 term_attr = {} 1571 for attr in term.keys(): 1572 term_attr[attr] = term.get(attr).strip() 1573 if term.text is not None: 1574 term_attr['value'] = term.text.strip() 1575 process.term.append(term_attr) 1576 except: 1577 err_mess = "cansas_reader.read: error processing " 1578 err_mess += "entry notes\n %s" % sys.exc_value 1579 self.errors.append(err_mess) 1580 logging.error(err_mess) 1581 1582 note_list = item.xpath('ns:SASprocessnote', 1583 namespaces={'ns': CANSAS_NS}) 1584 for note in note_list: 1585 if note.text is not None: 1586 process.notes.append(note.text.strip()) 1587 1588 data_info.process.append(process) 1589 1590 # Data info ###################### 1591 nodes = dom.xpath('ns:SASdata', namespaces={'ns': CANSAS_NS}) 1592 if len(nodes) > 1: 1593 raise RuntimeError, "CanSAS reader is not compatible with" + \ 1594 " multiple SASdata entries" 1595 1596 for entry in nodes: 1597 for item in LIST_OF_DATA_2D_ATTR: 1598 # get node 1599 node = get_content('ns:%s' % item[0], entry) 1600 setattr(data_info, item[1], parse_entry_helper(node, item)) 1601 1602 for item in LIST_OF_DATA_2D_VALUES: 1603 field = get_content('ns:%s' % item[0], entry) 1604 value_list = [] 1605 if field is not None: 1606 value_list = \ 1607 [parse_entry_helper(node, item) for node in field] 1608 if len(value_list) < 2: 1609 setattr(data_info, item[0], None) 1610 else: 1611 setattr(data_info, item[0], numpy.array(value_list)) 1612 1613 return data_info 1254 return_value, _ = self._parse_entry(dom) 1255 return return_value, _ 1614 1256 1615 1257 def _read_cansas(self, path): … … 1692 1334 name = original_fname 1693 1335 state.data.group_id = name 1336 state.version = fitstate.version 1694 1337 # store state in fitting 1695 1338 self.call_back(state=state, … … 1745 1388 state.data.run_name[0] = state.data.name 1746 1389 1747 if issubclass(state.data.__class__, 1748 sas.sascalc.dataloader.data_info.Data1D): 1749 data = state.data 1750 doc, sasentry = self._to_xml_doc(data) 1751 else: 1752 data = state.data 1753 doc, sasentry = self._data2d_to_xml_doc(data) 1390 data = state.data 1391 doc, sasentry = self._to_xml_doc(data) 1754 1392 1755 1393 if state is not None: -
src/sas/sasgui/perspectives/invariant/invariant_state.py
rcb93b40 rdb5294e 423 423 for item in DEFAULT_STATE: 424 424 input_field = get_content('ns:%s' % item, entry) 425 val = str(input_field.text.strip()) 425 if input_field.text is not None: 426 val = str(input_field.text.strip()) 427 else: 428 val = '' 426 429 if input_field is not None: 427 430 temp_state[item] = val … … 433 436 for item in DEFAULT_STATE: 434 437 input_field = get_content('ns:%s' % item, entry) 435 val = str(input_field.text.strip()) 438 if input_field.text is not None: 439 val = str(input_field.text.strip()) 440 else: 441 val = '' 436 442 if input_field is not None: 437 443 self.set_saved_state(name=item, value=val) -
.gitignore
r5dd7499 r51f1c347 14 14 .vagrant 15 15 .idea 16 .settings/ 16 17 build 17 18 dist -
docs/sphinx-docs/source/conf.py
r9a182b2 r220b1e7 53 53 # General information about the project. 54 54 project = u'SasView' 55 copyright = u'201 5, The SasView Project'55 copyright = u'2017, The SasView Project' 56 56 57 57 # The version info for the project you're documenting, acts as replacement for … … 60 60 # 61 61 # The short X.Y version. 62 version = '4. 0'62 version = '4.1' 63 63 # The full version, including alpha/beta/rc tags. 64 release = '4. 0.0'64 release = '4.1.0' 65 65 66 66 # The language for content autogenerated by Sphinx. Refer to documentation -
sasview/README.txt
r9a182b2 r220b1e7 4 4 1- Features 5 5 =========== 6 - New in Version 4.0.1 7 ------------------ 8 This release fixes the critical bug #750 in P(Q)*S(Q). Most damaging 9 it appears that the background term was being added to S(Q) prior to 10 multiplication by P(Q). 11 12 6 13 - New in Version 4.0 7 14 ------------------ -
sasview/__init__.py
r9a182b2 r220b1e7 1 __version__ = "4. 0"1 __version__ = "4.1" 2 2 __build__ = "GIT_COMMIT" 3 3 try: -
sasview/custom_config.py
r79492222 r73cbeec 15 15 TOOLBAR_SHOW = True 16 16 DEFAULT_PERSPECTIVE = "Fitting" 17 SAS_OPENCL = "None" -
sasview/local_config.py
r49e000b r73cbeec 97 97 GUIFRAME_WIDTH = 1150 98 98 GUIFRAME_HEIGHT = 840 99 PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.c or']99 PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf'] 100 100 PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv', 101 101 'Invariant files (*.inv)|*.inv', 102 102 'P(r) files (*.prv)|*.prv', 103 'Corfunc files (*.c or)|*.cor']103 'Corfunc files (*.crf)|*.crf'] 104 104 PLOPANEL_WIDTH = 415 105 105 PLOPANEL_HEIGTH = 370 … … 140 140 UPDATE_TIMEOUT = 2 141 141 142 #OpenCL option 143 SAS_OPENCL = None 144 142 145 def printEVT(message): 143 146 if __EVT_DEBUG__: -
src/sas/sascalc/file_converter/c_ext/bsl_loader.c
rdc8a553 r2ab9c432 1 1 #include <Python.h> 2 //#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION 2 3 #include <numpy/arrayobject.h> 3 4 #include <stdio.h> … … 21 22 static PyObject *CLoader_init(CLoader *self, PyObject *args, PyObject *kwds) { 22 23 const char *filename; 23 constint n_frames;24 constint n_pixels;25 constint n_rasters;26 constint swap_bytes;24 int n_frames; 25 int n_pixels; 26 int n_rasters; 27 int swap_bytes; 27 28 28 29 if (self != NULL) { -
src/sas/sasgui/guiframe/customdir.py
r212bfc2 r73cbeec 34 34 if not os.path.isfile(config_file): 35 35 shutil.copyfile(os.path.join(path, "custom_config.py"), config_file) 36 37 #Adding SAS_OPENCL if it doesn't exist in the config file 38 # - to support backcompability 39 if not "SAS_OPENCL" in open(config_file).read(): 40 open(config_file,"a+").write("SAS_OPENCL = \"None\"\n") 36 41 except: 37 42 # Check for data path next to exe/zip file. -
src/sas/sasgui/guiframe/gui_manager.py
r505706a r73cbeec 152 152 SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT 153 153 SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME 154 SAS_OPENCL = config.SAS_OPENCL 154 155 if not WELCOME_PANEL_ON: 155 156 WELCOME_PANEL_SHOW = False … … 176 177 else: 177 178 DEFAULT_OPEN_FOLDER = PATH_APP 179 SAS_OPENCL = custom_config.SAS_OPENCL 178 180 except: 179 181 DATALOADER_SHOW = True … … 190 192 CLEANUP_PLOT = False 191 193 DEFAULT_OPEN_FOLDER = PATH_APP 192 194 SAS_OPENCL = None 193 195 DEFAULT_STYLE = config.DEFAULT_STYLE 194 196 … … 225 227 CHILD_FRAME = wx.Frame 226 228 229 #Initiliaze enviromental variable with custom setting but only if variable not set 230 if SAS_OPENCL and not "SAS_OPENCL" in os.environ: 231 os.environ["SAS_OPENCL"] = SAS_OPENCL 227 232 228 233 class ViewerFrame(PARENT_FRAME): … … 2104 2109 Quit the application 2105 2110 """ 2111 #IF SAS_OPENCL is set, settings are stored in the custom config file 2112 self._write_opencl_config_file() 2106 2113 logging.info(" --- SasView session was closed --- \n") 2107 2114 wx.Exit() 2108 2115 sys.exit() 2116 2117 def _write_opencl_config_file(self): 2118 """ 2119 Writes OpenCL settings to custom config file, so they can be remmbered 2120 from session to session 2121 """ 2122 if custom_config is not None: 2123 sas_opencl = os.environ.get("SAS_OPENCL",None) 2124 new_config_lines = [] 2125 config_file = open(custom_config.__file__) 2126 config_lines = config_file.readlines() 2127 for line in config_lines: 2128 if "SAS_OPENCL" in line: 2129 if sas_opencl: 2130 new_config_lines.append("SAS_OPENCL = \""+sas_opencl+"\"") 2131 else: 2132 new_config_lines.append("SAS_OPENCL = None") 2133 else: 2134 new_config_lines.append(line) 2135 config_file.close() 2136 2137 #If custom_config is None, settings will not be remmbered 2138 new_config_file = open(custom_config.__file__,"w") 2139 new_config_file.writelines(new_config_lines) 2140 new_config_file.close() 2141 else: 2142 logging.info("Failed to save OPENCL settings in custom config file") 2143 2109 2144 2110 2145 def _check_update(self, event=None): -
src/sas/sasgui/guiframe/startup_configuration.py
rd85c194 r73cbeec 31 31 'CLEANUP_PLOT':False, 32 32 'DEFAULT_PERSPECTIVE':'Fitting', 33 'DEFAULT_OPEN_FOLDER': None} 33 'DEFAULT_OPEN_FOLDER': None, 34 'SAS_OPENCL': None} 34 35 try: 35 36 CURRENT_STRINGS = {'GUIFRAME_WIDTH':CURRENT.GUIFRAME_WIDTH, … … 45 46 'CLEANUP_PLOT':CURRENT.CLEANUP_PLOT, 46 47 'DEFAULT_PERSPECTIVE':CURRENT.DEFAULT_PERSPECTIVE, 47 'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER} 48 'DEFAULT_OPEN_FOLDER':CURRENT.DEFAULT_OPEN_FOLDER, 49 'SAS_OPENCL': None} 48 50 except: 49 51 CURRENT_STRINGS = DEFAULT_STRINGS -
src/sas/sasgui/perspectives/corfunc/corfunc.py
r96d293da r1dc8ec9 32 32 self._always_active = True 33 33 self.state_reader = Reader(self.set_state) 34 self._extensions = '.c or'34 self._extensions = '.crf' 35 35 36 36 def get_panels(self, parent): … … 48 48 49 49 l = Loader() 50 l.associate_file_reader('.c or', self.state_reader)50 l.associate_file_reader('.crf', self.state_reader) 51 51 52 52 return [self.corfunc_panel] … … 67 67 return [] 68 68 data = plotpanel.plots[graph.selected_plottable] 69 if data.id == IQ_DATA_LABEL or data.id == IQ_EXTRAPOLATED_DATA_LABEL or data.id == TRANSFORM_LABEL :69 if data.id == IQ_DATA_LABEL or data.id == IQ_EXTRAPOLATED_DATA_LABEL or data.id == TRANSFORM_LABEL1 or data.id == TRANSFORM_LABEL3: 70 70 return [] 71 71 item = plotpanel.plots[graph.selected_plottable] … … 81 81 def set_state(self, state=None, datainfo=None): 82 82 """ 83 Callback for CorfuncState reader. Called when a .c orfile is loaded83 Callback for CorfuncState reader. Called when a .crf file is loaded 84 84 """ 85 85 if isinstance(datainfo, list): … … 179 179 # Show the extrapolation as a curve instead of points 180 180 new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 181 elif label == TRANSFORM_LABEL :181 elif label == TRANSFORM_LABEL1 or label == TRANSFORM_LABEL3: 182 182 new_plot.xaxis("{x}", 'A') 183 183 new_plot.yaxis("{\\Gamma}", '') -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
rd45d590 r1dc8ec9 274 274 plot_x = transform.x[np.where(transform.x <= 200)] 275 275 plot_y = transform.y[np.where(transform.x <= 200)] 276 self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL )276 self._manager.show_data(Data1D(plot_x, plot_y), TRANSFORM_LABEL1) 277 277 # Only enable extract params button if a fourier trans. has been done 278 278 if self.transform_type == 'fourier': … … 325 325 dlg = wx.FileDialog(self, "Choose a file", 326 326 default_save_location, \ 327 self.window_caption, "*.c or", wx.SAVE)327 self.window_caption, "*.crf", wx.SAVE) 328 328 if dlg.ShowModal() == wx.ID_OK: 329 329 path = dlg.GetPath() … … 336 336 dlg.Destroy() 337 337 # MAC always needs the extension for saving 338 extens = ".c or"338 extens = ".crf" 339 339 # Make sure the ext included in the file name 340 340 f_name = os.path.splitext(path)[0] + extens -
src/sas/sasgui/perspectives/corfunc/corfunc_state.py
rd45d590 rae9b8bf 96 96 self.background = value 97 97 98 def toXML(self, filename='corfunc_state.c or', doc=None, entry_node=None):98 def toXML(self, filename='corfunc_state.crf', doc=None, entry_node=None): 99 99 """ 100 100 Writes the state of the CorfuncPanel panel to file, as XML. … … 257 257 type_name = "Corfunc" 258 258 259 type = ["Corfunc file (*.c or)|*.cor",259 type = ["Corfunc file (*.crf)|*.crf", 260 260 "SASView file (*.svs)|*.svs"] 261 261 262 ext = ['.c or', '.COR', '.svs', '.SVS']262 ext = ['.crf', '.CRF', '.svs', '.SVS'] 263 263 264 264 def __init__(self, callback): -
src/sas/sasgui/perspectives/corfunc/plot_labels.py
rff11b21 r1dc8ec9 4 4 5 5 GROUP_ID_TRANSFORM = r"$\Gamma(x)$" 6 TRANSFORM_LABEL = r"$\Gamma(x)$" 6 TRANSFORM_LABEL1 = r"$\Gamma1(x)$" 7 TRANSFORM_LABEL3 = r"$\Gamma3(x)$" -
src/sas/sasgui/perspectives/fitting/fitting.py
r06a4306 r73cbeec 45 45 from sas.sasgui.guiframe.gui_manager import MDIFrame 46 46 from sas.sasgui.guiframe.documentation_window import DocumentationWindow 47 from sas.sasgui.perspectives.fitting.gpu_options import GpuOptions 47 48 48 49 from . import models … … 192 193 self.bumps_options_menu = self.menu1.FindItemById(self.id_bumps_options) 193 194 self.bumps_options_menu.Enable(True) 195 196 self.id_gpu_options_panel = wx.NewId() 197 self.menu1.Append(self.id_gpu_options_panel, "OpenCL Options", "Choose OpenCL driver or turn it off") 198 wx.EVT_MENU(owner, self.id_gpu_options_panel, self.on_gpu_options) 194 199 195 200 self.id_result_panel = wx.NewId() … … 801 806 self.result_frame.Show() 802 807 self.result_frame.Raise() 808 809 def on_gpu_options(self, event=None): 810 """ 811 Make the Fit Results panel visible. 812 """ 813 dialog = GpuOptions(None, wx.ID_ANY, "") 814 dialog.Show() 803 815 804 816 def stop_fit(self, uid): -
src/sas/sasgui/perspectives/fitting/media/plugin.rst
rca1eaeb rca6cbc1c 568 568 cube(x): 569 569 $x^3$ 570 s inc(x):570 sas_sinx_x(x): 571 571 $\sin(x)/x$, with limit $\sin(0)/0 = 1$. 572 572 powr(x, y): … … 669 669 (`link to Bessel function's code <https://github.com/SasView/sasmodels/tree/master/sasmodels/models/lib/sas_JN.c>`_) 670 670 671 Si(x):671 sas_Si(x): 672 672 Sine integral $\text{Si}(x) = \int_0^x \tfrac{\sin t}{t}\,dt$. 673 673 … … 693 693 (`link to code <https://github.com/SasView/sasmodels/tree/master/sasmodels/models/lib/Si.c>`_) 694 694 695 s ph_j1c(x):695 sas_3j1x_x(x): 696 696 Spherical Bessel form 697 697 $\text{sph_j1c}(x) = 3 j_1(x)/x = 3 (\sin(x) - x \cos(x))/x^3$, … … 701 701 This function uses a Taylor series for small $x$ for numerical accuracy. 702 702 703 :code:`source = ["lib/s ph_j1c.c", ...]`704 (`link to code <https://github.com/SasView/sasmodels/tree/master/sasmodels/models/lib/s ph_j1c.c>`_)705 706 707 sas_ J1c(x):703 :code:`source = ["lib/sas_3j1x_x.c", ...]` 704 (`link to code <https://github.com/SasView/sasmodels/tree/master/sasmodels/models/lib/sas_3j1x_x.c>`_) 705 706 707 sas_2J1x_x(x): 708 708 Bessel form $\text{sas_J1c}(x) = 2 J_1(x)/x$, with a limiting value 709 709 of 1 at $x=0$, where $J_1(x)$ is the Bessel function of first kind -
src/sas/sasgui/perspectives/fitting/media/sm_help.rst
r7805458 r27aabc1 20 20 ================== 21 21 22 Sometimes it will be necessary to correct reduced experimental data for the 23 physical effects of the instrumental geometry in use. This process is called 24 *desmearing*. However, calculated/simulated data - which by definition will be 25 perfect/exact - can be *smeared* to make it more representative of what might 26 actually be measured experimentally. 27 28 SasView provides the following three smearing algorithms: 22 Sometimes the instrumental geometry used to acquire the experimental data has 23 an impact on the clarity of features in the reduced scattering curve. For 24 example, peaks or fringes might be slightly broadened. This is known as 25 *Q resolution smearing*. To compensate for this effect one can either try and 26 remove the resolution contribution - a process called *desmearing* - or add the 27 resolution contribution into a model calculation/simulation (which by definition 28 will be exact) to make it more representative of what has been measured 29 experimentally - a process called *smearing*. SasView will do the latter. 30 31 Both smearing and desmearing rely on functions to describe the resolution 32 effect. SasView provides three smearing algorithms: 29 33 30 34 * *Slit Smearing* 31 35 * *Pinhole Smearing* 32 36 * *2D Smearing* 37 38 SasView also has an option to use Q resolution data (estimated at the time of 39 data reduction) supplied in a reduced data file: the *Use dQ data* radio button. 40 41 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 42 43 dQ Smearing 44 ----------- 45 46 If this option is checked, SasView will assume that the supplied dQ values 47 represent the standard deviations of Gaussian functions. 33 48 34 49 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ -
src/sas/sasgui/perspectives/pr/media/pr_help.rst
r0391dae r1221196 10 10 ----------- 11 11 12 This tool calculates a real-space distance distribution function, *P(r)*, using 13 the inversion approach (Moore, 19 08).12 This tool calculates a real-space distance distribution function, *P(r)*, using 13 the inversion approach (Moore, 1980). 14 14 15 15 *P(r)* is set to be equal to an expansion of base functions of the type … … 24 24 25 25 \chi^2=\frac{\sum_i (I_{meas}(Q_i)-I_{th}(Q_i))^2}{error^2}+Reg\_term 26 26 27 27 28 28 where $I_{meas}(Q_i)$ is the measured scattering intensity and $I_{th}(Q_i)$ is 29 the prediction from the Fourier transform of the *P(r)* expansion. 29 the prediction from the Fourier transform of the *P(r)* expansion. 30 30 31 The $Reg\_term$ term is a regularization term set to the second derivative 31 The $Reg\_term$ term is a regularization term set to the second derivative 32 32 $d^2P(r)/d^2r$ integrated over $r$. It is used to produce a smooth *P(r)* output. 33 33 … … 40 40 41 41 * *Number of terms*: the number of base functions in the P(r) expansion. 42 42 43 43 * *Regularization constant*: a multiplicative constant to set the size of 44 44 the regularization term.
Note: See TracChangeset
for help on using the changeset viewer.