Changeset 23a9beb in sasview for src/sas/fit
- Timestamp:
- Feb 15, 2015 10:09:34 AM (10 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 920928f
- Parents:
- 898a8b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/fit/media/fitting_help.rst
r898a8b9 r23a9beb 15 15 16 16 Load_a_File_ 17 17 18 Single_Fit_ 19 18 20 Simultaneous_Fitting_ 21 19 22 Batch_Fitting_ 23 20 24 Model_Selection_ 25 21 26 Model_Category_Manager_ 27 22 28 Model_Functions_ 29 23 30 Custom_Model_Editor_ 31 24 32 Polydispersity_Distributions_ 33 25 34 Smearing_Computation_ 26 Polarisation/Magnetic_Scattering_ 35 36 Polarisation_Magnetic_Scattering_ 37 27 38 Key_Combinations_ 39 28 40 Status_Bar_Help_ 29 41 … … 100 112 ------------- 101 113 102 .. _Batch_Fit_ 103 .. _Batch_Window_ 104 .. _Edit_Grid_ 105 .. _Save_Grid_ 106 .. _Open_Batch_Results_ 107 .. _Plot_ 108 .. _View_Column_Cell_ 114 Batch_Fit_ 115 116 Batch_Window_ 117 118 Edit_Grid_ 119 120 Save_Grid_ 121 122 Open_Batch_Results_ 123 124 Plot_ 125 126 View_Column_Cell_ 109 127 110 128 .. _Batch_Fit: … … 117 135 Fitting menubar. 118 136 119 .. image:: batch_button_area.bmp137 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/batch_button_area.bmp 120 138 121 139 Figure 1: MenuBar: … … 154 172 Figure 2). 155 173 156 .. image:: restore_batch_window.bmp174 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/restore_batch_window.bmp 157 175 158 176 Figure 2: Edit Menu: … … 179 197 column in the grid. 180 198 181 .. image:: edit_menu.bmp199 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/edit_menu.bmp 182 200 183 201 Figure 3: Edit Menu: … … 191 209 .csv file. 192 210 193 *Note:* The grid doesn't save the data array, fits, and the array residuals. 194 As a result, the 'View (fit) Results' functionality will be lost when 195 211 *Note:* The grid doesn't save the data array, fits, and the array residuals. 212 As a result, the 'View (fit) Results' functionality will be lost when 213 reloading the saved file. 196 214 197 215 Warning! To ensure accuracy of saved fit results, it is recommended to save … … 208 226 available only when at least one column will be removed from the grid. 209 227 210 .. image:: file_menu.bmp228 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/file_menu.bmp 211 229 212 230 Figure 4: MenuBar: … … 226 244 clicking on the plot button. 227 245 228 *X/Y -Axis Selection Range* can be edited manually. These text controls 229 246 *X/Y -Axis Selection Range* can be edited manually. These text controls 247 allow the following types of expression (operation can be + - * /, or pow) 230 248 231 249 1) if the current axis label range is a function of 1 or more columns, write … … 249 267 with valid entries for plotting to work. The dY-bar is optional (see Figure 5). 250 268 251 .. image:: plot_button.bmp269 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/plot_button.bmp 252 270 253 271 Figure 5: Plotting … … 271 289 data and fits. 272 290 273 .. image:: view_button.bmp291 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/view_button.bmp 274 292 275 293 Figure 6: View Fits … … 280 298 281 299 Model_Type_ 282 Change_Model_Parameters_ 283 Write_your_Own_Model_ 300 301 Change_Model_Parameters_ 302 303 Write_your_Own_Model_ 284 304 285 305 .. _Model_Type: … … 345 365 button (Fig. 2). 346 366 347 .. image:: cat_fig0.bmp367 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/cat_fig0.bmp 348 368 349 369 Fig.1 350 370 351 .. image:: cat_fig1.bmp371 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/cat_fig1.bmp 352 372 353 373 Fig.2 354 374 355 .. image:: cat_fig2.bmp375 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/cat_fig2.bmp 356 376 357 377 Fig.3 … … 374 394 375 395 Description_ 376 New_ 377 Sum_Multi_p1_p2_ 378 Advanced_ 379 Delete_ 396 397 New_ 398 399 Sum_Multi_p1_p2_ 400 401 Advanced_ 402 403 Delete_ 380 404 381 405 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 390 414 function are effective after it is re-selected from the combo-box menu. 391 415 392 .. image:: edit_model_menu.bmp416 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/edit_model_menu.bmp 393 417 394 418 .. _New: … … 400 424 can be viewed and further modified by the 'Advanced' option below. 401 425 402 .. image:: new_model.bmp426 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/new_model.bmp 403 427 404 428 .. _Sum_Multi_p1_p2: … … 413 437 for activation. Hit the 'Close' button when it's done. 414 438 415 .. image:: sum_model.bmp439 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sum_model.bmp 416 440 417 441 .. _Advanced: … … 422 446 The menu option shows all the files in the plugin_models folder. You can edit, 423 447 modify, and save it. It is recommended to modify only the lines with arrow 424 (-- `-----). In the end of edit, 'Compile' and 'Run' from the menu bar to448 (-------). In the end of edit, 'Compile' and 'Run' from the menu bar to 425 449 activate or to see the model working properly. 426 450 … … 470 494 ------------------------ 471 495 472 .. image:: img/pd_image001.png496 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image001.png 473 497 474 498 The xmean is the mean of the distribution, w is the half-width, and Norm is a … … 478 502 The standard deviation is 479 503 480 .. image:: img/pd_image002.png504 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image002.png 481 505 482 506 The PD (polydispersity) is 483 507 484 .. image:: img/pd_image003.png485 486 .. image:: img/pd_image004.jpg508 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image003.png 509 510 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image004.jpg 487 511 488 512 .. _Array_Distribution: … … 513 537 --------------------- 514 538 515 .. image:: img/pd_image005.png539 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image005.png 516 540 517 541 The xmean is the mean of the distribution and Norm is a normalization factor … … 520 544 The PD (polydispersity) is 521 545 522 .. image:: img/pd_image003.png523 524 .. image:: img/pd_image006.jpg546 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image003.png 547 548 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image006.jpg 525 549 526 550 .. _Lognormal_Distribution: … … 529 553 ---------------------- 530 554 531 .. image:: img/pd_image007.png555 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image007.png 532 556 533 557 The /mu/=ln(xmed), xmed is the median value of the distribution, and Norm is a … … 538 562 The PD (polydispersity) is given by /sigma/ 539 563 540 .. image:: img/pd_image008.png564 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image008.png 541 565 542 566 For the angular distribution 543 567 544 .. image:: img/pd_image009.png568 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image009.png 545 569 546 570 The mean value is given by xmean=exp(/mu/+p2/2). The peak value is given by 547 571 xpeak=exp(/mu/-p2). 548 572 549 .. image:: img/pd_image010.jpg573 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image010.jpg 550 574 551 575 This distribution function spreads more and the peak shifts to the left as the … … 557 581 ------------------- 558 582 559 .. image:: img/pd_image011.png560 561 The xmean is the mean of the distribution and Norm is a normalization factor583 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image011.png 584 585 The xmean is the mean of the distribution and Norm is a normalization factor 562 586 which is determined during the numerical calculation. 563 587 … … 566 590 The PD (polydispersity) is 567 591 568 .. image:: img/pd_image012.png592 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image012.png 569 593 570 594 Note that the higher PD (polydispersity) might need higher values of Npts and … … 572 596 Nsigmas >= 15 at least. 573 597 574 .. image:: img/pd_image013.jpg598 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/pd_image013.jpg 575 599 576 600 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 582 606 583 607 Slit_Smearing_ 584 Pinhole_Smearing_ 585 2D_Smearing_ 608 609 Pinhole_Smearing_ 610 611 2D_Smearing_ 586 612 587 613 .. _Slit_Smearing: … … 592 618 The sit smeared scattering intensity for SAS is defined by 593 619 594 .. image:: img/sm_image002.gif620 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image002.gif 595 621 596 622 where Norm = 597 623 598 .. image:: img/sm_image003.gif624 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image003.gif 599 625 600 626 Equation 1 601 627 602 The functions .. image:: img/sm_image004.gif and .. image:: img/sm_image005.gif628 The functions .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image004.gif and .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image005.gif 603 629 refer to the slit width weighting function and the slit height weighting 604 630 determined at the q point, respectively. Here, we assumes that the weighting 605 631 function is described by a rectangular function, i.e., 606 632 607 .. image:: img/sm_image006.gif633 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image006.gif 608 634 609 635 Equation 2 … … 611 637 and 612 638 613 .. image:: img/sm_image007.gif639 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image007.gif 614 640 615 641 Equation 3 616 642 617 so that .. image:: img/sm_image008.gif .. image::img/sm_image009.gif for618 .. image:: img/sm_image010.gif and u.619 620 The .. image:: img/sm_image011.gif and .. image::img/sm_image012.gif stand for643 so that .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image008.gif .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image009.gif for 644 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image010.gif and u. 645 646 The .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif and .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif stand for 621 647 the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the 622 648 integral of Equation 1 is simplified to 623 649 624 .. image:: img/sm_image013.gif650 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image013.gif 625 651 626 652 Equation 4 … … 632 658 ------ 633 659 634 For .. image:: img/sm_image012.gif = 0 and .. image:: img/sm_image011.gif =660 For .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif = 0 and .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif = 635 661 constant. 636 662 637 .. image:: img/sm_image016.gif663 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image016.gif 638 664 639 665 For discrete q values, at the q values from the data points and at the q 640 values extended up to qN= qi + .. image:: img/sm_image011.gif the smeared666 values extended up to qN= qi + .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif the smeared 641 667 intensity can be calculated approximately 642 668 643 .. image:: img/sm_image017.gif669 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image017.gif 644 670 645 671 Equation 5 646 672 647 .. image:: img/sm_image018.gif = 0 for *Is* in *j* < *i* or *j* > N-1*.673 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image018.gif = 0 for *Is* in *j* < *i* or *j* > N-1*. 648 674 649 675 Case 2 650 676 ------ 651 677 652 For .. image:: img/sm_image012.gif = constant and653 .. image:: img/sm_image011.gif = 0.678 For .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif = constant and 679 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif = 0. 654 680 655 681 Similarly to Case 1, we get 656 682 657 .. image:: img/sm_image019.gif for qp= qi-.. image:: img/sm_image012.gif 658 and qN= qi+.. image:: img/sm_image012.gif. .. image:: img/sm_image018.gif = 0 683 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image019.gif for qp= qi- .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif 684 685 and qN= qi+ .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif. .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image018.gif = 0 659 686 for *Is* in *j* < *p* or *j* > *N-1*. 660 687 … … 662 689 ------ 663 690 664 For .. image:: img/sm_image011.gif = constant and665 .. image:: img/sm_image011.gif = constant.691 For .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif = constant and 692 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image011.gif = constant. 666 693 667 694 In this case, the best way is to perform the integration, Equation 1, … … 674 701 numerical integration for the slit width. 675 702 676 .. image:: img/sm_image020.gif703 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image020.gif 677 704 678 705 Equation 7 679 706 680 for qp= qi- .. image:: img/sm_image012.gif and681 qN= qi+ .. image:: img/sm_image012.gif. .. image:: img/sm_image018.gif = 0 for707 for qp= qi- .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif and 708 qN= qi+ .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image012.gif. .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image018.gif = 0 for 682 709 *Is* in *j* < *p* or *j* > *N-1*. 683 710 684 .. Pinhole_Smearing:711 .. _Pinhole_Smearing: 685 712 686 713 Pinhole Smearing … … 691 718 for this case becomes 692 719 693 .. image:: img/sm_image021.gif720 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image021.gif 694 721 695 722 Equation 8 … … 710 737 except that the weight function used was the 2D elliptical Gaussian function 711 738 712 .. image:: img/sm_image022.gif739 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image022.gif 713 740 714 741 Equation 9 … … 721 748 distribution. The A is a normalization factor. 722 749 723 .. image:: img/sm_image023.gif750 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image023.gif 724 751 725 752 Now we consider a numerical integration where each bins in /theta/ and R are … … 728 755 within the bins which in turn becomes 729 756 730 .. image:: img/sm_image024.gif757 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image024.gif 731 758 732 759 Equation 10 … … 736 763 axis). Then, for the polar symmetric smear 737 764 738 .. image:: img/sm_image025.gif765 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image025.gif 739 766 740 767 Equation 11 … … 742 769 where 743 770 744 .. image:: img/sm_image026.gif771 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image026.gif 745 772 746 773 while for the x-y symmetric smear 747 774 748 .. image:: img/sm_image027.gif775 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image027.gif 749 776 750 777 Equation 12 … … 752 779 where 753 780 754 .. image:: img/sm_image028.gif781 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sm_image028.gif 755 782 756 783 Here, the current version of the SasView uses Equation 11 for 2D smearing … … 782 809 vector *Q* contributes to the the magnetic scattering length. 783 810 784 .. . image:: img/mag_vector.bmp811 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/mag_vector.bmp 785 812 786 813 The magnetic scattering length density is then 787 814 788 .. image:: img/dm_eq.gif815 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/dm_eq.gif 789 816 790 817 where /gamma/ = -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0 … … 799 826 Spin flips: (+ -) and (- +) 800 827 801 .. image:: img/M_angles_pic.bmp828 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/M_angles_pic.bmp 802 829 803 830 Now, let's assume that the angles of the *Q* vector and the spin-axis (x') … … 807 834 as, for non-spin-flips 808 835 809 .. image:: img/sld1.gif836 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sld1.gif 810 837 811 838 for spin-flips 812 839 813 .. image:: img/sld2.gif840 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/sld2.gif 814 841 815 842 where 816 843 817 .. image:: img/mxp.gif818 819 .. image:: img/myp.gif820 821 .. image:: img/mzp.gif822 823 .. image:: img/mqx.gif824 825 .. image:: img/mqy.gif844 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/mxp.gif 845 846 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/myp.gif 847 848 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/mzp.gif 849 850 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/mqx.gif 851 852 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/mqy.gif 826 853 827 854 Here, the M0x, M0y and M0z are the x, y and z components of the magnetization … … 829 856 and /phi/M as defined in the Figure (above) 830 857 831 .. image:: img/m0x_eq.gif832 833 .. image:: img/m0y_eq.gif834 835 .. image:: img/m0z_eq.gif858 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/m0x_eq.gif 859 860 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/m0y_eq.gif 861 862 .. image:: docs/sphinx-docs/source/user/perspectives/fitting/m0z_eq.gif 836 863 837 864 The user input parameters are M0_sld = DMM0, Up_theta = /theta/up, … … 843 870 neutrons before the sample and at the analyzer, respectively. 844 871 845 *Note: The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range872 *Note:* The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range 846 873 between 0 and 1. 847 874 … … 854 881 855 882 Copy_Paste_ 883 856 884 Bookmark_ 885 857 886 Graph_Context_Menu_ 887 858 888 FTolerance_ 859 889 … … 918 948 919 949 Message_Warning_Hint_ 920 Console_ 950 951 Console_ 921 952 922 953 .. _Message_Warning_Hint:
Note: See TracChangeset
for help on using the changeset viewer.