Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::DataObjects::ReflectometryTransform Class Reference

ReflectometryMDTransform : Base type for reflectometry transforms to MDWorkspaces. More...

#include <ReflectometryTransform.h>

Public Member Functions

Mantid::API::MatrixWorkspace_sptr execute (const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const
 Convert to the output dimensions. More...
 
Mantid::API::IMDEventWorkspace_sptr executeMD (const Mantid::API::MatrixWorkspace_const_sptr &inputWs, const Mantid::API::BoxController_sptr &boxController, Mantid::Geometry::MDFrame_uptr frame) const
 Performs centre-point rebinning and produces an MDWorkspace. More...
 
Mantid::API::IMDHistoWorkspace_sptr executeMDNormPoly (const Mantid::API::MatrixWorkspace_const_sptr &inputWs) const
 
Mantid::API::MatrixWorkspace_sptr executeNormPoly (const Mantid::API::MatrixWorkspace_const_sptr &inputWS, std::shared_ptr< Mantid::DataObjects::TableWorkspace > &vertexes, bool dumpVertexes, const std::string &outputDimensions) const
 Execuate transformation using normalised polynomial binning. More...
 
 ReflectometryTransform (std::string d0Label, std::string d0ID, double d0Min, double d0Max, std::string d1Label, std::string d1ID, double d1Min, double d1Max, size_t d0NumBins, size_t d1NumBins, CalculateReflectometry *calc)
 Constructor. More...
 
virtual ~ReflectometryTransform ()=default
 

Protected Member Functions

std::shared_ptr< DataObjects::MDEventWorkspace2LeancreateMDWorkspace (const Geometry::IMDDimension_sptr &, const Geometry::IMDDimension_sptr &, const API::BoxController_sptr &boxController) const
 Creates an MD workspace. More...
 

Protected Attributes

std::shared_ptr< CalculateReflectometrym_calculator
 
const std::string m_d0ID
 
const std::string m_d0Label
 
const double m_d0Max
 
const double m_d0Min
 
const size_t m_d0NumBins
 
const std::string m_d1ID
 
const std::string m_d1Label
 
const double m_d1Max
 
const double m_d1Min
 
const size_t m_d1NumBins
 

Detailed Description

ReflectometryMDTransform : Base type for reflectometry transforms to MDWorkspaces.

This is a Strategy Design Pattern.

Date
2012-05-29

Definition at line 40 of file ReflectometryTransform.h.

Constructor & Destructor Documentation

◆ ~ReflectometryTransform()

virtual Mantid::DataObjects::ReflectometryTransform::~ReflectometryTransform ( )
virtualdefault

◆ ReflectometryTransform()

Mantid::DataObjects::ReflectometryTransform::ReflectometryTransform ( std::string  d0Label,
std::string  d0ID,
double  d0Min,
double  d0Max,
std::string  d1Label,
std::string  d1ID,
double  d1Min,
double  d1Max,
size_t  d0NumBins,
size_t  d1NumBins,
CalculateReflectometry calc 
)

Constructor.

Parameters
d0Label: label for the first dimension axis
d0ID: unique identifier for the first dimension
d0Min: minimum value for the first dimension
d0Max: maximum value for the first dimension
d0NumBins: number of bins in first dimension
d1Label: label for the second dimension axis
d1ID: unique identifier for the second dimension
d1Min: minimum value for the second dimension
d1Max: maximum value for the second dimension
d1NumBins: number of bins in the second dimension
calc: Pointer to CalculateReflectometry object.

Definition at line 104 of file ReflectometryTransform.cpp.

Member Function Documentation

◆ createMDWorkspace()

std::shared_ptr< MDEventWorkspace2Lean > Mantid::DataObjects::ReflectometryTransform::createMDWorkspace ( const Geometry::IMDDimension_sptr a,
const Geometry::IMDDimension_sptr b,
const API::BoxController_sptr boxController 
) const
protected

Creates an MD workspace.

Parameters
a: pointer to the first dimension of the MDWorkspace
b: pointer to the second dimension of the MDWorkspace
boxController: controls how the MDWorkspace will be split

Definition at line 121 of file ReflectometryTransform.cpp.

Referenced by executeMD().

◆ execute()

Mantid::API::MatrixWorkspace_sptr Mantid::DataObjects::ReflectometryTransform::execute ( const Mantid::API::MatrixWorkspace_const_sptr inputWs) const

Convert to the output dimensions.

Parameters
inputWs: Input Matrix workspace
Returns
workspace group containing output matrix workspaces of ki and kf

Definition at line 308 of file ReflectometryTransform.cpp.

References Mantid::DataObjects::createVerticalAxis(), Mantid::DataObjects::createXAxis(), index, m_calculator, m_d0Label, m_d0Max, m_d0Min, m_d0NumBins, m_d1Label, m_d1Max, m_d1Min, m_d1NumBins, and Mantid::Kernel::twoTheta.

◆ executeMD()

Mantid::API::IMDEventWorkspace_sptr Mantid::DataObjects::ReflectometryTransform::executeMD ( const Mantid::API::MatrixWorkspace_const_sptr inputWs,
const Mantid::API::BoxController_sptr boxController,
Mantid::Geometry::MDFrame_uptr  frame 
) const

Performs centre-point rebinning and produces an MDWorkspace.

Parameters
inputWs: The workspace you wish to perform centre-point rebinning on.
boxController: controls how the MDWorkspace will be split
framethe md frame for the two MDHistoDimensions
Returns
An MDWorkspace based on centre-point rebinning of the inputWS

Definition at line 270 of file ReflectometryTransform.cpp.

References createMDWorkspace(), index, m_calculator, m_d0ID, m_d0Label, m_d0Max, m_d0Min, m_d0NumBins, m_d1ID, m_d1Label, m_d1Max, m_d1Min, m_d1NumBins, and Mantid::Kernel::twoTheta.

◆ executeMDNormPoly()

IMDHistoWorkspace_sptr Mantid::DataObjects::ReflectometryTransform::executeMDNormPoly ( const Mantid::API::MatrixWorkspace_const_sptr inputWs) const

Definition at line 358 of file ReflectometryTransform.cpp.

References Mantid::Geometry::Y.

◆ executeNormPoly()

MatrixWorkspace_sptr Mantid::DataObjects::ReflectometryTransform::executeNormPoly ( const Mantid::API::MatrixWorkspace_const_sptr inputWS,
std::shared_ptr< Mantid::DataObjects::TableWorkspace > &  vertexes,
bool  dumpVertexes,
const std::string &  outputDimensions 
) const

Execuate transformation using normalised polynomial binning.

Execution path for NormalisedPolygon Rebinning.

Parameters
inputWS: Workspace to be rebinned
vertexes: TableWorkspace for debugging purposes
dumpVertexes: determines whether vertexes will be written to for debugging purposes or not
outputDimensions: used for the column headings for Dump Vertexes

Definition at line 399 of file ReflectometryTransform.cpp.

References Mantid::Kernel::VectorHelper::createAxisFromRebinParams(), error, Mantid::DataObjects::FractionalRebinning::finalizeFractionalRebin(), Mantid::DataObjects::initAngularCaches(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_calculator, m_d0Label, m_d0Max, m_d0Min, m_d0NumBins, m_d1Label, m_d1Max, m_d1Min, m_d1NumBins, Mantid::DataObjects::FractionalRebinning::normaliseOutput(), Mantid::DataObjects::FractionalRebinning::rebinToFractionalOutput(), Mantid::Kernel::twoTheta, Mantid::DataObjects::DetectorAngularCache::twoThetas, Mantid::DataObjects::DetectorAngularCache::twoThetaWidths, Mantid::Geometry::X, and Mantid::Geometry::Y.

Member Data Documentation

◆ m_calculator

std::shared_ptr<CalculateReflectometry> Mantid::DataObjects::ReflectometryTransform::m_calculator
protected

Definition at line 52 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d0ID

const std::string Mantid::DataObjects::ReflectometryTransform::m_d0ID
protected

Definition at line 50 of file ReflectometryTransform.h.

Referenced by executeMD().

◆ m_d0Label

const std::string Mantid::DataObjects::ReflectometryTransform::m_d0Label
protected

Definition at line 48 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d0Max

const double Mantid::DataObjects::ReflectometryTransform::m_d0Max
protected

Definition at line 46 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d0Min

const double Mantid::DataObjects::ReflectometryTransform::m_d0Min
protected

Definition at line 44 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d0NumBins

const size_t Mantid::DataObjects::ReflectometryTransform::m_d0NumBins
protected

Definition at line 42 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d1ID

const std::string Mantid::DataObjects::ReflectometryTransform::m_d1ID
protected

Definition at line 51 of file ReflectometryTransform.h.

Referenced by executeMD().

◆ m_d1Label

const std::string Mantid::DataObjects::ReflectometryTransform::m_d1Label
protected

Definition at line 49 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d1Max

const double Mantid::DataObjects::ReflectometryTransform::m_d1Max
protected

Definition at line 47 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d1Min

const double Mantid::DataObjects::ReflectometryTransform::m_d1Min
protected

Definition at line 45 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().

◆ m_d1NumBins

const size_t Mantid::DataObjects::ReflectometryTransform::m_d1NumBins
protected

Definition at line 43 of file ReflectometryTransform.h.

Referenced by execute(), executeMD(), and executeNormPoly().


The documentation for this class was generated from the following files: