BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
One dimensional histogram. More...
Public Member Functions | |
Histogram1D (const IAxis &axis) | |
Constructor for 1D histogram with custom axis. | |
Histogram1D (const OutputData< double > &data) | |
Constructor for 1D histograms from basic OutputData object. | |
Histogram1D (int nbinsx, const std::vector< double > &xbins) | |
Constructor for variable bin size histograms. More... | |
Histogram1D (int nbinsx, double xlow, double xup) | |
Constructor for fix bin size histograms. More... | |
std::vector< double > | binCenters () const |
returns vector of histogram bin centers | |
PyObject * | binCentersNumpy () const |
std::vector< double > | binErrors () const |
returns vector of bin errors | |
PyObject * | binErrorsNumpy () const |
std::vector< double > | binValues () const |
returns vector of bin content (the value accumulated by bins) | |
PyObject * | binValuesNumpy () const |
Histogram1D * | clone () const |
Returns clone of other histogram. | |
Histogram1D * | crop (double xmin, double xmax) |
Creates new histogram by applying crop on axis. | |
int | fill (double x, double weight=1.0) |
Increment bin with abscissa x with a weight. | |
size_t | rank () const |
Returns the number of histogram dimensions. | |
One dimensional histogram.
Histogram1D::Histogram1D | ( | int | nbinsx, |
double | xlow, | ||
double | xup | ||
) |
Constructor for fix bin size histograms.
nbinsx | number of bins |
xlow | low edge of the first bin |
xup | upper edge of the last bin |
Histogram1D::Histogram1D | ( | int | nbinsx, |
const std::vector< double > & | xbins | ||
) |
Constructor for variable bin size histograms.
nbinsx | number of bins |
xbins | Array of size nbins+1 containing low-edges for each bin and upper edge of last bin. |