BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A flat rectangular detector with axes and resolution function.
Definition at line 26 of file RectangularDetector.h.
Public Types | |
using | const_iterator = const SimulationAreaIterator & |
enum | EDetectorArrangement { GENERIC , PERPENDICULAR_TO_SAMPLE , PERPENDICULAR_TO_DIRECT_BEAM , PERPENDICULAR_TO_REFLECTED_BEAM , PERPENDICULAR_TO_REFLECTED_BEAM_DPOS } |
Public Member Functions | |
RectangularDetector (const RectangularDetector &other) | |
RectangularDetector (size_t nxbins, double width, size_t nybins, double height) | |
Rectangular detector constructor. More... | |
~RectangularDetector () override | |
std::vector< size_t > | active_indices () const |
Returns vector of unmasked detector indices. More... | |
void | addDetAxis (const IAxis &axis) |
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... | |
const PolFilter & | analyzer () const |
Returns detection properties. More... | |
void | applyDetectorResolution (Datafield *p_intensity_map) const |
Applies the detector resolution to the given intensity maps. More... | |
OwningVector< IAxis > | axesClippedToRegionOfInterest () const |
Returns the axes clipped to the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". More... | |
const IAxis & | axis (size_t index) const |
One axis of the complete detector. Any region of interest is not taken into account. More... | |
size_t | axisBinIndex (size_t index, size_t selected_axis) const |
Calculate axis index for given global index. More... | |
SimulationAreaIterator | beginNonMaskedPoints () const |
Create begin-iterator to iterate over all points which are not masked and lay within the "Region of Interest". More... | |
SimulationAreaIterator | beginRegionOfInterestPoints () const |
Create begin-iterator to iterate over all points which lay within the "Region of Interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". No matter whether masked or not. More... | |
void | checkNodeArgs () const |
Raises exception if a parameter value is invalid. More... | |
std::string | className () const final |
Returns the class name, to be hard-coded in each leaf class that inherits from INode. More... | |
RectangularDetector * | clone () const override |
std::unique_ptr< DetectorContext > | createContext () const |
Datafield * | createDetectorIntensity (const std::vector< std::unique_ptr< DiffuseElement >> &elements) const |
Returns new intensity map with resolution applied, and cropped to ROI if applicable. More... | |
std::unique_ptr< Datafield > | createDetectorMap () const |
Returns empty detector map in given axes units. This map is a data array limited to the size of the "Region of interest". More... | |
Coords | defaultCoords () const override |
Returns default axes units. More... | |
size_t | detectorIndexToRegionOfInterestIndex (size_t detectorIndex) const |
const DetectorMask * | detectorMask () const |
const IDetectorResolution * | detectorResolution () const |
Returns a pointer to detector resolution object. More... | |
SimulationAreaIterator | endNonMaskedPoints () const |
Create end-iterator to iterate over all points which are not masked and lay within the "Region of Interest". More... | |
SimulationAreaIterator | endRegionOfInterestPoints () const |
Create end-iterator to iterate over all points which lay within the "Region of Interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". No matter whether masked or not. More... | |
EDetectorArrangement | getDetectorArrangment () const |
double | getDirectBeamU0 () const |
double | getDirectBeamV0 () const |
R3 | getDirectionVector () const |
double | getDistance () const |
R3 | getNormalVector () const |
double | getU0 () const |
double | getV0 () const |
bool | hasExplicitRegionOfInterest () const |
True if a region of interest is explicitly set. More... | |
double | height () const |
void | iterateOverNonMaskedPoints (std::function< void(const_iterator)> func) const |
Iterate over all non-masked points within "region of interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". More... | |
void | iterateOverRegionOfInterest (std::function< void(const_iterator)> func) const |
Iterate over all points within "region of interest", no matter whether they are masked or not. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". 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 |
Returns all children. More... | |
std::vector< const INode * > | nodeOffspring () const |
Returns all descendants. More... | |
size_t | numberOfElements () const |
Returns number of simulation elements. More... | |
ICoordSystem * | offspecCoords (IAxis *beamAxis, const Direction &beamDirection) const override |
virtual std::vector< ParaMeta > | parDefs () const |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
size_t | rank () const |
Returns number of defined axes. More... | |
std::pair< double, double > | regionOfInterestBounds (size_t iAxis) const |
The lower and upper bound of the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". More... | |
size_t | regionOfInterestIndexToDetectorIndex (size_t regionOfInterestIndex) const |
Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area). More... | |
RectangularPixel * | regionOfInterestPixel () const |
void | resetRegionOfInterest () |
Resets region of interest making whole detector plane available for the simulation. More... | |
CoordSystem2D * | scatteringCoords (const Beam &beam) const override |
void | setAnalyzer (R3 direction, double efficiency, double total_transmission) |
Sets the polarization analyzer characteristics of the detector. More... | |
void | setDetectorNormal (const Direction &direction) override |
Inits detector with the beam settings. More... | |
void | setDetectorParameters (size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max) |
Sets equidistant axes. More... | |
void | setDetectorPosition (R3 normal_to_detector, double u0, double v0, R3 direction=R3(0.0, -1.0, 0.0)) |
void | setDetectorResolution (const IDetectorResolution &p_detector_resolution) |
Sets the detector resolution. More... | |
void | setDirectBeamPosition (double u0, double v0) |
void | setPerpendicularToDirectBeam (double distance, double u0, double v0) |
void | setPerpendicularToReflectedBeam (double distance, double u0=0.0, double v0=0.0) |
void | setPerpendicularToSampleX (double distance, double u0, double v0) |
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 | setResolutionFunction (const IResolutionFunction2D &resFunc) |
size_t | sizeOfRegionOfInterest () const |
The size of the "Region of Interest". Same as totalSize() if no region of interest has been explicitly set. More... | |
size_t | totalSize () const |
Returns total number of pixels. Any region of interest is not taken into account. More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
double | width () const |
size_t | xSize () const |
size_t | ySize () const |
Protected Member Functions | |
virtual std::pair< double, double > | boundsOfExplicitRegionOfInterest (size_t iAxis) const |
Lower and upper bound of one axis of an explicitly set ROI. Return 0/0 if no ROI has been explicitly set. More... | |
void | clear () |
size_t | getGlobalIndex (size_t x, size_t y) const |
Calculate global index from two axis indices. More... | |
virtual size_t | sizeOfExplicitRegionOfInterest () const |
Return 0 if no ROI has been explicitly set. Size means number of data points. More... | |
Protected Attributes | |
std::vector< RoiOfAxis > | m_explicitROI |
an explicitly defined region of interest. Empty if no ROI has been defined. Vector index corresponds to axis index in m_axes More... | |
std::vector< double > | m_P |
Private Member Functions | |
std::string | axisName (size_t index) const override |
Returns the name for the axis with given index. More... | |
IPixel * | createPixel (size_t index) const override |
Creates an IPixel for the given Datafield object and index. More... | |
size_t | indexOfSpecular (const Beam &beam) const override |
Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wavevector, the number of pixels is returned. This corresponds to an overflow index. More... | |
void | initNormalVector (R3 central_k) |
void | initUandV (double alpha_i) |
void | setDistanceAndOffset (double distance, double u0, double v0) |
void | swapContent (RectangularDetector &other) |
swap function More... | |
Private Attributes | |
OwningVector< IAxis > | m_axes |
double | m_dbeam_u0 |
double | m_dbeam_v0 |
position of direct beam in detector coordinates More... | |
EDetectorArrangement | m_detector_arrangement |
std::shared_ptr< DetectorMask > | m_detector_mask |
std::unique_ptr< IDetectorResolution > | m_detector_resolution |
R3 | m_direction |
direction vector of detector coordinate system More... | |
double | m_distance |
distance from sample origin to the detector plane More... | |
R3 | m_normal_to_detector |
PolFilter | m_polAnalyzer |
double | m_u0 |
R3 | m_u_unit |
double | m_v0 |
position of normal vector hitting point in detector coordinates More... | |
R3 | m_v_unit |
|
inherited |
Definition at line 59 of file IDetector.h.
Enumerator | |
---|---|
GENERIC | |
PERPENDICULAR_TO_SAMPLE | |
PERPENDICULAR_TO_DIRECT_BEAM | |
PERPENDICULAR_TO_REFLECTED_BEAM | |
PERPENDICULAR_TO_REFLECTED_BEAM_DPOS |
Definition at line 28 of file RectangularDetector.h.
RectangularDetector::RectangularDetector | ( | size_t | nxbins, |
double | width, | ||
size_t | nybins, | ||
double | height | ||
) |
Rectangular detector constructor.
nxbins | Number of bins (pixels) in x-direction |
width | Width of the detector in mm along x-direction |
nybins | Number of bins (pixels) in y-direction |
height | Height of the detector in mm along y-direction |
Definition at line 27 of file RectangularDetector.cpp.
References height(), IDetector::setDetectorParameters(), and width().
Referenced by clone().
|
default |
|
overridedefault |
|
inherited |
Returns vector of unmasked detector indices.
Definition at line 346 of file IDetector.cpp.
References SimulationAreaIterator::detectorIndex(), and IDetector::iterateOverNonMaskedPoints().
Referenced by DetectorContext::setup_context().
|
inherited |
Definition at line 57 of file IDetector.cpp.
References IDetector::axis(), IAxis::clone(), OwningVector< T >::emplace_back(), IDetector::m_axes, IDetector::m_detector_mask, and IDetector::rank().
Referenced by IDetector::setDetectorParameters().
|
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.
Definition at line 360 of file IDetector.cpp.
References IDetector::m_detector_mask.
Referenced by ISimulation2D::addMask(), and IDetector::maskAll().
|
inlineinherited |
Returns detection properties.
Definition at line 204 of file IDetector.h.
References IDetector::m_polAnalyzer.
Referenced by ISimulation2D::force_polarized(), ISimulation2D::generateElements(), and DetectorContext::setup_context().
|
inherited |
Applies the detector resolution to the given intensity maps.
Definition at line 169 of file IDetector.cpp.
References ASSERT, Frame::cloned_axes(), IDetector::detectorMask(), Datafield::frame(), IDetector::iterateOverNonMaskedPoints(), IDetector::m_detector_resolution, SimulationAreaIterator::roiIndex(), and Datafield::setVector().
Referenced by IDetector::createDetectorIntensity(), and OffspecSimulation::transferDetectorImage().
|
inherited |
Returns the axes clipped to the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest".
Definition at line 136 of file IDetector.cpp.
References IDetector::axis(), IAxis::clip(), OwningVector< T >::emplace_back(), IDetector::m_axes, IDetector::regionOfInterestBounds(), and OwningVector< T >::size().
Referenced by offspecCoords(), SphericalDetector::offspecCoords(), scatteringCoords(), and SphericalDetector::scatteringCoords().
|
inherited |
One axis of the complete detector. Any region of interest is not taken into account.
Definition at line 74 of file IDetector.cpp.
References ASSERT, IDetector::m_axes, and IDetector::rank().
Referenced by IDetector::RoiOfAxis::RoiOfAxis(), IDetector::addDetAxis(), IDetector::axesClippedToRegionOfInterest(), IDetector::createDetectorMap(), createPixel(), SphericalDetector::createPixel(), IDetector::getGlobalIndex(), height(), indexOfSpecular(), SphericalDetector::indexOfSpecular(), OffspecSimulation::intensityMapSize(), OffspecSimulation::pack_result(), IDetector::setRegionOfInterest(), OffspecSimulation::transferDetectorImage(), width(), xSize(), and ySize().
|
inherited |
Calculate axis index for given global index.
Definition at line 80 of file IDetector.cpp.
References ASSERT, IDetector::m_axes, IDetector::rank(), and OwningVector< T >::size().
Referenced by createPixel(), and SphericalDetector::createPixel().
|
overrideprivatevirtual |
Returns the name for the axis with given index.
Implements IDetector.
Definition at line 185 of file RectangularDetector.cpp.
|
inherited |
Create begin-iterator to iterate over all points which are not masked and lay within the "Region of Interest".
Definition at line 261 of file IDetector.cpp.
References SimulationAreaIterator::createBegin(), and SimulationAreaIterator::notMasked.
Referenced by IDetector::createDetectorIntensity(), and IDetector::iterateOverNonMaskedPoints().
|
inherited |
Create begin-iterator to iterate over all points which lay within the "Region of Interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". No matter whether masked or not.
Definition at line 271 of file IDetector.cpp.
References SimulationAreaIterator::createBegin(), and SimulationAreaIterator::regionOfInterest.
Referenced by IDetector::iterateOverRegionOfInterest().
|
protectedvirtualinherited |
Lower and upper bound of one axis of an explicitly set ROI. Return 0/0 if no ROI has been explicitly set.
Definition at line 106 of file IDetector.cpp.
References ASSERT, IDetector::m_explicitROI, and IDetector::rank().
Referenced by IDetector::regionOfInterestBounds().
|
inherited |
Raises exception if a parameter value is invalid.
Definition at line 27 of file INode.cpp.
References ASSERT, RealLimits::check(), INode::className(), INF, RealLimits::limited(), RealLimits::limitless(), INode::m_P, ParaMeta::name, RealLimits::nonnegative(), INode::parDefs(), ParaMeta::vMax, and ParaMeta::vMin.
Referenced by BarGauss::BarGauss(), BarLorentz::BarLorentz(), Bipyramid4::Bipyramid4(), Box::Box(), CantellatedCube::CantellatedCube(), Cone::Cone(), ConstantBackground::ConstantBackground(), CosineRippleBox::CosineRippleBox(), CosineRippleGauss::CosineRippleGauss(), CosineRippleLorentz::CosineRippleLorentz(), Cylinder::Cylinder(), DistributionCosine::DistributionCosine(), DistributionGate::DistributionGate(), DistributionGaussian::DistributionGaussian(), DistributionLogNormal::DistributionLogNormal(), DistributionLorentz::DistributionLorentz(), DistributionTrapezoid::DistributionTrapezoid(), Dodecahedron::Dodecahedron(), EllipsoidalCylinder::EllipsoidalCylinder(), FootprintGauss::FootprintGauss(), FootprintSquare::FootprintSquare(), FuzzySphere::FuzzySphere(), GaussSphere::GaussSphere(), HemiEllipsoid::HemiEllipsoid(), HollowSphere::HollowSphere(), HorizontalCylinder::HorizontalCylinder(), Icosahedron::Icosahedron(), LongBoxGauss::LongBoxGauss(), LongBoxLorentz::LongBoxLorentz(), PlatonicOctahedron::PlatonicOctahedron(), PlatonicTetrahedron::PlatonicTetrahedron(), Prism3::Prism3(), Prism6::Prism6(), Profile1DCauchy::Profile1DCauchy(), Profile1DCosine::Profile1DCosine(), Profile1DGate::Profile1DGate(), Profile1DGauss::Profile1DGauss(), Profile1DTriangle::Profile1DTriangle(), Profile1DVoigt::Profile1DVoigt(), Profile2DCauchy::Profile2DCauchy(), Profile2DCone::Profile2DCone(), Profile2DGate::Profile2DGate(), Profile2DGauss::Profile2DGauss(), Profile2DVoigt::Profile2DVoigt(), Pyramid2::Pyramid2(), Pyramid3::Pyramid3(), Pyramid4::Pyramid4(), Pyramid6::Pyramid6(), RotationEuler::RotationEuler(), RotationX::RotationX(), RotationY::RotationY(), RotationZ::RotationZ(), SawtoothRippleBox::SawtoothRippleBox(), SawtoothRippleGauss::SawtoothRippleGauss(), SawtoothRippleLorentz::SawtoothRippleLorentz(), Sphere::Sphere(), Spheroid::Spheroid(), TruncatedCube::TruncatedCube(), TruncatedSphere::TruncatedSphere(), and TruncatedSpheroid::TruncatedSpheroid().
|
inlinefinalvirtual |
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Implements INode.
Definition at line 47 of file RectangularDetector.h.
|
protectedinherited |
Definition at line 69 of file IDetector.cpp.
References OwningVector< T >::clear(), and IDetector::m_axes.
Referenced by IDetector::setDetectorParameters().
|
overridevirtual |
Implements IDetector.
Definition at line 45 of file RectangularDetector.cpp.
References RectangularDetector().
|
inherited |
Definition at line 355 of file IDetector.cpp.
Referenced by ISimulation2D::prepareSimulation().
|
inherited |
Returns new intensity map with resolution applied, and cropped to ROI if applicable.
Definition at line 191 of file IDetector.cpp.
References IDetector::applyDetectorResolution(), ASSERT, IDetector::beginNonMaskedPoints(), IDetector::createDetectorMap(), IDetector::endNonMaskedPoints(), and IDetector::m_detector_resolution.
|
inherited |
Returns empty detector map in given axes units. This map is a data array limited to the size of the "Region of interest".
Definition at line 205 of file IDetector.cpp.
References ASSERT, IDetector::axis(), IAxis::clip(), IAxis::clone(), IDetector::rank(), and IDetector::regionOfInterestBounds().
Referenced by IDetector::createDetectorIntensity().
|
overrideprivatevirtual |
Creates an IPixel for the given Datafield object and index.
Implements IDetector.
Definition at line 169 of file RectangularDetector.cpp.
References IDetector::axis(), IDetector::axisBinIndex(), IAxis::bin(), Bin1D::binSize(), height(), Bin1D::m_lower, m_normal_to_detector, m_u0, m_u_unit, m_v0, m_v_unit, and width().
|
inlineoverridevirtual |
Returns default axes units.
Implements IDetector.
Definition at line 74 of file RectangularDetector.h.
References MM.
|
inherited |
|
inherited |
Definition at line 372 of file IDetector.cpp.
References IDetector::m_detector_mask.
Referenced by IDetector::applyDetectorResolution(), and SimulationAreaIterator::isMasked().
|
inherited |
Returns a pointer to detector resolution object.
Definition at line 186 of file IDetector.cpp.
References IDetector::m_detector_resolution.
|
inherited |
Create end-iterator to iterate over all points which are not masked and lay within the "Region of Interest".
Definition at line 266 of file IDetector.cpp.
References SimulationAreaIterator::createEnd(), and SimulationAreaIterator::notMasked.
Referenced by IDetector::createDetectorIntensity(), and IDetector::iterateOverNonMaskedPoints().
|
inherited |
Create end-iterator to iterate over all points which lay within the "Region of Interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest". No matter whether masked or not.
Definition at line 276 of file IDetector.cpp.
References SimulationAreaIterator::createEnd(), and SimulationAreaIterator::regionOfInterest.
Referenced by IDetector::iterateOverRegionOfInterest().
RectangularDetector::EDetectorArrangement RectangularDetector::getDetectorArrangment | ( | ) | const |
Definition at line 147 of file RectangularDetector.cpp.
References m_detector_arrangement.
double RectangularDetector::getDirectBeamU0 | ( | ) | const |
Definition at line 137 of file RectangularDetector.cpp.
References m_dbeam_u0.
double RectangularDetector::getDirectBeamV0 | ( | ) | const |
Definition at line 142 of file RectangularDetector.cpp.
References m_dbeam_v0.
R3 RectangularDetector::getDirectionVector | ( | ) | const |
Definition at line 127 of file RectangularDetector.cpp.
References m_direction.
double RectangularDetector::getDistance | ( | ) | const |
Definition at line 132 of file RectangularDetector.cpp.
References m_distance.
|
protectedinherited |
Calculate global index from two axis indices.
Definition at line 377 of file IDetector.cpp.
References IDetector::axis(), IDetector::rank(), IAxis::size(), and IDetector::totalSize().
Referenced by indexOfSpecular(), and SphericalDetector::indexOfSpecular().
R3 RectangularDetector::getNormalVector | ( | ) | const |
Definition at line 112 of file RectangularDetector.cpp.
References m_normal_to_detector.
double RectangularDetector::getU0 | ( | ) | const |
Definition at line 117 of file RectangularDetector.cpp.
References m_u0.
double RectangularDetector::getV0 | ( | ) | const |
Definition at line 122 of file RectangularDetector.cpp.
References m_v0.
|
inherited |
True if a region of interest is explicitly set.
Definition at line 131 of file IDetector.cpp.
References OwningVector< T >::empty(), IDetector::m_axes, IDetector::m_explicitROI, and OwningVector< T >::size().
double RectangularDetector::height | ( | ) | const |
Definition at line 97 of file RectangularDetector.cpp.
References IDetector::axis(), and IAxis::span().
Referenced by RectangularDetector(), createPixel(), and regionOfInterestPixel().
|
overrideprivatevirtual |
Returns index of pixel that contains the specular wavevector. If no pixel contains this specular wavevector, the number of pixels is returned. This corresponds to an overflow index.
Implements IDetector.
Definition at line 198 of file RectangularDetector.cpp.
References Direction::alpha(), ASSERT, IDetector::axis(), IAxis::contains(), Beam::direction(), IAxis::findClosestIndex(), IDetector::getGlobalIndex(), m_distance, m_normal_to_detector, m_u0, m_u_unit, m_v0, m_v_unit, Direction::phi(), IDetector::rank(), IDetector::totalSize(), vecOfLambdaAlphaPhi(), and Beam::wavelength().
|
private |
Definition at line 233 of file RectangularDetector.cpp.
References GENERIC, m_detector_arrangement, m_distance, m_normal_to_detector, PERPENDICULAR_TO_DIRECT_BEAM, PERPENDICULAR_TO_REFLECTED_BEAM, PERPENDICULAR_TO_REFLECTED_BEAM_DPOS, and PERPENDICULAR_TO_SAMPLE.
Referenced by setDetectorNormal().
|
private |
Definition at line 259 of file RectangularDetector.cpp.
References m_dbeam_u0, m_dbeam_v0, m_detector_arrangement, m_direction, m_distance, m_normal_to_detector, m_u0, m_u_unit, m_v0, m_v_unit, and PERPENDICULAR_TO_REFLECTED_BEAM_DPOS.
Referenced by setDetectorNormal().
|
inherited |
Iterate over all non-masked points within "region of interest". If no region of interest is explicitly defined, then the whole detector is taken as "region of interest".
Definition at line 252 of file IDetector.cpp.
References IDetector::beginNonMaskedPoints(), IDetector::endNonMaskedPoints(), and IDetector::rank().
Referenced by IDetector::active_indices(), IDetector::applyDetectorResolution(), and IDetector::numberOfElements().
|
inherited |
Iterate over all points within "region of interest", no matter whether they are masked or not. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest".
Definition at line 243 of file IDetector.cpp.
References IDetector::beginRegionOfInterestPoints(), IDetector::endRegionOfInterestPoints(), and IDetector::rank().
Referenced by ScatteringSimulation::intensityMapSize().
|
inherited |
Put the mask for all detector channels (i.e. exclude whole detector from the analysis)
Definition at line 365 of file IDetector.cpp.
References IDetector::addMask(), and IDetector::rank().
Referenced by ISimulation2D::maskAll().
|
overridevirtualinherited |
Returns all children.
Reimplemented from INode.
Definition at line 238 of file IDetector.cpp.
References IDetector::m_detector_resolution, and IDetector::m_polAnalyzer.
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inherited |
Returns number of simulation elements.
Definition at line 220 of file IDetector.cpp.
References IDetector::iterateOverNonMaskedPoints().
|
overridevirtual |
Implements IDetector.
Definition at line 278 of file RectangularDetector.cpp.
References ASSERT, IDetector::axesClippedToRegionOfInterest(), regionOfInterestPixel(), and IAxis::size().
|
inlinevirtualinherited |
Returns the parameter definitions, to be hard-coded in each leaf class.
Reimplemented in ConstantBackground, GaussSphere, FuzzySphere, RotationEuler, RotationZ, RotationY, RotationX, Crystal, Layer, HexagonalLattice2D, SquareLattice2D, BasicLattice2D, LayerRoughness, TruncatedSpheroid, TruncatedSphere, TruncatedCube, Spheroid, Sphere, SawtoothRippleLorentz, SawtoothRippleGauss, SawtoothRippleBox, Pyramid6, Pyramid4, Pyramid3, Pyramid2, Prism6, Prism3, PlatonicTetrahedron, PlatonicOctahedron, LongBoxLorentz, LongBoxGauss, Icosahedron, HorizontalCylinder, HollowSphere, HemiEllipsoid, EllipsoidalCylinder, Dodecahedron, Cylinder, CosineRippleLorentz, CosineRippleGauss, CosineRippleBox, Cone, CantellatedCube, Box, Bipyramid4, BarLorentz, BarGauss, Profile2DVoigt, Profile2DCone, Profile2DGate, Profile2DGauss, Profile2DCauchy, Profile1DVoigt, Profile1DCosine, Profile1DTriangle, Profile1DGate, Profile1DGauss, Profile1DCauchy, MisesGaussPeakShape, MisesFisherGaussPeakShape, LorentzFisherPeakShape, GaussFisherPeakShape, IsotropicLorentzPeakShape, IsotropicGaussPeakShape, ParticleLayout, InterferenceTwin, InterferenceRadialParaCrystal, InterferenceHardDisk, Interference2DSuperLattice, Interference2DParaCrystal, Interference1DLattice, DistributionTrapezoid, DistributionCosine, DistributionLogNormal, DistributionGaussian, DistributionLorentz, DistributionGate, ResolutionFunction2DGaussian, PolFilter, FootprintSquare, and FootprintGauss.
Definition at line 51 of file INode.h.
Referenced by INode::checkNodeArgs(), and IFormFactor::pythonConstructor().
|
inherited |
Returns number of defined axes.
Definition at line 64 of file IDetector.cpp.
References IDetector::m_axes, and OwningVector< T >::size().
Referenced by IDetector::addDetAxis(), IDetector::axis(), IDetector::axisBinIndex(), IDetector::boundsOfExplicitRegionOfInterest(), IDetector::createDetectorMap(), IDetector::getGlobalIndex(), indexOfSpecular(), SphericalDetector::indexOfSpecular(), IDetector::iterateOverNonMaskedPoints(), IDetector::iterateOverRegionOfInterest(), IDetector::maskAll(), IDetector::setRegionOfInterest(), IDetector::totalSize(), and OffspecSimulation::transferDetectorImage().
|
inherited |
The lower and upper bound of the region of interest. If no region of interest is explicitly defined, then the whole detector is taken as "region of interest".
Definition at line 227 of file IDetector.cpp.
References ASSERT, IDetector::boundsOfExplicitRegionOfInterest(), IDetector::m_axes, and OwningVector< T >::size().
Referenced by IDetector::axesClippedToRegionOfInterest(), IDetector::createDetectorMap(), and regionOfInterestPixel().
|
inherited |
Convert an index of the region of interest to an index of the detector. If no region of interest is set, then the index stays unmodified (since ROI == detector area).
Definition at line 281 of file IDetector.cpp.
References IDetector::m_explicitROI.
Referenced by SimulationAreaIterator::detectorIndex(), and SimulationAreaIterator::isMasked().
RectangularPixel * RectangularDetector::regionOfInterestPixel | ( | ) | const |
Definition at line 152 of file RectangularDetector.cpp.
References height(), m_normal_to_detector, m_u0, m_u_unit, m_v0, m_v_unit, IDetector::regionOfInterestBounds(), and width().
Referenced by offspecCoords(), and scatteringCoords().
|
inherited |
Resets region of interest making whole detector plane available for the simulation.
Definition at line 164 of file IDetector.cpp.
References IDetector::m_explicitROI.
|
overridevirtual |
Implements IDetector.
Definition at line 292 of file RectangularDetector.cpp.
References IDetector::axesClippedToRegionOfInterest(), Beam::direction(), regionOfInterestPixel(), and Beam::wavelength().
|
inherited |
Sets the polarization analyzer characteristics of the detector.
Definition at line 147 of file IDetector.cpp.
References IDetector::m_polAnalyzer.
|
overridevirtual |
Inits detector with the beam settings.
Reimplemented from IDetector.
Definition at line 50 of file RectangularDetector.cpp.
References Direction::alpha(), initNormalVector(), initUandV(), and Direction::vector().
|
inherited |
Sets equidistant axes.
Definition at line 329 of file IDetector.cpp.
References IDetector::addDetAxis(), IDetector::axisName(), and IDetector::clear().
Referenced by RectangularDetector(), and SphericalDetector::SphericalDetector().
void RectangularDetector::setDetectorPosition | ( | R3 | normal_to_detector, |
double | u0, | ||
double | v0, | ||
R3 | direction = R3(0.0, -1.0, 0.0) |
||
) |
Definition at line 56 of file RectangularDetector.cpp.
References GENERIC, m_detector_arrangement, m_direction, m_distance, m_normal_to_detector, m_u0, and m_v0.
|
inherited |
Sets the detector resolution.
Definition at line 152 of file IDetector.cpp.
References IDetectorResolution::clone(), and IDetector::m_detector_resolution.
Referenced by IDetector::IDetector(), and IDetector::setResolutionFunction().
void RectangularDetector::setDirectBeamPosition | ( | double | u0, |
double | v0 | ||
) |
Definition at line 85 of file RectangularDetector.cpp.
References m_dbeam_u0, m_dbeam_v0, m_detector_arrangement, and PERPENDICULAR_TO_REFLECTED_BEAM_DPOS.
|
private |
Definition at line 220 of file RectangularDetector.cpp.
References m_distance, m_u0, and m_v0.
Referenced by setPerpendicularToDirectBeam(), setPerpendicularToReflectedBeam(), and setPerpendicularToSampleX().
void RectangularDetector::setPerpendicularToDirectBeam | ( | double | distance, |
double | u0, | ||
double | v0 | ||
) |
Definition at line 73 of file RectangularDetector.cpp.
References m_detector_arrangement, PERPENDICULAR_TO_DIRECT_BEAM, and setDistanceAndOffset().
void RectangularDetector::setPerpendicularToReflectedBeam | ( | double | distance, |
double | u0 = 0.0 , |
||
double | v0 = 0.0 |
||
) |
Definition at line 79 of file RectangularDetector.cpp.
References m_detector_arrangement, PERPENDICULAR_TO_REFLECTED_BEAM, and setDistanceAndOffset().
void RectangularDetector::setPerpendicularToSampleX | ( | double | distance, |
double | u0, | ||
double | v0 | ||
) |
Definition at line 67 of file RectangularDetector.cpp.
References m_detector_arrangement, PERPENDICULAR_TO_SAMPLE, and setDistanceAndOffset().
|
inherited |
Sets rectangular region of interest with lower left and upper right corners defined.
Definition at line 337 of file IDetector.cpp.
References ASSERT, IDetector::axis(), IDetector::m_explicitROI, and IDetector::rank().
Referenced by ISimulation2D::setRegionOfInterest().
|
inherited |
Definition at line 158 of file IDetector.cpp.
References IDetector::setDetectorResolution().
|
protectedvirtualinherited |
Return 0 if no ROI has been explicitly set. Size means number of data points.
Definition at line 94 of file IDetector.cpp.
References IDetector::m_axes, IDetector::m_explicitROI, and OwningVector< T >::size().
Referenced by IDetector::sizeOfRegionOfInterest().
|
inherited |
The size of the "Region of Interest". Same as totalSize() if no region of interest has been explicitly set.
Definition at line 125 of file IDetector.cpp.
References IDetector::sizeOfExplicitRegionOfInterest(), and IDetector::totalSize().
Referenced by SimulationAreaIterator::createEnd().
|
private |
swap function
|
inherited |
Returns total number of pixels. Any region of interest is not taken into account.
Definition at line 114 of file IDetector.cpp.
References IDetector::m_axes, and IDetector::rank().
Referenced by IDetector::getGlobalIndex(), indexOfSpecular(), SphericalDetector::indexOfSpecular(), and IDetector::sizeOfRegionOfInterest().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
double RectangularDetector::width | ( | ) | const |
Definition at line 92 of file RectangularDetector.cpp.
References IDetector::axis(), and IAxis::span().
Referenced by RectangularDetector(), createPixel(), and regionOfInterestPixel().
size_t RectangularDetector::xSize | ( | ) | const |
Definition at line 102 of file RectangularDetector.cpp.
References IDetector::axis(), and IAxis::size().
size_t RectangularDetector::ySize | ( | ) | const |
Definition at line 107 of file RectangularDetector.cpp.
References IDetector::axis(), and IAxis::size().
|
privateinherited |
Definition at line 248 of file IDetector.h.
Referenced by IDetector::addDetAxis(), IDetector::axesClippedToRegionOfInterest(), IDetector::axis(), IDetector::axisBinIndex(), IDetector::clear(), IDetector::hasExplicitRegionOfInterest(), IDetector::rank(), IDetector::regionOfInterestBounds(), IDetector::sizeOfExplicitRegionOfInterest(), and IDetector::totalSize().
|
private |
Definition at line 103 of file RectangularDetector.h.
Referenced by getDirectBeamU0(), initUandV(), and setDirectBeamPosition().
|
private |
position of direct beam in detector coordinates
Definition at line 103 of file RectangularDetector.h.
Referenced by getDirectBeamV0(), initUandV(), and setDirectBeamPosition().
|
private |
Definition at line 104 of file RectangularDetector.h.
Referenced by getDetectorArrangment(), initNormalVector(), initUandV(), setDetectorPosition(), setDirectBeamPosition(), setPerpendicularToDirectBeam(), setPerpendicularToReflectedBeam(), and setPerpendicularToSampleX().
|
privateinherited |
Definition at line 251 of file IDetector.h.
Referenced by IDetector::addDetAxis(), IDetector::addMask(), and IDetector::detectorMask().
|
privateinherited |
Definition at line 250 of file IDetector.h.
Referenced by IDetector::IDetector(), IDetector::applyDetectorResolution(), IDetector::createDetectorIntensity(), IDetector::detectorResolution(), IDetector::nodeChildren(), and IDetector::setDetectorResolution().
|
private |
direction vector of detector coordinate system
Definition at line 101 of file RectangularDetector.h.
Referenced by getDirectionVector(), initUandV(), and setDetectorPosition().
|
private |
distance from sample origin to the detector plane
Definition at line 102 of file RectangularDetector.h.
Referenced by getDistance(), indexOfSpecular(), initNormalVector(), initUandV(), setDetectorPosition(), and setDistanceAndOffset().
|
protectedinherited |
an explicitly defined region of interest. Empty if no ROI has been defined. Vector index corresponds to axis index in m_axes
Definition at line 242 of file IDetector.h.
Referenced by IDetector::boundsOfExplicitRegionOfInterest(), IDetector::detectorIndexToRegionOfInterestIndex(), IDetector::hasExplicitRegionOfInterest(), IDetector::regionOfInterestIndexToDetectorIndex(), IDetector::resetRegionOfInterest(), IDetector::setRegionOfInterest(), and IDetector::sizeOfExplicitRegionOfInterest().
|
private |
Definition at line 99 of file RectangularDetector.h.
Referenced by createPixel(), getNormalVector(), indexOfSpecular(), initNormalVector(), initUandV(), regionOfInterestPixel(), and setDetectorPosition().
|
protectedinherited |
Definition at line 63 of file INode.h.
Referenced by IFootprintFactor::IFootprintFactor(), INode::checkNodeArgs(), IProfile1D::pythonConstructor(), IProfile2D::pythonConstructor(), IFormFactor::pythonConstructor(), Profile1DVoigt::pythonConstructor(), and Profile2DVoigt::pythonConstructor().
|
privateinherited |
Definition at line 249 of file IDetector.h.
Referenced by IDetector::analyzer(), IDetector::nodeChildren(), and IDetector::setAnalyzer().
|
private |
Definition at line 100 of file RectangularDetector.h.
Referenced by createPixel(), getU0(), indexOfSpecular(), initUandV(), regionOfInterestPixel(), setDetectorPosition(), and setDistanceAndOffset().
|
private |
Definition at line 105 of file RectangularDetector.h.
Referenced by createPixel(), indexOfSpecular(), initUandV(), and regionOfInterestPixel().
|
private |
position of normal vector hitting point in detector coordinates
Definition at line 100 of file RectangularDetector.h.
Referenced by createPixel(), getV0(), indexOfSpecular(), initUandV(), regionOfInterestPixel(), setDetectorPosition(), and setDistanceAndOffset().
|
private |
Definition at line 106 of file RectangularDetector.h.
Referenced by createPixel(), indexOfSpecular(), initUandV(), and regionOfInterestPixel().