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

Description

Simulation of radiation depth profile.

Holds an instrument and sample model. Computes radiation intensity as function of incoming glancing angle and penetration depth. Scattered rays are neglected. Only refraction, reflection and attenuation of the incoming beam are accounted for.

Inheritance diagram for DepthProbeSimulation:

Public Member Functions

 DepthProbeSimulation (const MultiLayer &sample)
 
 ~DepthProbeSimulation () override
 
void addMask (const IShape2D &shape, bool mask_value=true)
 Adds mask of given shape to the stack of detector masks. The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority. More...
 
void addParameterDistribution (const ParameterDistribution &par_distr)
 
void addParameterDistribution (ParameterDistribution::WhichParameter whichParameter, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
 
const IAxis * alphaAxis () const
 Returns a pointer to incident angle axis. More...
 
Beambeam ()
 
std::string className () const final
 
IDetectordetector ()
 
bool force_polarized () const override
 Force polarized computation even in absence of sample magnetization or external fields. More...
 
size_t intensityMapSize () const override
 Returns the total number of the intensity values in the simulation result. More...
 
void maskAll ()
 Put the mask for all detector channels (i.e. exclude whole detector from the analysis) More...
 
std::vector< const INode * > nodeChildren () const override
 
SimulationOptions & options ()
 
const SimulationOptions & options () const
 
void setBackground (const IBackground &bg)
 
void setBeamParameters (double lambda, int nbins, double alpha_i_min, double alpha_i_max, const IFootprintFactor *beam_shape=nullptr)
 Sets beam parameters with alpha_i of the beam defined in the range. More...
 
void setRegionOfInterest (double xlow, double ylow, double xup, double yup)
 Sets rectangular region of interest with lower left and upper right corners defined. More...
 
void setTerminalProgressMonitor ()
 
void setZSpan (size_t n_bins, double z_min, double z_max)
 Set z positions for intensity calculations. Negative z's correspond to the area under sample surface. The more negative z is, the deeper layer corresponds to it. More...
 
SimulationResult simulate ()
 Run a simulation, and return the result. More...
 
const IAxis * zAxis () const
 Returns a pointer to z-position axis. More...
 

Constructor & Destructor Documentation

◆ DepthProbeSimulation()

DepthProbeSimulation::DepthProbeSimulation ( const MultiLayer sample)

◆ ~DepthProbeSimulation()

DepthProbeSimulation::~DepthProbeSimulation ( )
override

Member Function Documentation

◆ addMask()

void ISimulation2D::addMask ( const IShape2D shape,
bool  mask_value = true 
)
inherited

Adds mask of given shape to the stack of detector masks. The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority.

Parameters
shapeThe shape of mask (Rectangle, Polygon, Line, Ellipse)
mask_valueThe value of mask

◆ addParameterDistribution() [1/2]

void ISimulation::addParameterDistribution ( const ParameterDistribution par_distr)
inherited

◆ addParameterDistribution() [2/2]

void ISimulation::addParameterDistribution ( ParameterDistribution::WhichParameter  whichParameter,
const IDistribution1D &  distribution,
size_t  nbr_samples,
double  sigma_factor = 0.0,
const RealLimits limits = RealLimits() 
)
inherited

◆ alphaAxis()

const IAxis* DepthProbeSimulation::alphaAxis ( ) const

Returns a pointer to incident angle axis.

◆ beam()

Beam& ISimulation2D::beam ( )
inherited

◆ className()

std::string DepthProbeSimulation::className ( ) const
final

◆ detector()

IDetector& ISimulation2D::detector ( )
inherited

◆ force_polarized()

bool DepthProbeSimulation::force_polarized ( ) const
overridevirtual

Force polarized computation even in absence of sample magnetization or external fields.

Implements ISimulation.

◆ intensityMapSize()

size_t DepthProbeSimulation::intensityMapSize ( ) const
override

Returns the total number of the intensity values in the simulation result.

◆ maskAll()

void ISimulation2D::maskAll ( )
inherited

Put the mask for all detector channels (i.e. exclude whole detector from the analysis)

◆ nodeChildren()

std::vector<const INode*> ISimulation2D::nodeChildren ( ) const
overrideinherited

◆ options() [1/2]

SimulationOptions& ISimulation::options ( )
inherited

◆ options() [2/2]

const SimulationOptions& ISimulation::options ( ) const
inherited

◆ setBackground()

void ISimulation::setBackground ( const IBackground bg)
inherited

◆ setBeamParameters()

void DepthProbeSimulation::setBeamParameters ( double  lambda,
int  nbins,
double  alpha_i_min,
double  alpha_i_max,
const IFootprintFactor beam_shape = nullptr 
)

Sets beam parameters with alpha_i of the beam defined in the range.

◆ setRegionOfInterest()

void ISimulation2D::setRegionOfInterest ( double  xlow,
double  ylow,
double  xup,
double  yup 
)
inherited

Sets rectangular region of interest with lower left and upper right corners defined.

◆ setTerminalProgressMonitor()

void ISimulation::setTerminalProgressMonitor ( )
inherited

◆ setZSpan()

void DepthProbeSimulation::setZSpan ( size_t  n_bins,
double  z_min,
double  z_max 
)

Set z positions for intensity calculations. Negative z's correspond to the area under sample surface. The more negative z is, the deeper layer corresponds to it.

◆ simulate()

SimulationResult ISimulation::simulate ( )
inherited

Run a simulation, and return the result.

◆ zAxis()

const IAxis* DepthProbeSimulation::zAxis ( ) const

Returns a pointer to z-position axis.