BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
CustomBinAxis Class Reference

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.

Inheritance diagram for CustomBinAxis:

Public Member Functions

 CustomBinAxis (const std::string &name, size_t nbins, double start, double end)
 CustomBinAxis constructor. More...
 
 ~CustomBinAxis () override=default
 
Bin1D bin (size_t index) const override
 
std::vector< double > binBoundaries () const override
 
double binCenter (size_t index) const override
 
std::vector< double > binCenters () const override
 
void clip (double lower, double upper) override
 
CustomBinAxisclone () const override
 
size_t findClosestIndex (double value) const override
 
double max () const override
 
double min () const override
 
double operator[] (size_t index) const override
 
size_t size () const override
 

Protected Member Functions

bool equals (const IAxis &other) const override
 
void print (std::ostream &ostr) const override
 
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
 

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)

◆ ~CustomBinAxis()

CustomBinAxis::~CustomBinAxis ( )
overridedefault

Member Function Documentation

◆ bin()

Bin1D CustomBinAxis::bin ( size_t  index) const
override

◆ binBoundaries()

std::vector<double> VariableBinAxis::binBoundaries ( ) const
overrideinherited

◆ binCenter()

double VariableBinAxis::binCenter ( size_t  index) const
overrideinherited

◆ binCenters()

std::vector<double> CustomBinAxis::binCenters ( ) const
override

◆ clip()

void CustomBinAxis::clip ( double  lower,
double  upper 
)
override

◆ clone()

CustomBinAxis* CustomBinAxis::clone ( ) const
override

◆ equals()

bool CustomBinAxis::equals ( const IAxis &  other) const
overrideprotected

◆ findClosestIndex()

size_t VariableBinAxis::findClosestIndex ( double  value) const
overrideinherited

◆ max()

double VariableBinAxis::max ( ) const
overrideinherited

◆ min()

double VariableBinAxis::min ( ) const
overrideinherited

◆ operator[]()

double VariableBinAxis::operator[] ( size_t  index) const
overrideinherited

◆ print()

void CustomBinAxis::print ( std::ostream &  ostr) const
overrideprotected

◆ setBinBoundaries()

void VariableBinAxis::setBinBoundaries ( const std::vector< double > &  bin_boundaries)
protectedinherited

◆ size()

size_t VariableBinAxis::size ( ) const
overrideinherited

Member Data Documentation

◆ m_bin_centers

std::vector<double> CustomBinAxis::m_bin_centers
protected

◆ m_end

double CustomBinAxis::m_end
protected

◆ m_nbins

size_t VariableBinAxis::m_nbins
protectedinherited

◆ m_start

double CustomBinAxis::m_start
protected