\(\renewcommand\AA{\unicode{x212B}}\)

VesuvioCalculateMS v1

../_images/ImageNotFound.png

Enable screenshots using DOCS_SCREENSHOTS in CMake

Summary

Calculates the contributions of multiple scattering on a flat plate sample for VESUVIO

See Also

MayersSampleCorrection, MonteCarloAbsorption, CarpenterSampleCorrection

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

Input workspace to be corrected, in units of TOF.

NoOfMasses

Input

number

Mandatory

The number of masses contained within the sample

SampleDensity

Input

number

Mandatory

The density of the sample in gm/cm^3

AtomicProperties

Input

dbl list

Mandatory

Atomic properties of masses within the sample. The expected format is 3 consecutive values per mass: mass(amu), cross-section (barns) & s.d of Compton profile.

BeamRadius

Input

number

Mandatory

Radius, in cm, of beam

Seed

Input

number

123456789

Seed the random number generator with this value

NumScatters

Input

number

3

Number of scattering orders to calculate

NumRuns

Input

number

10

Number of simulated runs per spectrum

NumEventsPerRun

Input

number

50000

Number of events per run

TotalScatteringWS

Output

MatrixWorkspace

Mandatory

Workspace to store the calculated total scattering counts

MultipleScatteringWS

Output

MatrixWorkspace

Mandatory

Workspace to store the calculated multiple scattering counts summed for all orders

Description

Calculates the multiple scattering contribution for deep inelastic neutron scattering on the Vesuvio instrument at ISIS. The algorithm follows the procedures defined by J. Mayers et al. [1]. To improve the speed of the calculation, OpenMP was used for the calculation of scattering contributions per spectrum. Users are recommended to use the user properties file properties file, Mantid.user.properties, to set the parameter MultiThreaded.MaxCores to 0 for a better utilisation of available cores.

Usage

runs = "" # fill in run numbers here
ip_file = "" # fill in IP file here
data = LoadVesuvio(Filename=, SpectrumList=spectra,
                   Mode="SingleDifference", InstrumentParFile=ip_file)
# Cut it down to the typical range
data = CropWorkspace(raw_ws,XMin=50.0,XMax=562.0)
# Coarser binning
data = Rebin(raw_ws, Params=[49.5, 1.0, 562.5])

# Create sample shape
height = 0.1 # y-dir (m)
width = 0.1 # x-dir (m)
thick = 0.005 # z-dir (m)

half_height, half_width, half_thick = 0.5*height, 0.5*width, 0.5*thick
xml_str = \
   " <cuboid id=\"sample-shape\"> " \
    + "<left-front-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width,-half_height,half_thick) \
    + "<left-front-top-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width, half_height, half_thick) \
    + "<left-back-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (half_width, -half_height, -half_thick) \
    + "<right-front-bottom-point x=\"%f\" y=\"%f\" z=\"%f\" /> " % (-half_width, -half_height, half_thick) \
    + "</cuboid>"
CreateSampleShape(data, xml_str)
atom_props = [1.007900, 0.9272392, 5.003738,
              16.00000, 3.2587662E-02, 13.92299,
              27.50000, 4.0172841E-02, 15.07701]
tot_scatter, ms_scatter = \
    VesuvioCalculateMS(data, NoOfMasses=3, SampleDensity=241, AtomicProperties=atom_props,
                       BeamRadius=2.5)

References

Categories: AlgorithmIndex | CorrectionFunctions\SpecialCorrections

Source

C++ header: VesuvioCalculateMS.h

C++ source: VesuvioCalculateMS.cpp