Magnetic Whirl - meron.py

    r"""
Definition
----------
This model describes the scattering of a magnetic
counter-clockwise rotating vortex [#Mirebeau2018]_.
The envelope is a circular cylinder with radius $R$ and length $L$ is assumed thin enough so
that the magnetization vector $\mathbf{M}(r)$ only depends on the radial
coordinates $r$ with the magnetic SLD in the disc plane 'magnetic_sld_disc'.
The SLD 'magnetic_sld_length' is an additional and separate magnetisation component
along the length of the cylinder.

The magnetic scattering length density (SLD) is defined as
$\rho_{\mathrm{mag}}=b_H M_S$, where $b_H= 2.91*10^{8}A^{-1}m^{-1}$ and $M_S$
is the saturation magnetisation (in $A/m$).

The magnetic field is oriented with an inclination of $alpha$ to the neutron
beam ans rotated by $beta$. The magnetic scattering length density (SLD) is
defined as $\rho_{\mathrm{mag}}=b_H M_S$, where $b_H= 2.91*10^{8}A^{-1}m^{-1}$
and $M_S$ is the saturation magnetisation (in $A/m$).
The fraction of "upward" neutrons before ('up_frac_i') and after the sample
('up_frac_f') must range between 0 to 1, with 0.5 denoting an unpolarised beam.
Note that a fit may result in a negative magnetic SLD, and hence magnetisation,
when the polarisation state is inverted, i.e. if you have analysed for a $I_{00}$
state wheras your data are $I_{11}$.
The model allows to construct the 4 spin-resolved cross sections (non-spin-flip
$I_{00}$, $I_{11}$ and spin-flip, here $I_{01}=I_{10}$), half-polarised SANS (SANSpol,
incoming polarised beam I_0 and I_1, no analysis after sample 'up_frac_f'$=0.5$),
and unpolarised beam ('up_frac_i'$=$'up_frac_f'$=0.5$).



Validation
----------

The model needs testing and validation. Your feedback is kindly requested.



References
----------

.. [#Mirebeau2018] I. Mirebeau et al., PRB 98, 014420 (2018)




Authorship and Verification
----------------------------

* **Author: Dirk Honecker **Date:** December 17, 2021
* **Last Modified by:**
* **Last Reviewed by:**

"""

import numpy as np
from numpy import pi, inf

name = "magnetic_whirl"
title = "SANS of vortex like spin structure"
description = """
    I(q) = A F_N^2(q)+ C F_N F_M + D F_M^2 
            A: weighting function =1 for unpolarised beam and non-neutron-spin-flip scattering, zero for spin-flip scattering.
            D: weighting function for purely magnetic scattering of the inhomogeneous magnetisation distribution in the disk.
            C: weighting function for nuclear-magnetic interference scattering.
            The weighting function differ for the various possible spin-resolved scattering cross sections.
            F_N: nuclear form factor
            F_M: magnetic form factor
"""
category = "shape:cylinder"

# pylint: disable=bad-whitespace, line-too-long
#             ["name", "units", default, [lower, upper], "type","description"],
parameters = [["length", "Ang", 400., [0, inf], "volume", "Thickness of disc"],
              ["radius", "Ang", 20., [0, inf], "volume", "Radius of the core"],
              ["nuc_sld_core", "1e-6/Ang^2", 4.0, [-inf, inf], "", "Core scattering length density"],
              ["nuc_sld_solvent", "1e-6/Ang^2", 1.0, [-inf, inf], "", "Solvent scattering length density"],
              ["magnetic_sld_disc", "1e-6/Ang^2", 1.0, [-inf, inf], "",    "Magnetic scattering length density of disc"],
              ["magnetic_sld_length", "1e-6/Ang^2", 1.0, [-inf, inf], "",    "Magnetic scattering length density along the length of cylinder"],              
              ["up_i", "None", 0.5, [0, 1], "", "Polarisation incoming beam"],
              ["up_f", "None", 0.5, [0, 1], "", "Polarisation outgoing beam"],
              ["alpha", "None", 90, [0, 180], "", "inclination of field to neutron beam"],
              ["beta", "None", 0, [0, 360], "", "rotation of field around neutron beam"],
             ]
# pylint: enable=bad-whitespace, line-too-long




source = ["lib/polevl.c","lib/sas_3j1x_x.c", "lib/sas_gamma.c","lib/gauss76.c","lib/sas_J0.c","lib/sas_J1.c","lib/sas_JN.c","jv.c", "struve.c", "magnetic_functions.c", "meron.c"]
valid = "radius >= 0.0 && length >= 0.0"
structure_factor = False
have_Fq = False
single=False






# tests = [
    # [{'radius': 20.0, 'thickness': 10.0}, 0.1, None, None, 30.0, 4.*pi/3*30**3, 1.0],

    # # The SasView test result was 0.00169, with a background of 0.001
    # [{'radius': 60.0, 'thickness': 10.0, 'sld_core': 1.0, 'sld_shell': 2.0,
      # 'sld_solvent': 3.0, 'background': 0.0}, 0.4, 0.000698838],
# ]

Back to Model Download