BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ResolutionFunction2DGaussianItem Class Reference

Description

Definition at line 43 of file ResolutionFunctionItems.h.

Inheritance diagram for ResolutionFunction2DGaussianItem:
[legend]
Collaboration diagram for ResolutionFunction2DGaussianItem:
[legend]

Public Member Functions

 ResolutionFunction2DGaussianItem ()
 
std::unique_ptr< IResolutionFunction2D > createResolutionFunction (double scale=1.0) const override
 
 DOUBLE_PROPERTY (sigmaX, SigmaX)
 
 DOUBLE_PROPERTY (sigmaY, SigmaY)
 
void serialize (Streamer &s) override
 
void setUnit (const std::variant< QString, Unit > &unit) override
 Set the unit of the distributed value. More...
 

Constructor & Destructor Documentation

◆ ResolutionFunction2DGaussianItem()

ResolutionFunction2DGaussianItem::ResolutionFunction2DGaussianItem ( )

Definition at line 25 of file ResolutionFunctionItems.cpp.

26 {
27  m_sigmaX.init("Sigma X", "Resolution along horizontal axis", 0.02, Unit::degree, 3,
28  RealLimits::lowerLimited(0.0), "sigmaX");
29  m_sigmaY.init("Sigma Y", "Resolution along vertical axis", 0.02, Unit::degree, 3,
30  RealLimits::lowerLimited(0.0), "sigmaY");
31 }
@ degree

References degree.

Member Function Documentation

◆ createResolutionFunction()

std::unique_ptr< IResolutionFunction2D > ResolutionFunction2DGaussianItem::createResolutionFunction ( double  scale = 1.0) const
overridevirtual

Implements ResolutionFunctionItem.

Definition at line 34 of file ResolutionFunctionItems.cpp.

35 {
36  return std::make_unique<ResolutionFunction2DGaussian>(scale * m_sigmaX, scale * m_sigmaY);
37 }

◆ DOUBLE_PROPERTY() [1/2]

ResolutionFunction2DGaussianItem::DOUBLE_PROPERTY ( sigmaX  ,
SigmaX   
)

◆ DOUBLE_PROPERTY() [2/2]

ResolutionFunction2DGaussianItem::DOUBLE_PROPERTY ( sigmaY  ,
SigmaY   
)

◆ serialize()

void ResolutionFunction2DGaussianItem::serialize ( Streamer s)
overridevirtual

Reimplemented from ResolutionFunctionItem.

Definition at line 45 of file ResolutionFunctionItems.cpp.

46 {
47  s.assertVersion(0);
48  Serialize::rwProperty(s, m_sigmaX);
49  Serialize::rwProperty(s, m_sigmaY);
50 }
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), and Serialize::rwProperty().

Here is the call graph for this function:

◆ setUnit()

void ResolutionFunction2DGaussianItem::setUnit ( const std::variant< QString, Unit > &  )
overridevirtual

Set the unit of the distributed value.

Reimplemented from ResolutionFunctionItem.

Definition at line 39 of file ResolutionFunctionItems.cpp.

40 {
41  m_sigmaX.setUnit(unit);
42  m_sigmaY.setUnit(unit);
43 }

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