Parameter Overview#

NuMagSANS simulations are configured using the Python function

NuMagSANS.write_config(...)

This function generates a configuration file that is passed to the NuMagSANS backend executable. The parameters listed below correspond directly to entries in the generated configuration file and control the physical model and numerical settings of the simulation.

Example Script#

The following script demonstrates a minimal NuMagSANS workflow.

from NuMagSANS import NuMagSANS
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent

# Create NuMagSANS object
sim = NuMagSANS()

# Temporary configuration file
config = BASE_DIR / "NuMagSANSInput_temp.conf"

# Write configuration file
sim.write_config(
    config,
    MagData_activate=1,
    MagDataPath=str(BASE_DIR / "RealSpaceData" / "MagData"),
    foldernameSANSData=str(BASE_DIR / "NuMagSANS_Output"),
    Fourier_Approach="atomistic",
    User_Selection=[1, 2, 3],
    Scattering_Volume_V=2.618e-24,
    enable_outputs=["SpinFlip_2D", "SpinFlip_1D"],
)

# Run NuMagSANS simulation
sim.run(config)

# Remove temporary configuration file
sim.config_clear(config)

The focused examples below show only the setting being discussed. Replace ... with the configuration-file path, such as config from the example above, and combine multiple keyword arguments in a single write_config call as needed.

Input Data#

These parameters define where the simulation reads input data and where results are written.

NuMagSANS separates local object data from optional assembly metadata:

Data layer

Purpose

Typical file layout

MagData

Local magnetic moment data of one or more objects.

MagData/Object_1/m_1.csv, MagData/Object_2/m_1.csv, …

NucData

Local nuclear scattering-length-density data of one or more objects.

NucData/Object_1/n_1.csv, NucData/Object_2/n_1.csv, …

StructData

Object-center translations. One row per object with x y z.

StructData.csv

RotData

Object-wise local rotations. One row per object with three Euler angles in radians; the axis sequence is selected by RotDataConvention.

RotData.csv or RotData/RotData_1.csv, RotData/RotData_2.csv, …

This separation allows several system types to be represented with the same backend: fully materialized micromagnetic or atomistic datasets can be imported directly through MagData and/or NucData, while object-based assemblies can additionally use StructData and RotData to translate and rotate local object data without rewriting the object files.

NucDataPath#

Default path RealSpaceData/NucData

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    NucDataPath="RealSpaceData/NucData",
)

NucData_activate#

Default value 0 Options: 0 (disabled), 1 (enabled).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    NucData_activate=1,
)

MagDataPath#

Default path RealSpaceData/MagData

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    MagDataPath="RealSpaceData/MagData",
)

MagData_activate#

Default value 0 Options: 0 (disabled), 1 (enabled).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    MagData_activate=1,
)

StructDataFilename#

Default path RealSpaceData/StructData.csv

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructDataFilename="RealSpaceData/StructData.csv",
)

StructData_activate#

Default value 0 Options: 0 (disabled), 1 (enabled).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructData_activate=1,
)

StructDataPath#

Default path RealSpaceData/StructData

Folder used by StructDataLoop. In this mode, structure files are expected to follow the naming convention StructData_1.csv, StructData_2.csv, … inside StructDataPath. Each file contains one object-center translation table.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructDataPath="RealSpaceData/StructData",
)

Supported Data-Layer Combinations#

The atomistic backend supports pure magnetic, pure nuclear, and combined nuclear-magnetic calculations. Each of these can be evaluated without assembly metadata, with StructData, with RotData, or with both StructData and RotData.

The main combinations are:

Active layers

Interpretation

MagData

Pure magnetic scattering from local real-space data.

NucData

Pure nuclear scattering from local real-space data.

MagData + NucData

Combined nuclear-magnetic scattering from local real-space data.

... + StructData

Local objects are translated by object-center positions.

... + RotData

Local objects are rotated individually before scattering is computed.

... + StructData + RotData

Local objects are individually rotated and then placed at object-center positions.

This makes it possible to use NuMagSANS both for large fully materialized simulation datasets and for object-based assembly models where local objects are reused with different positions and orientations.

Local Rotation Data#

These parameters configure object-wise rotation tables. Each table row describes the local orientation of one object.

RotDataFilename#

Default path RealSpaceData/RotData.csv

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataFilename="RealSpaceData/RotData.csv",
)

RotData_activate#

Default value 0 Options: 0 (disabled), 1 (enabled).

If activated, RotDataFilename is read as an object-wise rotation table. The file must contain one row per object and three columns with angles in radians. The axes associated with these columns are defined by RotDataConvention.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotData_activate=1,
)

RotDataConvention#

Default zyz

Euler-axis sequence used to interpret the three columns in each rotation data row. The supported proper-Euler and Tait–Bryan sequences are xyx, xzx, yxy, yzy, zxz, zyz, xyz, xzy, yxz, yzx, zxy, and zyx.

The selection is case-insensitive and applies to every active RotData row and every file in a RotDataLoop within the run; conventions cannot be mixed between loop files.

