BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Functions | |
std::vector< std::vector< double > > | create2DArrayfromDatafield (const Datafield &data) |
Creates a vector of vectors of double (2D Array) from Datafield. More... | |
std::unique_ptr< Datafield > | createFFT (const Datafield &data) |
Creates Fourier Transform (Datafield format) of intensity map (Datafield format). More... | |
std::unique_ptr< Datafield > | createRearrangedDataSet (const Datafield &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. More... | |
std::vector< std::pair< double, double > > | FindPeaks (const Datafield &hist, double sigma=2, const std::string &option={}, double threshold=0.05) |
Returns vector of peak center coordinates, for peaks in given histogram. More... | |
Datafield * | importArrayToDatafield (const std::vector< double > &vec) |
Reads 1D array of doubles to Python, for use in persistence test. More... | |
Datafield * | importArrayToDatafield (const std::vector< std::vector< double >> &vec) |
Reads 2D array of doubles to Python, for use in persistence test. More... | |
std::unique_ptr< Datafield > | vecvecToDatafield (const std::vector< std::vector< double >> &array_2d) |
Creates Datafield from a 2D Array. More... | |
std::vector< std::vector< double > > DataUtils::Data::create2DArrayfromDatafield | ( | const Datafield & | data | ) |
Creates a vector of vectors of double (2D Array) from Datafield.
Definition at line 83 of file DataUtils.cpp.
References Datafield::axis(), Datafield::rank(), and IAxis::size().
Referenced by createFFT().
Creates Fourier Transform (Datafield format) of intensity map (Datafield format).
Definition at line 130 of file DataUtils.cpp.
References create2DArrayfromDatafield(), and vecvecToDatafield().
std::unique_ptr< Datafield > DataUtils::Data::createRearrangedDataSet | ( | const Datafield & | 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.
Definition at line 41 of file DataUtils.cpp.
References Frame::allIndices(), Datafield::axis(), Datafield::clone(), IAxis::clone(), Datafield::frame(), Datafield::rank(), Datafield::size(), and IAxis::size().
std::vector< std::pair< double, double > > DataUtils::Data::FindPeaks | ( | const Datafield & | hist, |
double | sigma = 2 , |
||
const std::string & | option = {} , |
||
double | threshold = 0.05 |
||
) |
Returns vector of peak center coordinates, for peaks in given histogram.
Definition at line 147 of file DataUtils.cpp.
References IAxis::bin(), Bin1D::binSize(), Bin1D::center(), DataUtils::Array::createVector2D(), IAxis::size(), Datafield::xAxis(), and Datafield::yAxis().
Datafield * DataUtils::Data::importArrayToDatafield | ( | const std::vector< double > & | vec | ) |
Reads 1D array of doubles to Python, for use in persistence test.
Definition at line 137 of file DataUtils.cpp.
References DataUtils::Array::createPField1D().
Datafield * DataUtils::Data::importArrayToDatafield | ( | const std::vector< std::vector< double >> & | vec | ) |
Reads 2D array of doubles to Python, for use in persistence test.
Definition at line 142 of file DataUtils.cpp.
References DataUtils::Array::createPField2D().
std::unique_ptr< Datafield > DataUtils::Data::vecvecToDatafield | ( | const std::vector< std::vector< double >> & | array_2d | ) |
Creates Datafield from a 2D Array.
Definition at line 109 of file DataUtils.cpp.
Referenced by createFFT().