BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SimDataPair Class Reference

Holds pair of simulation/experimental data to fit. More...

Public Member Functions

 SimDataPair (simulation_builder_t builder, const OutputData< double > &data, std::unique_ptr< OutputData< double >> uncertainties, double user_weight=1.0)
 
 SimDataPair (simulation_builder_t builder, const OutputData< double > &data, std::unique_ptr< OutputData< double >> uncertainties, std::unique_ptr< OutputData< double >> user_weights)
 
 SimDataPair (SimDataPair &&other)
 
void runSimulation (const Fit::Parameters &params)
 
bool containsUncertainties () const
 
size_t numberOfFitElements () const
 Returns the number of elements in the fit area.
 
SimulationResult simulationResult () const
 Returns the result of last computed simulation.
 
SimulationResult experimentalData () const
 Returns the experimental data cut to the ROI area.
 
SimulationResult uncertainties () const
 Returns the data uncertainties cut to the ROI area If no uncertainties present, returns zero-filled SimulationResult.
 
SimulationResult userWeights () const
 Returns the user uncertainties cut to the ROI area.
 
SimulationResult relativeDifference () const
 Returns the relative difference between simulated and experimental data cut to the ROI area. More...
 
SimulationResult absoluteDifference () const
 Returns the absolute difference between simulated and experimental data cut to the ROI area.
 
std::vector< double > simulation_array () const
 Returns the flattened simulated intensities cut to the ROI area.
 
std::vector< double > experimental_array () const
 Returns the flattened experimental data cut to the ROI area.
 
std::vector< double > uncertainties_array () const
 Returns the flattened experimental uncertainties cut to the ROI area. More...
 
std::vector< double > user_weights_array () const
 Returns a flat array of user weights cut to the ROI area.
 

Detailed Description

Holds pair of simulation/experimental data to fit.

Definition at line 25 of file SimDataPair.h.

Member Function Documentation

◆ relativeDifference()

SimulationResult SimDataPair::relativeDifference ( ) const

Returns the relative difference between simulated and experimental data cut to the ROI area.

Returns relative difference between simulation and experimental data.

Definition at line 122 of file SimDataPair.cpp.

◆ uncertainties_array()

std::vector< double > SimDataPair::uncertainties_array ( ) const

Returns the flattened experimental uncertainties cut to the ROI area.

If no uncertainties are available, returns a zero-filled array sized to the ROI area.

Definition at line 160 of file SimDataPair.cpp.


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