A convention abc and a row angle_1 angle_2 angle_3 define the active rotation

\[R = R_a(\mathrm{angle}_1) R_b(\mathrm{angle}_2) R_c(\mathrm{angle}_3),\]

acting on column vectors. The rightmost rotation is therefore applied first. For example, with RotDataConvention = xyz, a row phi 0 0 describes a rotation by phi around the x-axis. All three angles remain in radians.

If the option is omitted, NuMagSANS uses zyz so that existing configuration and rotation-data files retain their historical interpretation

\[R = R_z(\alpha) R_y(\beta) R_z(\gamma).\]

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataConvention="zyz",
)

RotDataPath#

Default path RealSpaceData/RotData

Folder used by RotDataLoop. In this mode, rotation files are expected to follow the naming convention RotData_1.csv, RotData_2.csv, … inside RotDataPath. Each file contains one object-wise rotation table.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataPath="RealSpaceData/RotData",
)

Output Storage#

These parameters define where calculated data are written and which file format is used.

foldernameSANSData#

Default NuMagSANS_Output

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    foldernameSANSData="NuMagSANS_Output",
)

SANSData_Output_Format#

Output format used for the calculated SANS data. Default csv Options: csv or hdf5.

The hdf5 option requires a NuMagSANS build configured with NUMAGSANS_ENABLE_HDF5=ON.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    SANSData_Output_Format="csv",
)

Loading and Preprocessing#

These parameters control input validation, template-object replication, and preprocessing of imported real-space data.

FastLoad#

Default value 0 Options: 0 (disabled), 1 (enabled).

If set to 1, NuMagSANS skips repeated dimension checks for all files beyond the first data file inside each object folder. This can accelerate import for large datasets. It assumes that, within each object folder, all magnetic or nuclear data files have the same number of rows. Different objects may still have different numbers of rows.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    FastLoad=1,
)

MagData_ReplicationImport#

Default value 0 Options: 0 (disabled), 1 (enabled).

If set to 1, NuMagSANS expects one physical magnetic template object in MagData and replicates it internally during import. The kernels receive the same in-memory structure as for explicitly stored object folders.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    MagData_ReplicationImport=1,
)

MagData_NumberOfReplications#

Default value 1

Effective number of magnetic objects generated from the single physical template object when MagData_ReplicationImport is active. The value must be a positive integer.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    MagData_NumberOfReplications=8,
)

NucData_ReplicationImport#

Default value 0 Options: 0 (disabled), 1 (enabled).

If set to 1, NuMagSANS expects one physical nuclear template object in NucData and replicates it internally during import.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    NucData_ReplicationImport=1,
)

NucData_NumberOfReplications#

Default value 1

Effective number of nuclear objects generated from the single physical template object when NucData_ReplicationImport is active. The value must be a positive integer.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    NucData_NumberOfReplications=8,
)

Exclude_Zero_Moments#

Default value 0 Options: 0 (disabled), 1 (enabled).

If set to 1, rows with zero magnetic moment are excluded from imported magnetic datasets.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Exclude_Zero_Moments=1,
)

Dataset Selection and Loops#

These parameters control the selected data-file indices and nested batch calculations over structure and rotation datasets.

Loop_Modus#

Description: Enable looping over selected data-file indices. Default 0 Options: 0 (disabled), 1 (enabled).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Loop_Modus=1,
)

Loop_From#

Description: First index used in loop simulations Default 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Loop_From=1,
)

Loop_To#

Description: Last index used in loop simulations Default 20

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Loop_To=20,
)

User_Selection#

Description: Explicit list of selected indices Default [1]

If Loop_Modus = 0, only the listed file indices are evaluated. If Loop_Modus = 1, the index range from Loop_From to Loop_To is used.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    User_Selection=[1, 2, 3],
)

StructDataLoop#

Description: Enable an inner loop over several structure-data files. Default 0 Options: 0 (disabled), 1 (enabled).

If StructDataLoop = 1, NuMagSANS loads the selected StructData_#.csv files from StructDataPath while keeping the currently selected magnetic and nuclear local object data fixed. If RotDataLoop is also active, the structure-data loop is the outer loop and the rotation-data loop is the inner loop.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructDataLoop=1,
)

StructDataLoop_From#

Description: First structure-data file index used by the inner StructData loop. Default 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructDataLoop_From=1,
)

StructDataLoop_To#

Description: Last structure-data file index used by the inner StructData loop. Default 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructDataLoop_To=3,
)

StructData_User_Selection#

Description: Optional explicit list of selected structure-data file indices. Default None

If this option is present, it selects the exact StructData_#.csv files used by the inner StructData loop, for example {1, 3, 4}. If it is not present, the contiguous range from StructDataLoop_From to StructDataLoop_To is used.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    StructData_User_Selection=[1, 3, 4],
)

RotDataLoop#

Description: Enable an inner loop over several rotation-data files. Default 0 Options: 0 (disabled), 1 (enabled).

If RotDataLoop = 1, NuMagSANS loads the selected RotData_#.csv files from RotDataPath while keeping the currently selected magnetic, nuclear, and structure data fixed. This is useful for evaluating the same local object data under multiple object-wise rotation configurations.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataLoop=1,
)

RotDataLoop_From#

Description: First rotation-data file index used by the inner RotData loop. Default 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataLoop_From=1,
)

RotDataLoop_To#

Description: Last rotation-data file index used by the inner RotData loop. Default 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotDataLoop_To=3,
)

RotData_User_Selection#

Description: Optional explicit list of selected rotation-data file indices. Default None

If this option is present, it selects the exact RotData_#.csv files used by the inner RotData loop, for example {1, 3, 4}. If it is not present, the contiguous range from RotDataLoop_From to RotDataLoop_To is used.

For a fixed data-file index and a selected rotation-data index, output is written to a nested folder such as SANS_1/RotData_3/. If StructDataLoop is active as well, the output is nested as SANS_1/StructData_2/RotData_3/.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotData_User_Selection=[1, 3, 4],
)

Global Rotation#

These parameters specify a single global Euler rotation applied to the complete imported system.

RotMatConvention#

Default zyz

Euler-axis sequence for the global rotation of the complete imported system. The supported conventions are identical to those of RotDataConvention. For a convention abc, the global angles define

\[R_\mathrm{global} = R_a(\alpha)R_b(\beta)R_c(\gamma).\]

The rotation acts on column vectors and the rightmost rotation is applied first. Unlike object-wise RotData angles, all global rotation angles are specified in degrees. For example, RotMatConvention = xyz with RotMat_alpha = phi and the other two angles equal to zero produces a rotation by phi around the x-axis, which is the neutron-beam axis.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotMatConvention="zyz",
)

RotMat_alpha#

First global Euler angle in degrees. Default value 0.0

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotMat_alpha=0.0,
)

RotMat_beta#

Second global Euler angle in degrees. Default value 0.0

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotMat_beta=0.0,
)

RotMat_gamma#

Third global Euler angle in degrees. Default value 0.0

RotMatConvention and the three RotMat angles are independent of RotDataConvention and the object-wise local rotations. This convention-aware interface intentionally interprets the global angles in the direct order (alpha, beta, gamma). It therefore replaces the earlier two-angle interpretation \(R_z(\mathrm{RotMat\_beta})R_y(\mathrm{RotMat\_alpha})\).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    RotMat_gamma=0.0,
)

Fourier Transform and Sampling#

These parameters select the Fourier-transform approach and define the reciprocal-space, real-space, and angular sampling grids.

Fourier_Approach#

Default atomistic Options: atomistic or micromagnetic.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Fourier_Approach="atomistic",
)

Number_Of_q_Points#

Number of sampled q values in Fourier space. Default value 1000

The value must be an integer larger than one.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Number_Of_q_Points=1000,
)

Number_Of_theta_Points#

Number of angular sampling points in Fourier space. Default value 1000

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Number_Of_theta_Points=1000,
)

q_min#

Minimum scattering vector in Fourier space in units of \(\mathrm{nm}^{-1}\). Default value 0.0

The value must be greater than or equal to zero.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    q_min=0.0,
)

q_max#

Maximum scattering vector in Fourier space in units of \(\mathrm{nm}^{-1}\). Default value 3.0

The value must be greater than q_min.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    q_max=3.0,
)

Number_Of_r_Points#

Number of sampled r values in real space (correlation). Default value 1000

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Number_Of_r_Points=1000,
)

Number_Of_alpha_Points#

Number of angular sampling points in real space (correlation). Default value 1000

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Number_Of_alpha_Points=1000,
)

r_max#

Maximum real-space correlation distance in units of \(\mathrm{nm}\). Default value 15.0

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    r_max=15.0,
)

k_max#

Maximum angular wave number. Default value 10

The value is a non-negative integer.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    k_max=10,
)

Angular_Spec#

Enable angular spectrum calculation. (binary selection) Default value 0 Options: 0 (disabled), 1 (enabled).

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Angular_Spec=1,
)

Physical Parameters#

These parameters define coordinate scaling, scattering normalization, and the incident-neutron polarization.

XYZ_Unit_Factor#

Conversion factors for coordinate units. Scaling factor applied to spatial coordinates. This parameter is equal to 1, if the positional input data is in units of \(\mathrm{nm}\). Default value 1

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    XYZ_Unit_Factor=1.0,
)

Scattering_Volume_V#

Effective scattering volume in units of \(\mathrm{m}^3\) Default value 2.618e-24

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Scattering_Volume_V=2.618e-24,
)

Polarization#

Polarization vector (Px, Py, Pz). Defines the polarization vector of the incoming neutron beam. Default (0,0,1)

The vector must be nonzero. NuMagSANS normalizes non-unit polarization vectors automatically.

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Polarization=(0.0, 0.0, 1.0),
)

Micromagnetic Parameters#

These parameters describe the magnetic and nuclear properties of discretized simulation cells.

Cell_Nuclear_SLD#

