BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
CustomBinAxis Class Reference

Axis with fixed bin size in sin(angle) space used for numerical comparison with IsGisaxs. More...

+ Inheritance diagram for CustomBinAxis:

Public Member Functions

 CustomBinAxis (const std::string &name, size_t nbins, double start, double end)
 CustomBinAxis constructor. More...
 
Bin1D bin (size_t index) const
 
std::vector< double > binBoundaries () const
 
double binCenter (size_t index) const
 
std::vector< double > binCenters () const
 
CustomBinAxisclone () const
 
CustomBinAxiscreateClippedAxis (double left, double right) const
 
size_t findClosestIndex (double value) const
 
double lowerBound () const
 
double operator[] (size_t index) const
 
size_t size () const
 
double upperBound () const
 

Protected Member Functions

bool equals (const IAxis &other) const
 
void print (std::ostream &ostr) const
 
void setBinBoundaries (const std::vector< double > &bin_boundaries)
 

Protected Attributes

std::vector< double > m_bin_centers
 
double m_end
 
size_t m_nbins
 
double m_start
 

Detailed Description

Axis with fixed bin size in sin(angle) space used for numerical comparison with IsGisaxs.

The main feature of the axis is that it produces zero bin sizes.

Constructor & Destructor Documentation

◆ CustomBinAxis()

CustomBinAxis::CustomBinAxis ( const std::string &  name,
size_t  nbins,
double  start,
double  end 
)

CustomBinAxis constructor.

Parameters
nameAxis name
nbinsnumber of bins
startcenter of first bin (IsGisaxs convention)
endcenter of last bin (IsGisaxs convention)