Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Kernel::AttenuationProfile Class Reference

#include <AttenuationProfile.h>

Public Member Functions

 AttenuationProfile ()
 
 AttenuationProfile (const std::string &inputFileName, const std::string &searchPath, Material *extrapolationMaterial=nullptr, double extrapolationMaxX=100)
 Construct an attenuation profile object. More...
 
double getAttenuationCoefficient (const double x) const
 Returns the attenuation coefficient for the supplied x value. More...
 
void setAttenuationCoefficient (const double x, const double atten)
 Set the attenuation coefficient at x value. More...
 

Private Attributes

Kernel::Interpolation m_Interpolator
 

Detailed Description

Definition at line 18 of file AttenuationProfile.h.

Constructor & Destructor Documentation

◆ AttenuationProfile() [1/2]

Mantid::Kernel::AttenuationProfile::AttenuationProfile ( )
inline

Definition at line 20 of file AttenuationProfile.h.

◆ AttenuationProfile() [2/2]

Mantid::Kernel::AttenuationProfile::AttenuationProfile ( const std::string &  inputFileName,
const std::string &  searchPath,
Material extrapolationMaterial = nullptr,
double  extrapolationMaxX = 100 
)

Construct an attenuation profile object.

Parameters
inputFileName:: The name of the file containing the attenuation profile data. Filename can be a full path or just file name
searchPath:: Path to search for the input file
extrapolationMaxX:: X value at which a point will be inserted from the tabulated attenuation data to assist with extrapolation
extrapolationMaterial:: Material whose properties will be used to extrapolate beyond the lambda range of the supplied profile

Definition at line 27 of file AttenuationProfile.cpp.

References Mantid::Kernel::Interpolation::addPoint(), Mantid::Kernel::Material::attenuationCoefficient(), Mantid::Kernel::Interpolation::containData(), error, Mantid::DataHandling::exists(), Mantid::Kernel::SingletonHolder< T >::Instance(), m_Interpolator, and Mantid::Geometry::x.

Member Function Documentation

◆ getAttenuationCoefficient()

double Mantid::Kernel::AttenuationProfile::getAttenuationCoefficient ( const double  x) const

Returns the attenuation coefficient for the supplied x value.

Parameters
xThe x value (typically wavelength) that the attenuation coefficient is required for (Angstroms)
Returns
Attenuation coefficient ie alpha in I/I0=exp(-alpha*distance)

Definition at line 95 of file AttenuationProfile.cpp.

References m_Interpolator, Mantid::Kernel::Interpolation::value(), and Mantid::Geometry::x.

◆ setAttenuationCoefficient()

void Mantid::Kernel::AttenuationProfile::setAttenuationCoefficient ( const double  x,
const double  atten 
)

Set the attenuation coefficient at x value.

Parameters
xThe x value (typically wavelength) that the attenuation coefficient is required for (Angstroms)
attenattenuation coefficient at x value

Definition at line 102 of file AttenuationProfile.cpp.

References Mantid::Kernel::Interpolation::addPoint(), m_Interpolator, and Mantid::Geometry::x.

Member Data Documentation

◆ m_Interpolator

Kernel::Interpolation Mantid::Kernel::AttenuationProfile::m_Interpolator
private

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