Description: Nuclear scattering length density of the cell Default 8e14

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Cell_Nuclear_SLD=8e14,
)

Cell_Magnetization#

Description: Magnetization inside the discretized cell Default 486e3

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Cell_Magnetization=486e3,
)

Cuboid_Cell_Size#

Description: Dimensions of the discretization cell (x,y,z) Default (2,2,2)

How to set in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    Cuboid_Cell_Size=(2.0, 2.0, 2.0),
)

Output Options#

Fourier-space correlation matrix#

Fourier_Gamma#

Exports the real and imaginary parts of the Fourier-space magnetization correlation-matrix components \(G_{ij}\) with \(i,j\in\{x,y,z\}\). The columns are added to the two-dimensional SANS output table.

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Fourier_Gamma"],
)

2D SANS cross sections#

The quantum-mechanical route from the effective neutron Hamiltonian to these spin-resolved cross sections is derived in Quantum Scattering Theory.

NuMagSANS is based on the unitary Fourier transform:

\[\widetilde{\mathbf{M}}(\mathbf{q}) = \frac{1}{(2\pi)^{3/2}} \int_{\mathbb{R}^3} \mathbf{M}(\mathbf{r}) \exp(-i \mathbf{q}\cdot\mathbf{r}) d^3r.\]
\[\mathbf{M}(\mathbf{r}) = \frac{1}{(2\pi)^{3/2}} \int_{\mathbb{R}^3} \widetilde{\mathbf{M}}(\mathbf{q}) \exp(+i \mathbf{q}\cdot\mathbf{r}) d^3q.\]

In NuMagSANS, the incoming neutron beam is defined to propagate along the \(x\)-axis, such that the corresponding wave vector satisfies \(\mathbf{k}_0 \parallel \mathbf{e}_x\). The two-dimensional detector plane is oriented perpendicular to the incident beam direction. The scattering vector \(\mathbf{q}\) on the detector can therefore be written as

\[\begin{split}\mathbf{q} = \begin{bmatrix} q_x \\ q_y \\ q_z \end{bmatrix} = \begin{bmatrix} 0 \\ q \sin\theta \\ q \cos\theta \end{bmatrix}.\end{split}\]

The magnetic SANS amplitudes are expressed through the Halpern-Johnson vector \(\widetilde{\mathbf{Q}}\), i.e. the component of the Fourier-transformed magnetization that contributes to magnetic neutron scattering:

\[\widetilde{\mathbf{Q}} = \hat{\mathbf{q}} \left(\hat{\mathbf{q}}\cdot\widetilde{\mathbf{M}}\right) - \widetilde{\mathbf{M}},\]

with

\[\begin{split}\hat{\mathbf{q}} = \begin{bmatrix} 0 \\ \sin\theta \\ \cos\theta \end{bmatrix}, \qquad \widetilde{\mathbf{M}} = \begin{bmatrix} \widetilde{M}_x \\ \widetilde{M}_y \\ \widetilde{M}_z \end{bmatrix}.\end{split}\]

For the detector geometry used in NuMagSANS this gives

\[\begin{split}\widetilde{\mathbf{Q}} = \begin{bmatrix} -\widetilde{M}_x \\ \left(\widetilde{M}_z\sin\theta-\widetilde{M}_y\cos\theta\right)\cos\theta \\ \left(\widetilde{M}_y\cos\theta-\widetilde{M}_z\sin\theta\right)\sin\theta \end{bmatrix}.\end{split}\]

The same expression is applied to the real and imaginary parts of \(\widetilde{\mathbf{M}}\) in the atomistic kernels.

In NuMagSANS the 2D SANS cross sections are exported in units of \(\mathrm{cm}^{-1}\).

The symmetry statements below assume real-valued nuclear and magnetic real-space fields and a real polarization vector. Their Fourier amplitudes then obey

\[\widetilde{N}(-\mathbf q)=\widetilde{N}(\mathbf q)^*, \qquad \widetilde{\mathbf M}(-\mathbf q) =\widetilde{\mathbf M}(\mathbf q)^*, \qquad \widetilde{\mathbf Q}(-\mathbf q) =\widetilde{\mathbf Q}(\mathbf q)^*.\]

Because \(-\mathbf q\) corresponds to \(\theta\rightarrow\theta+\pi\) on the detector, these relations impose the stated point-inversion symmetries independently of the detailed spatial profiles. They do not, in general, imply a symmetry under \(\theta\rightarrow\theta+\pi/2\); such a relation requires additional sample or magnetization symmetries.

Nuclear_2D#

Nuclear SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q,\theta) = \frac{8\pi^3}{V}\, |\widetilde{N}|^2\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Nuclear_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\mathrm{N}}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma_{\mathrm{N}}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q, \theta) = \frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q, \theta + \pi)\]

Unpolarized_2D#

