Changeset 4c42410 in sasview
- Timestamp:
- Apr 28, 2015 11:53:47 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:
- ce62e75
- Parents:
- da53353
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/fitting/media/fitting_help.rst
r98b30b4 r4c42410 473 473 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 474 474 475 .. _Polydispersity_Distributions:476 477 Polydispersity Distributions478 ----------------------------479 480 Calculates the form factor for a polydisperse and/or angular population of481 particles with uniform scattering length density. The resultant form factor482 is normalized by the average particle volume such that483 484 P(q) = scale*\<F*F\>/Vol + bkg485 486 where F is the scattering amplitude and the\<\>denote an average over the size487 distribution. Users should use PD (polydispersity: this definition is488 different from the typical definition in polymer science) for a size489 distribution and Sigma for an angular distribution (see below).490 491 Note that this computation is very time intensive thus applying polydispersion/492 angular distrubtion for more than one paramters or increasing Npts values493 might need extensive patience to complete the computation. Also note that494 even though it is time consuming, it is safer to have larger values of Npts495 and Nsigmas.496 497 The following five distribution functions are provided498 499 * *Rectangular_Distribution_*500 * *Array_Distribution_*501 * *Gaussian_Distribution_*502 * *Lognormal_Distribution_*503 * *Schulz_Distribution_*504 505 .. _Rectangular_Distribution:506 507 Rectangular Distribution508 ------------------------509 510 .. image:: pd_image001.png511 512 The xmean is the mean of the distribution, w is the half-width, and Norm is a513 normalization factor which is determined during the numerical calculation.514 Note that the Sigma and the half width *w* are different.515 516 The standard deviation is517 518 .. image:: pd_image002.png519 520 The PD (polydispersity) is521 522 .. image:: pd_image003.png523 524 .. image:: pd_image004.jpg525 526 .. _Array_Distribution:527 528 Array Distribution529 ------------------530 531 This distribution is to be given by users as a txt file where the array532 should be defined by two columns in the order of x and f(x) values. The f(x)533 will be normalized by SasView during the computation.534 535 Example of an array in the file536 537 30 0.1538 32 0.3539 35 0.4540 36 0.5541 37 0.6542 39 0.7543 41 0.9544 545 We use only these array values in the computation, therefore the mean value546 given in the control panel, for example ââ¬Ëradius = 60ââ¬â¢, will be ignored.547 548 .. _Gaussian_Distribution:549 550 Gaussian Distribution551 ---------------------552 553 .. image:: pd_image005.png554 555 The xmean is the mean of the distribution and Norm is a normalization factor556 which is determined during the numerical calculation.557 558 The PD (polydispersity) is559 560 .. image:: pd_image003.png561 562 .. image:: pd_image006.jpg563 564 .. _Lognormal_Distribution:565 566 Lognormal Distribution567 ----------------------568 569 .. image:: pd_image007.png570 571 The /mu/=ln(xmed), xmed is the median value of the distribution, and Norm is a572 normalization factor which will be determined during the numerical calculation.573 The median value is the value given in the size parameter in the control panel,574 for example, ââ¬Åradius = 60ââ¬ï¿œ.575 576 The PD (polydispersity) is given by /sigma/577 578 .. image:: pd_image008.png579 580 For the angular distribution581 582 .. image:: pd_image009.png583 584 The mean value is given by xmean=exp(/mu/+p2/2). The peak value is given by585 xpeak=exp(/mu/-p2).586 587 .. image:: pd_image010.jpg588 589 This distribution function spreads more and the peak shifts to the left as the590 p increases, requiring higher values of Nsigmas and Npts.591 592 .. _Schulz_Distribution:593 594 Schulz Distribution595 -------------------596 597 .. image:: pd_image011.png598 599 The xmean is the mean of the distribution and Norm is a normalization factor600 which is determined during the numerical calculation.601 602 The z = 1/p2ââ¬â 1.603 604 The PD (polydispersity) is605 606 .. image:: pd_image012.png607 608 Note that the higher PD (polydispersity) might need higher values of Npts and609 Nsigmas. For example, at PD = 0.7 and radisus = 60 A, Npts >= 160, and610 Nsigmas >= 15 at least.611 612 .. image:: pd_image013.jpg613 614 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ615 616 .. _Smearing_Computation:617 618 Smearing Computation619 --------------------620 621 Slit_Smearing_622 623 Pinhole_Smearing_624 625 2D_Smearing_626 627 .. _Slit_Smearing:628 629 Slit Smearing630 -------------631 632 The sit smeared scattering intensity for SAS is defined by633 634 .. image:: sm_image002.gif635 636 where Norm =637 638 .. image:: sm_image003.gif639 640 Equation 1641 642 The functions |inlineimage004| and |inlineimage005|643 refer to the slit width weighting function and the slit height weighting644 determined at the q point, respectively. Here, we assumes that the weighting645 function is described by a rectangular function, i.e.,646 647 .. image:: sm_image006.gif648 649 Equation 2650 651 and652 653 .. image:: sm_image007.gif654 655 Equation 3656 657 so that |inlineimage008| |inlineimage009| for |inlineimage010| and u.658 659 The |inlineimage011| and |inlineimage012| stand for660 the slit height (FWHM/2) and the slit width (FWHM/2) in the q space. Now the661 integral of Equation 1 is simplified to662 663 .. image:: sm_image013.gif664 665 Equation 4666 667 Numerical Implementation of Equation 4668 --------------------------------------669 670 Case 1671 ------672 673 For |inlineimage012| = 0 and |inlineimage011| = constant.674 675 .. image:: sm_image016.gif676 677 For discrete q values, at the q values from the data points and at the q678 values extended up to qN= qi + |inlineimage011| the smeared679 intensity can be calculated approximately680 681 .. image:: sm_image017.gif682 683 Equation 5684 685 |inlineimage018| = 0 for *Is* in *j* < *i* or *j* > N-1*.686 687 Case 2688 ------689 690 For |inlineimage012| = constant and |inlineimage011| = 0.691 692 Similarly to Case 1, we get693 694 |inlineimage019| for qp= qi- |inlineimage012| and qN= qi+ |inlineimage012|. |inlineimage018| = 0695 for *Is* in *j* < *p* or *j* > *N-1*.696 697 Case 3698 ------699 700 For |inlineimage011| = constant and701 |inlineimage011| = constant.702 703 In this case, the best way is to perform the integration, Equation 1,704 numerically for both slit height and width. However, the numerical integration705 is not correct enough unless given a large number of iteration, say at least706 10000 by 10000 for each element of the matrix, W, which will take minutes and707 minutes to finish the calculation for a set of typical SAS data. An708 alternative way which is correct for slit width << slit hight, is used in709 SasView. This method is a mixed method that combines method 1 with the710 numerical integration for the slit width.711 712 .. image:: sm_image020.gif713 714 Equation 7715 716 for qp= qi- |inlineimage012| and717 qN= qi+ |inlineimage012|. |inlineimage018| = 0 for718 *Is* in *j* < *p* or *j* > *N-1*.719 720 .. _Pinhole_Smearing:721 722 Pinhole Smearing723 ----------------724 725 The pinhole smearing computation is done similar to the case above except726 that the weight function used is the Gaussian function, so that the Equation 6727 for this case becomes728 729 .. image:: sm_image021.gif730 731 Equation 8732 733 For all the cases above, the weighting matrix *W* is calculated when the734 smearing is called at the first time, and it includes the ~ 60 q values735 (finely binned evenly) below (\>0) and above the q range of data in order736 to cover all data points of the smearing computation for a given model and737 for a given slit size. The *Norm* factor is found numerically with the738 weighting matrix, and considered on *Is* computation.739 740 .. _2D_Smearing:741 742 2D Smearing743 -----------744 745 The 2D smearing computation is done similar to the 1D pinhole smearing above746 except that the weight function used was the 2D elliptical Gaussian function747 748 .. image:: sm_image022.gif749 750 Equation 9751 752 In Equation 9, x0 = qcos/theta/ and y0 = qsin/theta/, and the primed axes753 are in the coordinate rotated by an angle /theta/ around the z-axis (below)754 so that xââ¬â¢0= x0cos/theta/+y0sin/theta/ and yââ¬â¢0= -x0sin/theta/+y0cos/theta/.755 756 Note that the rotation angle is zero for x-y symmetric elliptical Gaussian757 distribution. The A is a normalization factor.758 759 .. image:: sm_image023.gif760 761 Now we consider a numerical integration where each bins in /theta/ and R are762 *evenly* (this is to simplify the equation below) distributed by /delta//theta/763 and /delta/R, respectively, and it is assumed that I(xââ¬â¢, yââ¬â¢) is constant764 within the bins which in turn becomes765 766 .. image:: sm_image024.gif767 768 Equation 10769 770 Since we have found the weighting factor on each bin points, it is convenient771 to transform xââ¬â¢-yââ¬â¢ back to x-y coordinate (rotating it by -/theta/ around z772 axis). Then, for the polar symmetric smear773 774 .. image:: sm_image025.gif775 776 Equation 11777 778 where779 780 .. image:: sm_image026.gif781 782 while for the x-y symmetric smear783 784 .. image:: sm_image027.gif785 786 Equation 12787 788 where789 790 .. image:: sm_image028.gif791 792 Here, the current version of the SasView uses Equation 11 for 2D smearing793 assuming that all the Gaussian weighting functions are aligned in the polar794 coordinate.795 796 In the control panel, the higher accuracy indicates more and finer binnng797 points so that it costs more in time.798 799 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ800 801 .. _Polarisation_Magnetic_Scattering:802 803 Polarisation/Magnetic Scattering804 --------------------------------805 806 Magnetic scattering is implemented in five (2D) models807 808 * *SphereModel*809 * *CoreShellModel*810 * *CoreMultiShellModel*811 * *CylinderModel*812 * *ParallelepipedModel*813 814 In general, the scattering length density (SLD) in each regions where the815 SLD (=/beta/) is uniform, is a combination of the nuclear and magnetic SLDs and816 depends on the spin states of the neutrons as follows. For magnetic scattering,817 only the magnetization component, *M*perp, perpendicular to the scattering818 vector *Q* contributes to the the magnetic scattering length.819 820 .. image:: mag_vector.bmp821 822 The magnetic scattering length density is then823 824 .. image:: dm_eq.gif825 826 where /gamma/ = -1.913 the gyromagnetic ratio, /mu/B is the Bohr magneton, r0827 is the classical radius of electron, and */sigma/* is the Pauli spin. For828 polarised neutron, the magnetic scattering is depending on the spin states.829 830 Let's consider that the incident neutrons are polarized parallel (+)/831 anti-parallel (-) to the x' axis (See both Figures above). The possible832 out-coming states then are + and - states for both incident states833 834 Non-spin flips: (+ +) and (- -)835 Spin flips: (+ -) and (- +)836 837 .. image:: M_angles_pic.bmp838 839 Now, let's assume that the angles of the *Q* vector and the spin-axis (x')840 against x-axis are /phi/ and /theta/up, respectively (See Figure above). Then,841 depending upon the polarisation (spin) state of neutrons, the scattering length842 densities, including the nuclear scattering length density (/beta/N) are given843 as, for non-spin-flips844 845 .. image:: sld1.gif846 847 for spin-flips848 849 .. image:: sld2.gif850 851 where852 853 .. image:: mxp.gif854 855 .. image:: myp.gif856 857 .. image:: mzp.gif858 859 .. image:: mqx.gif860 861 .. image:: mqy.gif862 863 Here, the M0x, M0y and M0z are the x, y and z components of the magnetization864 vector given in the xyz lab frame. The angles of the magnetization, /theta/M865 and /phi/M as defined in the Figure (above)866 867 .. image:: m0x_eq.gif868 869 .. image:: m0y_eq.gif870 871 .. image:: m0z_eq.gif872 873 The user input parameters are M0_sld = DMM0, Up_theta = /theta/up,874 M_theta = /theta/M, and M_phi = /phi/M. The 'Up_frac_i' and 'Up_frac_f' are875 the ratio876 877 (spin up)/(spin up + spin down)878 879 neutrons before the sample and at the analyzer, respectively.880 881 *Note:* The values of the 'Up_frac_i' and 'Up_frac_f' must be in the range882 between 0 and 1.883 884 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ885 886 475 .. _Key_Combinations: 887 476
Note: See TracChangeset
for help on using the changeset viewer.