BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Holds vector of SimDataPair
s (experimental data and simulation results) for use in fitting.
More...
Public Member Functions | |
SimulationResult | absoluteDifference (size_t i_item=0) const |
Returns absolute value of difference between simulation and experimental data in the form of SimulationResult. | |
template<class T > | |
void | addSimulationAndData (PyBuilderCallback &callback, const T &data, const T &uncertainties, double weight=1.0) |
Constructs simulation/data pair for later fit. More... | |
template<class T > | |
void | addSimulationAndData (PyBuilderCallback &callback, const T &data, double weight=1.0) |
Constructs simulation/data pair for later fit. More... | |
bool | allPairsHaveUncertainties () const |
Returns true if all the data pairs in FitObjective instance contain uncertainties. | |
bool | containsUncertainties (size_t i_item) const |
Returns true if the specified DataPair element contains uncertainties. | |
virtual double | evaluate (const mumufit::Parameters ¶ms) |
virtual std::vector< double > | evaluate_residuals (const mumufit::Parameters ¶ms) |
std::vector< double > | experimental_array () const |
Returns one dimensional array representing merged experimental data. More... | |
SimulationResult | experimentalData (size_t i_item=0) const |
Returns experimental data in the form of SimulationResult. | |
void | finalize (const mumufit::MinimizerResult &result) |
Should be explicitely called on last iteration to notify all observers. | |
unsigned | fitObjectCount () const |
void | initPlot (int every_nth, PyObserverCallback &callback) |
Initializes observer callback to be called on every_nth fit iteration. | |
void | initPrint (int every_nth) |
Initializes printing to standard output on every_nth fit iteration. | |
IterationInfo | iterationInfo () const |
mumufit::MinimizerResult | minimizerResult () const |
size_t | numberOfFitElements () const |
SimulationResult | relativeDifference (size_t i_item=0) const |
Returns relative difference between simulation and experimental data in the form of SimulationResult. | |
void | run_simulations (const mumufit::Parameters ¶ms) |
void | setChiSquaredModule (const IChiSquaredModule &module) |
void | setObjectiveMetric (const std::string &metric) |
void | setObjectiveMetric (const std::string &metric, const std::string &norm) |
Sets objective metric to the FitObjective. More... | |
std::vector< double > | simulation_array () const |
Returns one dimensional array representing merged simulated intensities data. More... | |
SimulationResult | simulationResult (size_t i_item=0) const |
Returns simulation result in the form of SimulationResult. | |
std::vector< double > | uncertainties () const |
Returns one-dimensional array representing merged data uncertainties. More... | |
SimulationResult | uncertaintyData (size_t i_item=0) const |
Returns experimental data uncertainties in the form of SimulationResult. | |
std::vector< double > | weights_array () const |
Returns one-dimensional array representing merged user weights. More... | |
Static Public Member Functions | |
static std::string | availableMetricOptions () |
Returns available metrics and norms. | |
Holds vector of SimDataPair
s (experimental data and simulation results) for use in fitting.
void FitObjective::addSimulationAndData | ( | PyBuilderCallback & | callback, |
const T & | data, | ||
const T & | uncertainties, | ||
double | weight = 1.0 |
||
) |
Constructs simulation/data pair for later fit.
callback | simulation builder capable of producing simulations |
data | experimental data array |
uncertainties | data uncertainties array |
weight | weight of dataset in metric calculations |
void FitObjective::addSimulationAndData | ( | PyBuilderCallback & | callback, |
const T & | data, | ||
double | weight = 1.0 |
||
) |
Constructs simulation/data pair for later fit.
callback | simulation builder capable of producing simulations |
data | experimental data array |
weight | weight of dataset in metric calculations |
std::vector< double > FitObjective::experimental_array | ( | ) | const |
Returns one dimensional array representing merged experimental data.
The area outside of the region of interest is not included, masked data is nullified.
void FitObjective::setObjectiveMetric | ( | const std::string & | metric, |
const std::string & | norm | ||
) |
Sets objective metric to the FitObjective.
metric | metric name |
norm | metric norm name (defaults to L2-norm) |
std::vector< double > FitObjective::simulation_array | ( | ) | const |
Returns one dimensional array representing merged simulated intensities data.
The area outside of the region of interest is not included, masked data is nullified.
std::vector< double > FitObjective::uncertainties | ( | ) | const |
Returns one-dimensional array representing merged data uncertainties.
The area outside of the region of interest is not included, masked data is nullified.
std::vector< double > FitObjective::weights_array | ( | ) | const |
Returns one-dimensional array representing merged user weights.
The area outside of the region of interest is not included, masked data is nullified.