Unpolarized magnetic SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\mathrm{M}}}{d\Omega}(q,\theta) = \frac{8\pi^3}{V}\, b_{\mathrm{H}}^2 |\widetilde{\mathbf{Q}}|^2\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Unpolarized_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\mathrm{M}}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma_{\mathrm{M}}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma_{\mathrm{M}}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{M}}}{d\Omega}(q,\theta+\pi)\]

Polarized_2D#

Auxiliary polarized magnetic SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta) = \frac{8\pi^3}{V}\, b_{\mathrm{H}}^2 \left|\hat{\mathbf{P}}\cdot\widetilde{\mathbf{Q}}\right|^2\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Polarized_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\mathrm{P}}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta+\pi)\]

NuclearMagnetic_2D#

Nuclear–magnetic SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) = \frac{8\pi^3}{V}\, b_{\mathrm{H}} \hat{\mathbf{P}}\cdot\left[\widetilde{N}\widetilde{\mathbf{Q}}^{\ast}+\widetilde{N}^{\ast}\widetilde{\mathbf{Q}}\right]\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["NuclearMagnetic_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta+\pi)\]

Chiral_2D#

Chiral SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta) = -i\frac{8\pi^3}{V}\, b_{\mathrm{H}}^2 \hat{\mathbf{P}}\cdot \left(\widetilde{\mathbf{Q}}\times\widetilde{\mathbf{Q}}^{\ast}\right)\]

In terms of the experimentally accessible spin-resolved spin-flip cross sections, the chiral contribution is their half-difference:

\[\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta) = \frac{1}{2} \left[ \frac{d\Sigma^{+-}}{d\Omega}(q,\theta) - \frac{d\Sigma^{-+}}{d\Omega}(q,\theta) \right]\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Chiral_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\chi}}{d\Omega}(-\mathbf{q}) = -\frac{d\Sigma_{\chi}}{d\Omega}(\mathbf{q})\]
\[\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta+\pi) = -\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta)\]

SpinFlip_2D#

Spin-flip SANS cross section on the 2D detector.

\[\frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{M}}}{d\Omega}(q,\theta) - \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta)\]

In terms of the experimentally accessible spin-resolved spin-flip cross sections, the spin-flip contribution is their half-sum:

\[\frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) = \frac{1}{2} \left[ \frac{d\Sigma^{+-}}{d\Omega}(q,\theta) + \frac{d\Sigma^{-+}}{d\Omega}(q,\theta) \right]\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["SpinFlip_2D"],
)

Symmetry properties:

\[\frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta+\pi)\]

PM_SpinFlip_2D#

Spin-flip SANS cross section on the 2D detector.

\[\frac{d\Sigma^{+-}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) + \frac{d\Sigma_{\chi}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PM_SpinFlip_2D"],
)

Symmetry properties:

\[\frac{d\Sigma^{+-}}{d\Omega}(-\mathbf{q}) = \frac{d\Sigma^{-+}}{d\Omega}(\mathbf{q})\]
\[\frac{d\Sigma^{+-}}{d\Omega}(q,\theta+\pi) = \frac{d\Sigma^{-+}}{d\Omega}(q,\theta)\]

MP_SpinFlip_2D#

Spin-flip SANS cross section on the 2D detector.

\[\frac{d\Sigma^{-+}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) - \frac{d\Sigma_{\chi}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MP_SpinFlip_2D"],
)

Symmetry properties:

\[\frac{d\Sigma^{-+}}{d\Omega}(-\mathbf{q}) = \frac{d\Sigma^{+-}}{d\Omega}(\mathbf{q})\]
\[\frac{d\Sigma^{-+}}{d\Omega}(q,\theta+\pi) = \frac{d\Sigma^{+-}}{d\Omega}(q,\theta)\]

PP_NonSpinFlip_2D#

Non-spin-flip SANS cross section on the 2D detector.

\[\frac{d\Sigma^{++}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q,\theta) + \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) + \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PP_NonSpinFlip_2D"],
)

Symmetry properties:

\[\frac{d\Sigma^{++}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma^{++}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma^{++}}{d\Omega}(q,\theta) = \frac{d\Sigma^{++}}{d\Omega}(q,\theta+\pi)\]

MM_NonSpinFlip_2D#

Non-spin-flip SANS cross section on the 2D detector.

\[\frac{d\Sigma^{--}}{d\Omega}(q,\theta) = \frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q,\theta) - \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) + \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MM_NonSpinFlip_2D"],
)

Symmetry properties:

\[\frac{d\Sigma^{--}}{d\Omega}(\mathbf{q}) = \frac{d\Sigma^{--}}{d\Omega}(-\mathbf{q})\]
\[\frac{d\Sigma^{--}}{d\Omega}(q,\theta) = \frac{d\Sigma^{--}}{d\Omega}(q,\theta+\pi)\]

P_SANSPOL_2D#

SANSPOL cross section for positive incident neutron polarization without final-state spin analysis.

