Mantid
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
FractionalRebinning.cpp File Reference
#include "MantidDataObjects/FractionalRebinning.h"
#include "MantidAPI/Progress.h"
#include "MantidGeometry/Math/ConvexPolygon.h"
#include "MantidGeometry/Math/PolygonIntersection.h"
#include "MantidGeometry/Math/Quadrilateral.h"
#include "MantidKernel/V2D.h"
#include <cmath>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  Mantid
 Helper class which provides the Collimation Length for SANS instruments.
 
namespace  Mantid::DataObjects
 
namespace  Mantid::DataObjects::FractionalRebinning
 FractionalRebinning helper functionality, used by the Rebin2D algorithm.
 

Enumerations

enum class  Mantid::DataObjects::FractionalRebinning::QuadrilateralType { Mantid::DataObjects::FractionalRebinning::Rectangle , Mantid::DataObjects::FractionalRebinning::TrapezoidX , Mantid::DataObjects::FractionalRebinning::TrapezoidY , Mantid::DataObjects::FractionalRebinning::General }
 

Functions

void Mantid::DataObjects::FractionalRebinning::calcGeneralIntersections (const std::vector< double > &xAxis, const std::vector< double > &yAxis, const Quadrilateral &inputQ, const size_t qstart, const size_t qend, const size_t x_start, const size_t x_end, std::vector< AreaInfo > &areaInfos)
 Computes the output grid bins which intersect the input quad and their overlapping areas for arbitrary shaped input grids. More...
 
void Mantid::DataObjects::FractionalRebinning::calcRectangleIntersections (const std::vector< double > &xAxis, const std::vector< double > &yAxis, const Quadrilateral &inputQ, const size_t y_start, const size_t y_end, const size_t x_start, const size_t x_end, std::vector< AreaInfo > &areaInfos)
 Computes the output grid bins which intersect the input quad and their overlapping areas assuming both input and output grids are rectangular. More...
 
void Mantid::DataObjects::FractionalRebinning::calcTrapezoidYIntersections (const std::vector< double > &xAxis, const std::vector< double > &yAxis, const Quadrilateral &inputQ, const size_t y_start, const size_t y_end, const size_t x_start, const size_t x_end, std::vector< AreaInfo > &areaInfos)
 Computes the output grid bins which intersect the input quad and their overlapping areas assuming input quad is a y-axis aligned trapezoid. More...
 
MANTID_DATAOBJECTS_DLL void Mantid::DataObjects::FractionalRebinning::finalizeFractionalRebin (DataObjects::RebinnedOutput &outputWS)
 Set finalize flag after fractional rebinning loop. More...
 
MANTID_DATAOBJECTS_DLL bool Mantid::DataObjects::FractionalRebinning::getIntersectionRegion (const std::vector< double > &xAxis, const std::vector< double > &verticalAxis, const Geometry::Quadrilateral &inputQ, size_t &qstart, size_t &qend, size_t &x_start, size_t &x_end)
 Find the intersect region on the output grid. More...
 
QuadrilateralType Mantid::DataObjects::FractionalRebinning::getQuadrilateralType (const Quadrilateral &inputQ)
 Determine the (axis-aligned) quadrilateral type of the input polygon. More...
 
MANTID_DATAOBJECTS_DLL void Mantid::DataObjects::FractionalRebinning::normaliseOutput (const API::MatrixWorkspace_sptr &outputWS, const API::MatrixWorkspace_const_sptr &inputWS, API::Progress *progress=nullptr)
 Compute sqrt of errors and put back in bin width division if necessary. More...
 
MANTID_DATAOBJECTS_DLL void Mantid::DataObjects::FractionalRebinning::rebinToFractionalOutput (const Geometry::Quadrilateral &inputQ, const API::MatrixWorkspace_const_sptr &inputWS, const size_t i, const size_t j, DataObjects::RebinnedOutput &outputWS, const std::vector< double > &verticalAxis, const DataObjects::RebinnedOutput_const_sptr &inputRB=nullptr)
 Rebin the input quadrilateral to to output grid. More...
 
MANTID_DATAOBJECTS_DLL void Mantid::DataObjects::FractionalRebinning::rebinToOutput (const Geometry::Quadrilateral &inputQ, const API::MatrixWorkspace_const_sptr &inputWS, const size_t i, const size_t j, API::MatrixWorkspace &outputWS, const std::vector< double > &verticalAxis)
 Rebin the input quadrilateral to to output grid. More...
 

Variables

const double Mantid::DataObjects::FractionalRebinning::POS_TOLERANCE = 1.e-10