BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IntensityDataFunctions.h File Reference

Defines class IntensityDataFunctions. More...

Go to the source code of this file.

Namespaces

 IntensityDataFunctions
 Functions to work with intensity data.
 

Functions

double IntensityDataFunctions::RelativeDifference (const SimulationResult &dat, const SimulationResult &ref)
 Returns sum of relative differences between each pair of elements: (a, b) -> 2*abs(a - b)/(a + b) ( and zero if a-b=0 ) More...
 
double IntensityDataFunctions::getRelativeDifference (const OutputData< double > &dat, const OutputData< double > &ref)
 Returns relative difference between two data sets sum(dat[i] - ref[i])/ref[i]).
 
bool IntensityDataFunctions::checkRelativeDifference (const OutputData< double > &dat, const OutputData< double > &ref, const double threshold)
 Returns true is relative difference is below threshold; prints informative output.
 
double IntensityDataFunctions::getRelativeDifference (const IHistogram &dat, const IHistogram &ref)
 
double IntensityDataFunctions::coordinateToBinf (double coordinate, const IAxis &axis)
 Transforms coordinate on axis into the bin-fraction-coordinate.
 
double IntensityDataFunctions::coordinateFromBinf (double value, const IAxis &axis)
 Transforms bin-fraction-coordinate into axis coordinate.
 
void IntensityDataFunctions::coordinateToBinf (double &x, double &y, const OutputData< double > &data)
 Transforms x,y coordinate from OutputData axes coordinates to bin-fraction-coordinates.
 
void IntensityDataFunctions::coordinateFromBinf (double &x, double &y, const OutputData< double > &data)
 Transforms x,y coordinate from bin-fraction-coordinates to OutputData's axes coordinates.
 
std::vector< std::vector< double > > IntensityDataFunctions::create2DArrayfromOutputData (const OutputData< double > &data)
 Creates a vector of vectors of double (2D Array) from OutputData.
 
std::vector< std::vector< double > > IntensityDataFunctions::FT2DArray (const std::vector< std::vector< double >> &signal)
 Creates a Fourier Transform of a 2D Array (vector of vectors).
 
std::unique_ptr< OutputData< double > > IntensityDataFunctions::createRelativeDifferenceData (const OutputData< double > &data, const OutputData< double > &reference)
 
std::unique_ptr< OutputData< double > > IntensityDataFunctions::createRearrangedDataSet (const OutputData< double > &data, int n)
 Returns new object with input data rotated by n*90 deg counterclockwise (n > 0) or clockwise (n < 0) Axes are swapped if the data is effectively rotated by 90 or 270 degrees Applicable to 2D arrays only.
 
std::unique_ptr< OutputData< double > > IntensityDataFunctions::createClippedDataSet (const OutputData< double > &origin, double x1, double y1, double x2, double y2)
 Returns new IntensityData objects which axes clipped to represent the specified rectangle.
 
std::unique_ptr< OutputData< double > > IntensityDataFunctions::createOutputDatafrom2DArray (const std::vector< std::vector< double >> &array_2d)
 Creates OutputData from a 2D Array.
 
std::unique_ptr< OutputData< double > > IntensityDataFunctions::createFFT (const OutputData< double > &data)
 Creates Fourier Transform (OutputData format) of intensity map (OutputData format).
 

Detailed Description

Defines class IntensityDataFunctions.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file IntensityDataFunctions.h.