\[\frac{d\Sigma^{+}}{d\Omega}(q,\theta) = \frac{d\Sigma^{++}}{d\Omega}(q,\theta) + \frac{d\Sigma^{+-}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["P_SANSPOL_2D"],
)

Symmetry properties:

In general, this channel has neither even nor odd point-inversion symmetry. Its antisymmetric part is fixed by the chiral cross section:

\[\frac{d\Sigma^{+}}{d\Omega}(\mathbf{q}) - \frac{d\Sigma^{+}}{d\Omega}(-\mathbf{q}) = 2\frac{d\Sigma_{\chi}}{d\Omega}(\mathbf{q})\]
\[\frac{d\Sigma^{+}}{d\Omega}(q,\theta) - \frac{d\Sigma^{+}}{d\Omega}(q,\theta+\pi) = 2\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta)\]

M_SANSPOL_2D#

SANSPOL cross section for negative incident neutron polarization without final-state spin analysis.

\[\frac{d\Sigma^{-}}{d\Omega}(q,\theta) = \frac{d\Sigma^{--}}{d\Omega}(q,\theta) + \frac{d\Sigma^{-+}}{d\Omega}(q,\theta)\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["M_SANSPOL_2D"],
)

Symmetry properties:

In general, this channel has neither even nor odd point-inversion symmetry. Its antisymmetric part is fixed by the chiral cross section:

\[\frac{d\Sigma^{-}}{d\Omega}(\mathbf{q}) - \frac{d\Sigma^{-}}{d\Omega}(-\mathbf{q}) = -2\frac{d\Sigma_{\chi}}{d\Omega}(\mathbf{q})\]
\[\frac{d\Sigma^{-}}{d\Omega}(q,\theta) - \frac{d\Sigma^{-}}{d\Omega}(q,\theta+\pi) = -2\frac{d\Sigma_{\chi}}{d\Omega}(q,\theta)\]

2D correlation functions#

NuMagSANS can compute two-dimensional real-space correlation functions from the detector-plane SANS cross sections. The real-space vector in the detector plane is parameterized as

\[\begin{split}\mathbf r = \begin{bmatrix} 0 \\ r\sin\alpha \\ r\cos\alpha \end{bmatrix},\end{split}\]

while the scattering vector in reciprocal space is written as

\[\begin{split}\mathbf q = \begin{bmatrix} 0 \\ q\sin\theta \\ q\cos\theta \end{bmatrix}.\end{split}\]

Using these parametrizations the scalar product becomes

\[\mathbf q\cdot\mathbf r = qr\cos(\theta-\alpha).\]

The two-dimensional correlation functions are obtained from the SANS cross sections via the cosine transform

\[C(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta .\]

The following two-dimensional correlation functions can be calculated.

Nuclear_Corr_2D#

2D correlation function of the nuclear SANS cross section.

\[C_{\mathrm N}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\mathrm N}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Nuclear_Corr_2D"],
)

Unpolarized_Corr_2D#

2D correlation function of the unpolarized magnetic SANS cross section.

\[C_{\mathrm M}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\mathrm M}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Unpolarized_Corr_2D"],
)

Polarized_Corr_2D#

2D correlation function of the polarized magnetic SANS cross section.

\[C_{\mathrm P}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\mathrm P}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Polarized_Corr_2D"],
)

NuclearMagnetic_Corr_2D#

2D correlation function of the nuclear–magnetic interference SANS cross section.

\[C_{\mathrm{NM}}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["NuclearMagnetic_Corr_2D"],
)

SpinFlip_Corr_2D#

2D correlation function of the spin-flip SANS cross section.

\[C_{\mathrm{sf}}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["SpinFlip_Corr_2D"],
)

Chiral_Corr_2D#

2D correlation function of the chiral SANS cross section.

\[C_{\chi}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma_{\chi}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Chiral_Corr_2D"],
)

PM_SpinFlip_Corr_2D#

2D correlation function of the \((+,-)\) spin-flip channel.

\[C^{+-}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{+-}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PM_SpinFlip_Corr_2D"],
)

MP_SpinFlip_Corr_2D#

2D correlation function of the \((-,+)\) spin-flip channel.

\[C^{-+}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{-+}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MP_SpinFlip_Corr_2D"],
)

PP_NonSpinFlip_Corr_2D#

2D correlation function of the \((+,+)\) non-spin-flip channel.

\[C^{++}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{++}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PP_NonSpinFlip_Corr_2D"],
)

MM_NonSpinFlip_Corr_2D#

2D correlation function of the \((-,-)\) non-spin-flip channel.

\[C^{--}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{--}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MM_NonSpinFlip_Corr_2D"],
)

P_SANSPOL_Corr_2D#

2D correlation function of the SANSPOL \((+ )\) channel.

\[C^{+}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{+}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["P_SANSPOL_Corr_2D"],
)

M_SANSPOL_Corr_2D#

2D correlation function of the SANSPOL \((- )\) channel.

\[C^{-}(r,\alpha) = \int_{0}^{\infty}\int_{0}^{2\pi} \frac{d\Sigma^{-}}{d\Omega}(q,\theta) \cos\left(qr\cos(\theta-\alpha)\right) q\,dq\,d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["M_SANSPOL_Corr_2D"],
)

