MDNormDirectSC v1

../_images/MDNormDirectSC-v1_dlg.png

MDNormDirectSC dialog.

Summary

Calculate normalization for an MDEvent workspace for single crystal direct geometry inelastic measurement.

Properties

Name Direction Type Default Description
InputWorkspace Input MDEventWorkspace Mandatory An input MDWorkspace.
AlignedDim0 Input string   Binning parameters for the 0th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
AlignedDim1 Input string   Binning parameters for the 1th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
AlignedDim2 Input string   Binning parameters for the 2th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
AlignedDim3 Input string   Binning parameters for the 3th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
AlignedDim4 Input string   Binning parameters for the 4th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
AlignedDim5 Input string   Binning parameters for the 5th dimension. Enter it as a comma-separated list of values with the format: ‘name,minimum,maximum,number_of_bins’. Leave blank for NONE.
SolidAngleWorkspace Input MatrixWorkspace   An input workspace containing integrated vanadium (a measure of the solid angle).
OutputWorkspace Output Workspace Mandatory A name for the output data MDHistoWorkspace.
OutputNormalizationWorkspace Output Workspace Mandatory A name for the output normalization MDHistoWorkspace.

Description

The algorithm calculates a normalization MD workspace for single crystal direct geometry inelastic experiments. Trajectories of each detector in reciprocal space are calculated, and the flux is integrated between intersections with each MDBox. A brief introduction to the multi-dimensional data normalization can be found here.

Note

This is an experimental algorithm in Release 3.3. Please check the nightly Mantid build, and the Mantid webpage for better offline help and usage examples.

Note

If the MDEvent input workspace is generated from an event workspace, the algorithm gives the correct normalization only if the event workspace is cropped and binned to the same energy transfer range. If the workspace is not cropped, one might have events in places where the normalization is calculated to be 0.

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.

Example - MDNormDirectSC

import mantid
import os
from mantid.simpleapi import *
config['default.facility']="SNS"
from numpy import *

DGS_input_data=Load("CNCS_7860")
# Keep events (SofPhiEIsDistribution=False)
# Do not normalize by proton charge in DgsReduction
DGS_output_data=DgsReduction(
         SampleInputWorkspace=DGS_input_data,
         SofPhiEIsDistribution=False,
         IncidentBeamNormalisation="None",
         EnergyTransferRange="-1.5,0.01,2.7",
        )
DGS_output_data=DGS_output_data[0]
SetGoniometer(DGS_output_data,Axis0="10.,0,1,0,1")
SetUB(DGS_output_data, 5.,3.2,7.2)
DGS_output_data=CropWorkspace(DGS_output_data,XMin=-1.5,XMax=2.7)
MDE=ConvertToMD(DGS_output_data,
        QDimensions="Q3D",
        dEAnalysisMode="Direct",
        Q3DFrames="HKL",
        QConversionScales="HKL")
histoData,histoNorm=MDNormDirectSC(MDE,
        AlignedDim0="[H,0,0],-0.2,1.6,100",
        AlignedDim1="DeltaE,-1.5,3.,100",
        )
normalized=histoData/histoNorm
histoShape=histoNorm.getSignalArray().shape
print "The normalization workspace shape is (%d, %d)" % histoShape
print "Out of those elements, "+str(nonzero(histoNorm.getSignalArray())[0].size)+" are nonzero"
The normalization workspace shape is (100, 100)
Out of those elements, 6712 are nonzero

The output would look like:

MDNormDirectSC.png

Categories: Algorithms | MDAlgorithms

Source

C++ source: MDNormDirectSC.cpp

C++ header: MDNormDirectSC.h