BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimulationResult Class Reference

Wrapper around OutputData<double> that also provides unit conversions. More...

Public Member Functions

 SimulationResult (const OutputData< double > &data, const IUnitConverter &unit_converter)
 
 SimulationResult (const SimulationResult &other)
 
 SimulationResult (SimulationResult &&other)
 
PyObject * array (Axes::Units units=Axes::Units::DEFAULT) const
 returns intensity data as Python numpy array
 
std::vector< double > axis (Axes::Units units=Axes::Units::DEFAULT) const
 
std::vector< double > axis (size_t i_axis, Axes::Units units=Axes::Units::DEFAULT) const
 Returns axis coordinates as a numpy array. More...
 
std::vector< AxisInfoaxisInfo (Axes::Units units=Axes::Units::DEFAULT) const
 Provide AxisInfo for each axis and the given units.
 
const IUnitConverter & converter () const
 Returns underlying unit converter.
 
bool empty () const
 
Histogram2Dhistogram2d (Axes::Units units=Axes::Units::DEFAULT) const
 
double max () const
 
SimulationResultoperator= (const SimulationResult &other)
 
SimulationResultoperator= (SimulationResult &&other)
 
double & operator[] (size_t i)
 Data element access.
 
const double & operator[] (size_t i) const
 
size_t size () const
 

Detailed Description

Wrapper around OutputData<double> that also provides unit conversions.

Member Function Documentation

◆ axis()

std::vector< double > SimulationResult::axis ( size_t  i_axis,
Axes::Units  units = Axes::Units::DEFAULT 
) const

Returns axis coordinates as a numpy array.

With no parameters given returns coordinates of x-axis in default units.