1D Azimuthally averaged SANS cross sections#

In NuMagSANS the 1D SANS cross sections are exported in units of \(\mathrm{cm}^{-1}\).

Nuclear_1D#

Azimuthally averaged nuclear SANS cross section.

\[I_{\mathrm{N}}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{N}}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Nuclear_1D"],
)

Unpolarized_1D#

Azimuthally averaged unpolarized magnetic SANS cross section.

\[I_{\mathrm{M}}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{M}}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Unpolarized_1D"],
)

Polarized_1D#

Azimuthally averaged polarized magnetic SANS cross section.

\[I_{\mathrm{P}}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{P}}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Polarized_1D"],
)

NuclearMagnetic_1D#

Azimuthally averaged nuclear–magnetic interference cross section.

\[I_{\mathrm{NM}}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{NM}}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["NuclearMagnetic_1D"],
)

Chiral_1D#

Azimuthally averaged chiral SANS cross section.

\[I_{\chi}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\chi}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Chiral_1D"],
)

SpinFlip_1D#

Azimuthally averaged spin-flip SANS cross section.

\[I_{\mathrm{sf}}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma_{\mathrm{sf}}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["SpinFlip_1D"],
)

PM_SpinFlip_1D#

Azimuthally averaged spin-flip SANS cross section for the \((+,-)\) polarization channel.

\[I^{+-}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{+-}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PM_SpinFlip_1D"],
)

MP_SpinFlip_1D#

Azimuthally averaged spin-flip SANS cross section for the \((-,+)\) polarization channel.

\[I^{-+}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{-+}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MP_SpinFlip_1D"],
)

PP_NonSpinFlip_1D#

Azimuthally averaged non-spin-flip SANS cross section for the \((+,+)\) polarization channel.

\[I^{++}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{++}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PP_NonSpinFlip_1D"],
)

MM_NonSpinFlip_1D#

Azimuthally averaged non-spin-flip SANS cross section for the \((-,-)\) polarization channel.

\[I^{--}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{--}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MM_NonSpinFlip_1D"],
)

P_SANSPOL_1D#

Azimuthally averaged SANSPOL cross section for positive neutron polarization.

\[I^{+}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{+}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["P_SANSPOL_1D"],
)

M_SANSPOL_1D#

Azimuthally averaged SANSPOL cross section for negative neutron polarization.

\[I^{-}(q) = \frac{1}{2\pi} \int_{0}^{2\pi} \frac{d\Sigma^{-}}{d\Omega}(q,\theta) \, d\theta\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["M_SANSPOL_1D"],
)

1D Correlation functions#

In addition to the azimuthally averaged SANS cross sections \(I(q)\), NuMagSANS can compute the corresponding real-space correlation functions \(c(r)\). These functions are obtained from the scattering intensity via a spherical Bessel transform

\[c(r) = \int_{0}^{\infty} I(q)\, j_0(qr)\, q^2 \, dq ,\]

where \(j_0(x)\) denotes the spherical Bessel function of order zero,

\[j_0(x) = \frac{\sin x}{x}.\]

In NuMagSANS the 1D correlation functions are exported in units of \(\mathrm{nm}^{-4}\). The following correlation functions can be calculated.

Nuclear_Corr_1D#

Correlation function of the nuclear SANS cross section.

