BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Stores radiation power per bin.
Public Member Functions | |
Datafield (const Datafield &)=delete | |
Datafield (const std::vector< IAxis * > &axes) | |
Constructor that takes ownership of supplied axes. More... | |
Datafield (const std::vector< IAxis * > &axes, const std::vector< double > &vector) | |
Constructor that takes ownership of supplied axes. More... | |
Datafield (Datafield &&)=default | |
Datafield (Frame *frame) | |
Constructor that takes ownership of supplied frame. More... | |
Datafield (Frame *frame, const std::vector< double > &vector) | |
Constructor that takes ownership of supplied frame. More... | |
~Datafield () | |
const IAxis & | axis (size_t k) const |
Datafield * | clone () const |
Datafield * | crop (double xmin, double xmax) const |
Datafield * | crop (double xmin, double ymin, double xmax, double ymax) const |
std::vector< double > | flatVector () const |
Returns copy of raw data vector. More... | |
const Frame & | frame () const |
bool | hasSameShape (const Datafield &other) const |
Returns true if objects a) have same dimensions b) bin boundaries of axes coincide. More... | |
bool | hasSameSizes (const Datafield &other) const |
Returns true if object have same dimensions and number of axes bins. More... | |
double | maxVal () const |
double | minVal () const |
Datafield * | normalizedToMaximum () const |
PyObject * | npArray () const |
Returns data as Python numpy array. More... | |
double & | operator[] (size_t i) |
indexed accessor More... | |
const double & | operator[] (size_t i) const |
ied accessor (const) More... | |
size_t | rank () const |
void | setAllTo (const double &value) |
Sets content of output data to specific value. More... | |
void | setAt (size_t i, double val) |
void | setVector (const std::vector< double > &data_vector) |
Sets new values to raw data vector. More... | |
size_t | size () const |
Returns total size of data buffer (product of bin number in every dimension). More... | |
double | valAt (size_t i) const |
const IAxis & | xAxis () const |
Datafield * | xProjection () |
Project a 2D histogram into 1D histogram along X. The projection is made from all bins along y-axis. More... | |
Datafield * | xProjection (double ylow, double yup) |
Project a 2D histogram into 1D histogram along X. The projection is made from all y-bins corresponding to ordinate between ylow and yup. More... | |
Datafield * | xProjection (double yvalue) |
Project a 2D histogram into 1D histogram along X. The projection is made from the y-bin closest to given ordinate yvalue. More... | |
const IAxis & | yAxis () const |
Datafield * | yProjection () |
Project a 2D histogram into 1D histogram along Y. The projection is made from all bins along x-axis. More... | |
Datafield * | yProjection (double xlow, double xup) |
Project a 2D histogram into 1D histogram along Y. The projection is made from all x-bins corresponding to abscissa between xlow and xup. More... | |
Datafield * | yProjection (double xvalue) |
Project a 2D histogram into 1D histogram along Y. The projection is made from the x-bin closest to given abscissa xvalue. More... | |
Datafield::Datafield | ( | Frame * | frame | ) |
Constructor that takes ownership of supplied frame.
Datafield::Datafield | ( | Frame * | frame, |
const std::vector< double > & | vector | ||
) |
Constructor that takes ownership of supplied frame.
Datafield::Datafield | ( | const std::vector< IAxis * > & | axes | ) |
Constructor that takes ownership of supplied axes.
Datafield::Datafield | ( | const std::vector< IAxis * > & | axes, |
const std::vector< double > & | vector | ||
) |
Constructor that takes ownership of supplied axes.
|
delete |
|
default |
Datafield::~Datafield | ( | ) |
const IAxis& Datafield::axis | ( | size_t | k | ) | const |
Datafield* Datafield::clone | ( | ) | const |
Datafield* Datafield::crop | ( | double | xmin, |
double | xmax | ||
) | const |
Datafield* Datafield::crop | ( | double | xmin, |
double | ymin, | ||
double | xmax, | ||
double | ymax | ||
) | const |
std::vector<double> Datafield::flatVector | ( | ) | const |
Returns copy of raw data vector.
const Frame& Datafield::frame | ( | ) | const |
bool Datafield::hasSameShape | ( | const Datafield & | other | ) | const |
Returns true if objects a) have same dimensions b) bin boundaries of axes coincide.
bool Datafield::hasSameSizes | ( | const Datafield & | other | ) | const |
Returns true if object have same dimensions and number of axes bins.
double Datafield::maxVal | ( | ) | const |
double Datafield::minVal | ( | ) | const |
Datafield* Datafield::normalizedToMaximum | ( | ) | const |
PyObject* Datafield::npArray | ( | ) | const |
Returns data as Python numpy array.
double& Datafield::operator[] | ( | size_t | i | ) |
indexed accessor
const double& Datafield::operator[] | ( | size_t | i | ) | const |
ied accessor (const)
size_t Datafield::rank | ( | ) | const |
void Datafield::setAllTo | ( | const double & | value | ) |
Sets content of output data to specific value.
void Datafield::setAt | ( | size_t | i, |
double | val | ||
) |
void Datafield::setVector | ( | const std::vector< double > & | data_vector | ) |
Sets new values to raw data vector.
size_t Datafield::size | ( | ) | const |
Returns total size of data buffer (product of bin number in every dimension).
double Datafield::valAt | ( | size_t | i | ) | const |
const IAxis& Datafield::xAxis | ( | ) | const |
Datafield* Datafield::xProjection | ( | ) |
Project a 2D histogram into 1D histogram along X. The projection is made from all bins along y-axis.
Datafield* Datafield::xProjection | ( | double | ylow, |
double | yup | ||
) |
Project a 2D histogram into 1D histogram along X. The projection is made from all y-bins corresponding to ordinate between ylow and yup.
ylow | lower edje on y-axis |
yup | upper edje on y-axis |
Datafield* Datafield::xProjection | ( | double | yvalue | ) |
Project a 2D histogram into 1D histogram along X. The projection is made from the y-bin closest to given ordinate yvalue.
yvalue | the value on y-axis at which projection is taken |
const IAxis& Datafield::yAxis | ( | ) | const |
Datafield* Datafield::yProjection | ( | ) |
Project a 2D histogram into 1D histogram along Y. The projection is made from all bins along x-axis.
Datafield* Datafield::yProjection | ( | double | xlow, |
double | xup | ||
) |
Project a 2D histogram into 1D histogram along Y. The projection is made from all x-bins corresponding to abscissa between xlow and xup.
xlow | lower edje on x-axis |
xup | upper edje on x-axis |
Datafield* Datafield::yProjection | ( | double | xvalue | ) |
Project a 2D histogram into 1D histogram along Y. The projection is made from the x-bin closest to given abscissa xvalue.
xvalue | the value on x-axis at which projection is taken |