15 #ifndef BORNAGAIN_CORE_SIMULATION_OFFSPECULARSIMULATION_H
16 #define BORNAGAIN_CORE_SIMULATION_OFFSPECULARSIMULATION_H
Defines interface ISimulation2D.
Defines class SimulationElement.
An incident neutron or x-ray beam.
Two dimensional histogram.
Interface for one-dimensional axes.
Abstract detector interface.
Visitor interface to visit ISampleNode objects.
virtual void visit(const BasicLattice2D *)
Abstract base class of OffSpecularSimulation and GISASSimulation.
const MultiLayer * sample() const
Our sample model: a stack of layers one below the other.
Main class to run an off-specular simulation.
size_t intensityMapSize() const override
Returns the total number of the intensity values in the simulation result.
OutputData< double > m_intensity_map
void prepareSimulation() override
Put into a clean state for running a simulation.
size_t numberOfSimulationElements() const override
Gets the number of elements this simulation needs to calculate.
const IAxis * beamAxis() const
Returns axis of the beam.
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
void validateParametrization(const ParameterDistribution &par_distr) const override
Checks the distribution validity for simulation.
~OffSpecularSimulation() override
void transferDetectorImage(size_t index)
Normalize, apply detector resolution and transfer detector image corresponding to alpha_i = m_alpha_i...
void initSimulationElementVector() override
Initializes the vector of ISimulation elements.
std::unique_ptr< IAxis > m_alpha_i_axis
void updateIntensityMap() override
Default implementation only adds the detector axes.
SimulationResult result() const override
Returns the results of the simulation in a format that supports unit conversion and export to numpy a...
void transferResultsToIntensityMap() override
Creates the appropriate data structure (e.g.
std::unique_ptr< IUnitConverter > createUnitConverter() const
void setBeamParameters(double wavelength, const IAxis &alpha_axis, double phi_i)
Sets beam parameters from here (forwarded to Instrument)
OffSpecularSimulation * clone() const override
void checkInitialization() const
Check correct number of axes.
A parametric distribution function, for use with any model parameter.
Wrapper around OutputData<double> that also provides unit conversions.