15 #ifndef BORNAGAIN_CORE_SIMULATION_DEPTHPROBESIMULATION_H
16 #define BORNAGAIN_CORE_SIMULATION_DEPTHPROBESIMULATION_H
47 void setBeamParameters(
double lambda,
int nbins,
double alpha_i_min,
double alpha_i_max,
52 void setZSpan(
size_t n_bins,
double z_min,
double z_max);
87 size_t n_elements)
override;
103 void normalize(
size_t start_ind,
size_t n_elements)
override;
116 std::vector<double>
rawResults()
const override;
117 void setRawResults(
const std::vector<double>& raw_data)
override;
Defines class DepthProbeElement.
Defines and implements class ILayerRTCoefficients.
Defines interface ISimulation.
An incident neutron or x-ray beam.
std::unique_ptr< IUnitConverter > createUnitConverter() const
void initSimulationElementVector() override
Initializes the vector of ISimulation elements.
std::unique_ptr< IAxis > m_z_axis
const IAxis * getAlphaAxis() const
Returns a pointer to incident angle axis.
SimulationResult result() const override
Returns the results of the simulation in a format that supports unit conversion and export to numpy a...
DepthProbeSimulation * clone() const override
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.
std::unique_ptr< IComputation > generateSingleThreadedComputation(size_t start, size_t n_elements) override
Generate a single threaded computation for a given range of simulation elements.
void moveDataFromCache() override
void addDataToCache(double weight) override
void initialize()
Initializes simulation.
std::unique_ptr< OutputData< double > > createIntensityData() const
Creates intensity data from simulation elements.
void setZSpan(size_t n_bins, double z_min, double z_max)
Set z positions for intensity calculations.
void addBackgroundIntensity(size_t start_ind, size_t n_elements) override
std::vector< double > rawResults() const override
~DepthProbeSimulation() override
double incidentAngle(size_t index) const
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
void validateParametrization(const ParameterDistribution &par_distr) const override
Checks the distribution validity for simulation.
void validityCheck() const
Checks if simulation data is ready for retrieval.
void normalize(size_t start_ind, size_t n_elements) override
Normalize the detector counts to beam intensity, to solid angle, and to exposure angle.
std::vector< DepthProbeElement > generateSimulationElements(const Beam &beam)
Generate simulation elements for given beam.
const IAxis * getZAxis() const
Returns a pointer to z-position axis.
std::vector< std::valarray< double > > m_cache
std::unique_ptr< IAxis > m_alpha_axis
void setRawResults(const std::vector< double > &raw_data) override
size_t numberOfSimulationElements() const override
Gets the number of elements this simulation needs to calculate.
size_t intensityMapSize() const override
Returns the total number of the intensity values in the simulation result.
std::vector< DepthProbeElement > m_sim_elements
One dimensional histogram.
Interface for one-dimensional axes.
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandle...
Visitor interface to visit ISampleNode objects.
Interface to the class capable to build samples to simulate.
Abstract base class for sample components and properties related to scattering.
Abstract base class of OffSpecularSimulation, GISASSimulation and SpecularSimulation.
Interface to provide axis translations to different units for simulation output.
Our sample model: a stack of layers one below the other.
A parametric distribution function, for use with any model parameter.
Wrapper around OutputData<double> that also provides unit conversions.