BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SimulationResult Class Reference

Description

Wrapper around Datafield that also provides unit conversions.

Public Member Functions

 SimulationResult ()=default
 
 SimulationResult (const Datafield &data, const ICoordSystem &coords)
 
 SimulationResult (const Datafield &data, const ICoordSystem *&&coords)
 
 SimulationResult (const SimulationResult &other)
 
 SimulationResult (SimulationResult &&other)
 
 ~SimulationResult ()
 
PyObject * array (Coords units=Coords::UNDEFINED) const
 Returns intensity data as Python numpy array. More...
 
std::pair< double, double > axisMinMax (size_t i, Coords units=Coords::UNDEFINED) const
 
std::string axisName (size_t i, Coords units=Coords::UNDEFINED) const
 
std::vector< double > convertedBinCenters (Coords units=Coords::UNDEFINED) const
 
std::vector< double > convertedBinCenters (size_t i_axis, Coords units=Coords::UNDEFINED) const
 Returns axis coordinates as a numpy array. With no parameters given Returns coordinates of x-axis in default units. More...
 
const ICoordSystem & converter () const
 Returns underlying unit converter. More...
 
Datafielddatafield (Coords units=Coords::UNDEFINED) const
 
bool empty () const
 
std::vector< double > flatVector (Coords units=Coords::UNDEFINED) const
 
SimulationResultoperator= (const SimulationResult &other)
 
SimulationResultoperator= (SimulationResult &&other)
 
double & operator[] (size_t i)
 
const double & operator[] (size_t i) const
 
size_t rank () const
 Data element access. More...
 
SimulationResult relativeToMaximum () const
 Returns modified SimulationResult: all intensities dvided by maximum intensity. More...
 
void setTitle (const std::string &title)
 
size_t size () const
 
std::string title ()
 

Constructor & Destructor Documentation

◆ SimulationResult() [1/5]

SimulationResult::SimulationResult ( )
default

◆ SimulationResult() [2/5]

SimulationResult::SimulationResult ( const Datafield data,
const ICoordSystem &  coords 
)

◆ SimulationResult() [3/5]

SimulationResult::SimulationResult ( const Datafield data,
const ICoordSystem *&&  coords 
)

◆ ~SimulationResult()

SimulationResult::~SimulationResult ( )

◆ SimulationResult() [4/5]

SimulationResult::SimulationResult ( const SimulationResult other)

◆ SimulationResult() [5/5]

SimulationResult::SimulationResult ( SimulationResult &&  other)

Member Function Documentation

◆ array()

PyObject* SimulationResult::array ( Coords  units = Coords::UNDEFINED) const

Returns intensity data as Python numpy array.

◆ axisMinMax()

std::pair<double, double> SimulationResult::axisMinMax ( size_t  i,
Coords  units = Coords::UNDEFINED 
) const

◆ axisName()

std::string SimulationResult::axisName ( size_t  i,
Coords  units = Coords::UNDEFINED 
) const

◆ convertedBinCenters() [1/2]

std::vector<double> SimulationResult::convertedBinCenters ( Coords  units = Coords::UNDEFINED) const

◆ convertedBinCenters() [2/2]

std::vector<double> SimulationResult::convertedBinCenters ( size_t  i_axis,
Coords  units = Coords::UNDEFINED 
) const

Returns axis coordinates as a numpy array. With no parameters given Returns coordinates of x-axis in default units.

◆ converter()

const ICoordSystem& SimulationResult::converter ( ) const

Returns underlying unit converter.

◆ datafield()

Datafield* SimulationResult::datafield ( Coords  units = Coords::UNDEFINED) const

◆ empty()

bool SimulationResult::empty ( ) const

◆ flatVector()

std::vector<double> SimulationResult::flatVector ( Coords  units = Coords::UNDEFINED) const

◆ operator=() [1/2]

SimulationResult& SimulationResult::operator= ( const SimulationResult other)

◆ operator=() [2/2]

SimulationResult& SimulationResult::operator= ( SimulationResult &&  other)

◆ operator[]() [1/2]

double& SimulationResult::operator[] ( size_t  i)

◆ operator[]() [2/2]

const double& SimulationResult::operator[] ( size_t  i) const

◆ rank()

size_t SimulationResult::rank ( ) const

Data element access.

◆ relativeToMaximum()

SimulationResult SimulationResult::relativeToMaximum ( ) const

Returns modified SimulationResult: all intensities dvided by maximum intensity.

◆ setTitle()

void SimulationResult::setTitle ( const std::string &  title)

◆ size()

size_t SimulationResult::size ( ) const

◆ title()

std::string SimulationResult::title ( )