\[c_{\mathrm{N}}(r) = \int_{0}^{\infty} I_{\mathrm{N}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Nuclear_Corr_1D"],
)

Unpolarized_Corr_1D#

Correlation function of the unpolarized magnetic SANS cross section.

\[c_{\mathrm{M}}(r) = \int_{0}^{\infty} I_{\mathrm{M}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Unpolarized_Corr_1D"],
)

Polarized_Corr_1D#

Correlation function of the polarized magnetic SANS cross section.

\[c_{\mathrm{P}}(r) = \int_{0}^{\infty} I_{\mathrm{P}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Polarized_Corr_1D"],
)

NuclearMagnetic_Corr_1D#

Correlation function of the nuclear–magnetic interference SANS cross section.

\[c_{\mathrm{NM}}(r) = \int_{0}^{\infty} I_{\mathrm{NM}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["NuclearMagnetic_Corr_1D"],
)

Chiral_Corr_1D#

Correlation function of the chiral SANS cross section.

\[c_{\chi}(r) = \int_{0}^{\infty} I_{\chi}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Chiral_Corr_1D"],
)

SpinFlip_Corr_1D#

Correlation function of the spin-flip SANS cross section.

\[c_{\mathrm{sf}}(r) = \int_{0}^{\infty} I_{\mathrm{sf}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["SpinFlip_Corr_1D"],
)

PM_SpinFlip_Corr_1D#

Correlation function of the \((+,-)\) spin-flip channel.

\[c^{+-}(r) = \int_{0}^{\infty} I^{+-}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PM_SpinFlip_Corr_1D"],
)

MP_SpinFlip_Corr_1D#

Correlation function of the \((-,+)\) spin-flip channel.

\[c^{-+}(r) = \int_{0}^{\infty} I^{-+}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MP_SpinFlip_Corr_1D"],
)

PP_NonSpinFlip_Corr_1D#

Correlation function of the \((+,+)\) non-spin-flip channel.

\[c^{++}(r) = \int_{0}^{\infty} I^{++}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PP_NonSpinFlip_Corr_1D"],
)

MM_NonSpinFlip_Corr_1D#

Correlation function of the \((-,-)\) non-spin-flip channel.

\[c^{--}(r) = \int_{0}^{\infty} I^{--}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MM_NonSpinFlip_Corr_1D"],
)

P_SANSPOL_Corr_1D#

Correlation function of the SANSPOL \((+ )\) channel.

\[c^{+}(r) = \int_{0}^{\infty} I^{+}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["P_SANSPOL_Corr_1D"],
)

M_SANSPOL_Corr_1D#

Correlation function of the SANSPOL \((- )\) channel.

\[c^{-}(r) = \int_{0}^{\infty} I^{-}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["M_SANSPOL_Corr_1D"],
)

1D Pair-distance distribution functions#

In addition to the correlation functions \(c(r)\), NuMagSANS can compute the corresponding pair-distance distribution functions \(p(r)\). These functions are obtained from the correlation functions via

\[p(r) = r^2 c(r).\]

Using the definition of \(c(r)\), the pair-distance distribution function can also be written as

\[p(r) = r^2 \int_{0}^{\infty} I(q)\, j_0(qr)\, q^2 \, dq .\]

In NuMagSANS the 1D pair-distance distribution functions are exported in units of \(\mathrm{nm}^{-2}\). The following pair-distance distribution functions can be calculated.

Nuclear_PairDist_1D#

Pair-distance distribution function of the nuclear SANS cross section.

\[p_{\mathrm{N}}(r) = r^2 \int_{0}^{\infty} I_{\mathrm{N}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Nuclear_PairDist_1D"],
)

Unpolarized_PairDist_1D#

Pair-distance distribution function of the unpolarized magnetic SANS cross section.

\[p_{\mathrm{M}}(r) = r^2 \int_{0}^{\infty} I_{\mathrm{M}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Unpolarized_PairDist_1D"],
)

Polarized_PairDist_1D#

Pair-distance distribution function of the polarized magnetic SANS cross section.

\[p_{\mathrm{P}}(r) = r^2 \int_{0}^{\infty} I_{\mathrm{P}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Polarized_PairDist_1D"],
)

NuclearMagnetic_PairDist_1D#

Pair-distance distribution function of the nuclear–magnetic interference SANS cross section.

\[p_{\mathrm{NM}}(r) = r^2 \int_{0}^{\infty} I_{\mathrm{NM}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["NuclearMagnetic_PairDist_1D"],
)

Chiral_PairDist_1D#

Pair-distance distribution function of the chiral SANS cross section.

\[p_{\chi}(r) = r^2 \int_{0}^{\infty} I_{\chi}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["Chiral_PairDist_1D"],
)

SpinFlip_PairDist_1D#

Pair-distance distribution function of the spin-flip SANS cross section.

\[p_{\mathrm{sf}}(r) = r^2 \int_{0}^{\infty} I_{\mathrm{sf}}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["SpinFlip_PairDist_1D"],
)

PM_SpinFlip_PairDist_1D#

Pair-distance distribution function of the \((+,-)\) spin-flip channel.

\[p^{+-}(r) = r^2 \int_{0}^{\infty} I^{+-}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PM_SpinFlip_PairDist_1D"],
)

MP_SpinFlip_PairDist_1D#

Pair-distance distribution function of the \((-,+)\) spin-flip channel.

\[p^{-+}(r) = r^2 \int_{0}^{\infty} I^{-+}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MP_SpinFlip_PairDist_1D"],
)

PP_NonSpinFlip_PairDist_1D#

Pair-distance distribution function of the \((+,+)\) non-spin-flip channel.

\[p^{++}(r) = r^2 \int_{0}^{\infty} I^{++}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["PP_NonSpinFlip_PairDist_1D"],
)

MM_NonSpinFlip_PairDist_1D#

Pair-distance distribution function of the \((-,-)\) non-spin-flip channel.

\[p^{--}(r) = r^2 \int_{0}^{\infty} I^{--}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["MM_NonSpinFlip_PairDist_1D"],
)

P_SANSPOL_PairDist_1D#

Pair-distance distribution function of the SANSPOL \((+ )\) channel.

\[p^{+}(r) = r^2 \int_{0}^{\infty} I^{+}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["P_SANSPOL_PairDist_1D"],
)

M_SANSPOL_PairDist_1D#

Pair-distance distribution function of the SANSPOL \((- )\) channel.

\[p^{-}(r) = r^2 \int_{0}^{\infty} I^{-}(q)\, j_0(qr)\, q^2 \, dq\]

How to enable in the write_config function of the Python interface:

# Write configuration file
sim.write_config(
    ...,
    enable_outputs=["M_SANSPOL_PairDist_1D"],
)