Changeset 6b86bee in sasmodels

Mar 31, 2019 12:42:57 PM (4 years ago)
Dirk Honecker <honecker@…> (03/31/19 12:23:01)
Dirk Honecker <honecker@…> (03/31/19 12:42:57)

Documentation for generalised magnetic SANS with orientation of magnetisation and polarisation in line with particle orientation notation. Addresses ticket SasView?/sasview#993 and Sasview/sasmodels#113 .

4 edited


  • doc/guide/magnetism/magnetism.rst

    rdf87acf r6b86bee  
    6 Models which define a scattering length density parameter can be evaluated 
    7 as magnetic models. In general, the scattering length density (SLD = 
    8 $\beta$) in each region where the SLD is uniform, is a combination of the 
    9 nuclear and magnetic SLDs and, for polarised neutrons, also depends on the 
    10 spin states of the neutrons. 
     6(Version 2: Spherical Polarimetry in SANS: Allow for freedom in field/polarisation axis away from the detector plane, 
     7i.e. allow in-beam direction or oscillatory/rotational fields...) 
    12 For magnetic scattering, only the magnetization component $\mathbf{M_\perp}$ 
    13 perpendicular to the scattering vector $\mathbf{Q}$ contributes to the magnetic 
    14 scattering length. 
     9For magnetic systems, the scattering length density (SLD = $\beta$) is a combination 
     10of the nuclear and magnetic SLD. For polarised neutrons, the resulting effective SLD 
     11depends on the spin state of the neutron before and after being scattered in the sample. 
     13Models in Sasview, which define a SLD parameter, can be evaluated also as magnetic models introducing 
     14the magnetisation (vector) $\mathbf{M}=M (\sin\theta_M \cos \phi_M, \sin \theta_M \sin \phi_M,\cos\theta_M )$ and the associated magnetic SLD given by 
     15the simple relation $\beta_M= b_H M$, where $b_H=\dfrac{\gamma r_0}{2\mu_B}=2.7$ fm 
     16denotes the magnetic scattering length and $M=\lvert \mathbf{M} \rvert$ the magnetisation 
     17magnitude, where $\gamma = -1.913$ is the gyromagnetic ratio, $\mu_B$ is the 
     18Bohr magneton, $r_0$ is the classical radius of electron. 
     20It is assumed that the magnetic SLD in each region of the model is uniformly for 
     21nuclear scattering and has one effective magnetisation orientation 
     23The external field $\mathbf{H}=H \mathbf{P}$coincides with the polarisation axis 
     24$\mathbf{P}=(\sin\theta_P \cos \phi_P, \sin \theta_P \sin \phi_P,\cos\theta_P )$ for the neutrons, which is the quantisation axis 
     25for the Pauli spin operator. 
     27.. figure:: 
     28    mag_img/M_angles_pic.png 
     30.. note:: 
     31    The polarisation axis at the sample position is the determining factor and determines 
     32    the scattering geometry. Before and after the field at the sample position, 
     33    the polarisation turns adiabatically to the guide field of the instrument. 
     34    This operation does not change the observed spin-resolved scattering at the detector. 
     35    Anyway the magnetic field is the vector defining a symmetry axis of the 
     36    system and the magnetisation vector will orient with respect to the field. 
     39.. note:: 
     40    For AC oscillating/rotation field varying in space with time, you can coupling the magnetisation 
     41    with the field axis via a constrained fit. This will allow to easily parametrise 
     42    a phase shift of the magnetisation lagging behind a magnetic field varying from time frame to time frame. 
     43    Anyway the magnetic field is the vector defining a symmetry axis of the 
     44    system and the magnetisation vector will most often orient symmetrically with respect to the field. 
     47The neutrons are polarised parallel (+) or antiparallel (-) to $\mathbf{P}$. One can 
     48distinguish 4 spin-resolved cross sections: 
     50 * Non-spin-flip (NSF) $(+ +)$ and $(- -)$ 
     52 * Spin-flip (SF) $(+ -)$ and $(- +)$ 
     54The spin-dependent magnetic scattering length densities are defined as (see Moon, Riste, Koehler) 
     56.. math:: 
     57    \beta_{M, s_{in} s_{out}}  = b_H\sigma \cdot \mathbf{M_\perp} 
     59where  $\sigma$ is the Pauli spin, and $s_{in/out}$ describes the spin state of the neutron before and 
     60after the sample. 
     62For magnetic neutron scattering, only the magnetisation component or Halpern-Johnson vector  
     63$\mathbf{M_\perp}$ perpendicular to the scattering vector 
     64$\mathbf{Q}=q \mathbf{n}=q (\cos\theta, \sin \theta,0)$ contributes to the magnetic scattering: 
     66.. math:: 
     67    \mathbf{M_\perp} = \mathbf{n} [\mathbf{n} \cdot \mathbf{M}] -\mathbf{M} 
     69with $\mathbf{n}$ the unit scattering vector and $\theta$ denotes the angle 
     70between $\mathbf{Q}$ and the x-axis. 
    1672.. figure:: 
    1773    mag_img/mag_vector.png 
    19 The magnetic scattering length density is then 
     75The two NSF cross sections are given by 
    2177.. math:: 
    22     \beta_M = \dfrac{\gamma r_0}{2\mu_B}\sigma \cdot 
    23     \mathbf{M_\perp} = D_M\sigma \cdot \mathbf{M_\perp} 
     78    I^{\pm\pm} = N^2 \mp \mathbf{P}\cdot(N^{\ast}\mathbf{M_\perp} +N\mathbf{M_\perp}^{\ast})  
     79        + (\mathbf{P}\cdot \mathbf{M_\perp})^2 
    25 where $\gamma = -1.913$ is the gyromagnetic ratio, $\mu_B$ is the 
    26 Bohr magneton, $r_0$ is the classical radius of electron, and $\sigma$ 
    27 is the Pauli spin. 
    29 Assuming that incident neutrons are polarized parallel $(+)$ and anti-parallel 
    30 $(-)$ to the $x'$ axis, the possible spin states after the sample are then: 
    32 * Non spin-flip $(+ +)$ and $(- -)$ 
    34 * Spin-flip $(+ -)$ and $(- +)$ 
    36 Each measurement is an incoherent mixture of these spin states based on the 
    37 fraction of $+$ neutrons before ($u_i$) and after ($u_f$) the sample, 
    38 with weighting: 
     81and the two SF channels: 
    4083.. math:: 
    41     -- &= (1-u_i)(1-u_f) \\ 
    42     -+ &= (1-u_i)(u_f) \\ 
    43     +- &= (u_i)(1-u_f) \\ 
    44     ++ &= (u_i)(u_f) 
     84    I^{\pm\mp} = \mathbf{M_\perp}\cdot \mathbf{M_\perp} - (\mathbf{P}\cdot \mathbf{M_\perp})^2 
     85        \mp i \mathbf{P}\cdot \mathbf{M_\perp} \times \mathbf{M_\perp}^{\ast} 
    46 Ideally the experiment would measure the pure spin states independently and 
    47 perform a simultaneous analysis of the four states, tying all the model 
    48 parameters together except $u_i$ and $u_f$. 
     87with $i=\sqrt{-1}$, and $^{\ast}$ denoting the complex conjugate quantity, and 
     88$\times$ and $\cdot$  the vector and scalar product, respectively. 
    50 .. figure:: 
    51     mag_img/M_angles_pic.png 
     90The polarisation axis at the sample position is the determining factor and determines 
     91the scattering geometry. For the NSF scattering the component of the Halpern-Johnson 
     92vector parallel to $P$ contributes 
    53 If the angles of the $Q$ vector and the spin-axis $x'$ to the $x$ - axis are 
    54 $\phi$ and $\theta_{up}$, respectively, then, depending on the spin state of the 
     94.. math:: 
     95    \mathbf{M}_{\perp,\parallel P } = ( mathbf{P}\cdot \mathbf{M}_{\perp }) mathbf{P} 
     96    \text{ magnetisation component parallel to polarisation for NSF scattering} 
     98The component perpendicular to the polarisation gives rise to SF scattering. The perpendicular 
     99plane is constructed with the two vectors 
     101.. math:: 
     102    \mathbf{M}_{\perp,\perp P } = \mathbf{M}_{\perp } - (\mathbf{P}\cdot \mathbf{M}_{\perp }) \mathbf{P} 
     103    \text{ magnetisation component perpendicular to polarisation for SF scattering} 
     105and a third vector perpendicular to both $\mathbf{P}$ and $\mathbf{M}_{\perp,\perp P } $ : 
     107.. math:: 
     108    \mathbf{O} = \mathbf{M}_{\perp} \times \mathbf{P} - \mathbf{M}_{\perp,\perp P } = [\mathbf{q}\cdot(\mathbf{M}\times\mathbf{P})(\mathbf{q}-\mathbf{P}\times\mathbf{q})] 
     109    \text{ vector perpendicular to polarisation and Halpern-Johnson vector for SF scattering} 
     111For symmetric, collinear spin structures ($\mathbf{M}_{\perp}^{\ast}=\matbf{M}_{\perp}^{\ast}$), $\mathbf{O}\cdot \matbf{O}^{\ast}=0$ 
     112since  $\mathbf{M}_{\perp} \times \mathbf{P} \cdot \mathbf{M}_{\perp} \times \mathbf{P} = \mathbf{M}_{\perp,\perp P }$. 
     115Depending on the spin state of the 
    55116neutrons, the scattering length densities, including the nuclear scattering 
    56117length density $(\beta{_N})$ are 
    58119.. math:: 
    59     \beta_{\pm\pm} =  \beta_N \mp D_M M_{\perp x'} 
    60     \text{ for non spin-flip states} 
     120    \beta_{\pm\pm} =  \beta_N \mp b_H math{P}\cdot M_{\perp } 
     121    \text{ for non-spin-flip states} 
    64125.. math:: 
    65     \beta_{\pm\mp} =  -D_M (M_{\perp y'} \pm iM_{\perp z'}) 
     126    \beta_{\pm\mp} =  -b_H (\lvert\mathbf{M}_{\perp,\perp P }\rvert \pm i \mathbf{q}\cdot (\mathbf{M}\times \mathbf{P}  (1-\mathbf{P}\cdot\mathbf{q})) 
    66127    \text{ for spin-flip states} 
    68 where 
    70 .. math:: 
    71     M_{\perp x'} &= M_{0q_x}\cos(\theta_{up})+M_{0q_y}\sin(\theta_{up}) \\ 
    72     M_{\perp y'} &= M_{0q_y}\cos(\theta_{up})-M_{0q_x}\sin(\theta_{up}) \\ 
    73     M_{\perp z'} &= M_{0z} \\ 
    74     M_{0q_x} &= (M_{0x}\cos\phi - M_{0y}\sin\phi)\cos\phi \\ 
    75     M_{0q_y} &= (M_{0y}\sin\phi - M_{0x}\cos\phi)\sin\phi 
     130with $\lvert\mathbf{M}_{\perp,\perp P }\rvert= (\mathbf{M}_{\perp,\perp P } \cdot \mathbf{M}_{\perp,\perp P })^{1/2} 
     131=(M_{\perp,x}^2+M_{\perp,y}^2+M_{\perp,z}^2-(M_{\perp,x} P_x+ M_{\perp,y} P_y + M_{\perp,z} P_z   )^2 )^{1/2}$. 
    77 Here, $M_{0x}$, $M_{0x}$, $M_{0z}$ are the x, y and z components 
    78 of the magnetization vector given in the laboratory xyz frame given by 
    80 .. math:: 
    81     M_{0x} &= M_0\cos\theta_M\cos\phi_M \\ 
    82     M_{0y} &= M_0\sin\theta_M \\ 
    83     M_{0z} &= -M_0\cos\theta_M\sin\phi_M 
    85 and the magnetization angles $\theta_M$ and $\phi_M$ are defined in 
    86 the figure above. 
     136Every magnetic scattering cross section can be constructed from an incoherent mixture 
     137of the 4 spin-resolved spin states depending on the efficiency parameters before 
     138($u_i$) and after ($u_f$) the sample. For a half-polarised experiment(SANSPOL with $u_f=0.5$) or 
     139full (longitudinal) polarisation analysis, the accessible spin states are measured 
     140independently and a simultaneous analysis of the measured states is performed, 
     141tying all the model parameters together except $u_i$ and $u_f$, which are set based 
     142on the (known) polarisation efficiencies of the instrument. 
     144.. note:: 
     145    The values of the 'up_frac_i' ($u_i$) and 'up_frac_f' ($u_f$) must be in the range 0 to 1. 
     146    The parameters 'up_frac_i' and 'up_frac_f' can be easily associated to 
     147    polarisation efficiencies 'e_in/out' (of the instrument). Efficiency values range from 0.5 
     148    (unpolarised beam)  to 1 (perfect optics). For 'up_frac_i/f'  <0.5 
     149    a cross section is constructed with the spin reversed/flipped with respect 
     150    to the initial supermirror polariser. The actual polarisation efficiency 
     151    in this case is however  'e_in/out' = 1-'up_frac_i/f'. 
    88156The user input parameters are: 
    90158===========   ================================================================ 
    91  sld_M0       $D_M M_0$ 
     159 sld_M0       $b_H M_0$ 
    92160 sld_mtheta   $\theta_M$ 
    93161 sld_mphi     $\phi_M$ 
    94  up_frac_i    $u_i$ = (spin up)/(spin up + spin down) *before* the sample 
    95  up_frac_f    $u_f$ = (spin up)/(spin up + spin down) *after* the sample 
    96  up_angle     $\theta_\mathrm{up}$ 
     162 up_frac_i    $u_i$ polarisation efficiency *before* the sample 
     163 up_frac_f    $u_f$ = polarisation efficiency *after* the sample 
     164 p_theta      $\theta_P$ 
     165 p_phi        $\phi_P$ 
    97166===========   ================================================================ 
    99169.. note:: 
    100     The values of the 'up_frac_i' and 'up_frac_f' must be in the range 0 to 1. 
     170    P.S. of Dirk: 
     171    This is the most general description of magnetic SANS ever written and will supersede prior art! 
     172    Works for fully magnetically saturated systems. If you figure out how to 
     173    implement an isotropic ensemble of particle magnetisation ( similar for orientations). 
     174    This is needed to generate two populations with spin pointing in opposite directions in order to describe 
     175    field-dependence correctly, i.e. the different variation of mean magnetisation vs 
     176    square mean quantities. 
     177    With proper generalised orientation distribution, you cover all "normal" use cases 
     178   (except of the fancy stuff one have to simulate). 
     184    .. [#] R. M. Moon and T. Riste and W. C. Koehler, *Phys. Rev.*, 181 (1969) 920. 
    102186*Document History* 
    105189| 2017-11-15 Paul Kienzle 
    106190| 2018-06-02 Adam Washington 
     191| 2019-03-29 Dirk Honecker 
  • sasmodels/kernel_iq.c

    r5e1875c r6b86bee  
    88   const double norm; 
     88  double norm; 
    8989  in_spin = clip(in_spin, 0.0, 1.0); 
    9090  out_spin = clip(out_spin, 0.0, 1.0); 
Note: See TracChangeset for help on using the changeset viewer.