Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
443ef2d1
Commit
443ef2d1
authored
10 years ago
by
Owen Arnold
Browse files
Options
Downloads
Patches
Plain Diff
refs #9549. Extend solution to scaling RHSWS
parent
45cc409d
Loading
Loading
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
+14
-61
14 additions, 61 deletions
...ntid/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
Code/Mantid/Framework/Algorithms/src/Stitch1D.cpp
+239
-201
239 additions, 201 deletions
Code/Mantid/Framework/Algorithms/src/Stitch1D.cpp
with
253 additions
and
262 deletions
Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/Stitch1D.h
+
14
−
61
View file @
443ef2d1
...
...
@@ -53,76 +53,29 @@ namespace Mantid
void
init
();
/// Overwrites Algorithm method.
void
exec
();
/**Gets the start of the overlapping region
@param intesectionMin :: The minimum possible value for the overlapping region to inhabit
@param intesectionMax :: The maximum possible value for the overlapping region to inhabit
@return a double contianing the start of the overlapping region
*/
/// Get the start overlap
double
getStartOverlap
(
const
double
&
intesectionMin
,
const
double
&
intesectionMax
)
const
;
/**Gets the end of the overlapping region
@param intesectionMin :: The minimum possible value for the overlapping region to inhabit
@param intesectionMax :: The maximum possible value for the overlapping region to inhabit
@return a double contianing the end of the overlapping region
*/
/// Get the end overlap
double
getEndOverlap
(
const
double
&
intesectionMin
,
const
double
&
intesectionMax
)
const
;
/**Determines if a workspace has non zero errors
@param ws :: The input workspace
@return True if there are any non-zero errors in the workspace
*/
bool
hasNonzeroErrors
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
ws
)
const
;
/**Gets the rebinning parameters and calculates any missing values
@param lhsWS :: The left hand side input workspace
@param rhsWS :: The right hand side input workspace
@return a vector<double> contianing the rebinning parameters
*/
Mantid
::
MantidVec
getRebinParams
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
lhsWS
,
Mantid
::
API
::
MatrixWorkspace_sptr
&
rhsWS
)
const
;
/**Runs the Rebin Algorithm as a child
@param input :: The input workspace
@param params :: a vector<double> containing rebinning parameters
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Does the x-axis have non-zero errors
bool
hasNonzeroErrors
(
Mantid
::
API
::
MatrixWorkspace_sptr
ws
);
/// Get the rebin parameters
Mantid
::
MantidVec
getRebinParams
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
lhsWS
,
Mantid
::
API
::
MatrixWorkspace_sptr
&
rhsWS
,
const
bool
scaleRHSWS
)
const
;
/// Perform rebin
Mantid
::
API
::
MatrixWorkspace_sptr
rebin
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
input
,
const
Mantid
::
MantidVec
&
params
);
/**Runs the Integration Algorithm as a child
@param input :: The input workspace
@param start :: a double defining the start of the region to integrate
@param stop :: a double defining the end of the region to integrate
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Perform integration
Mantid
::
API
::
MatrixWorkspace_sptr
integration
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
input
,
const
double
&
start
,
const
double
&
stop
);
/**Runs the MultiplyRange Algorithm as a child defining an end bin
@param input :: The input workspace
@param startBin :: The first bin int eh range to multiply
@param endBin :: The last bin in the range to multiply
@param factor :: The multiplication factor
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Perform multiplication over a range
Mantid
::
API
::
MatrixWorkspace_sptr
multiplyRange
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
input
,
const
int
&
startBin
,
const
int
&
endBin
,
const
double
&
factor
);
/**Runs the MultiplyRange Algorithm as a child
@param input :: The input workspace
@param startBin :: The first bin int eh range to multiply
@param factor :: The multiplication factor
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Perform multiplication over a range
Mantid
::
API
::
MatrixWorkspace_sptr
multiplyRange
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
input
,
const
int
&
startBin
,
const
double
&
factor
);
/**Runs the CreateSingleValuedWorkspace Algorithm as a child
@param val :: The double to convert to a single value workspace
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Create a single valued workspace
Mantid
::
API
::
MatrixWorkspace_sptr
singleValueWS
(
double
val
);
/**Runs the WeightedMean Algorithm as a child
@param inOne :: The first input workspace
@param inTwo :: The second input workspace
@return A shared pointer to the resulting MatrixWorkspace
*/
/// Calclate the weighted mean
Mantid
::
API
::
MatrixWorkspace_sptr
weightedMean
(
Mantid
::
API
::
MatrixWorkspace_sptr
&
inOne
,
Mantid
::
API
::
MatrixWorkspace_sptr
&
inTwo
);
/**finds the bins containing the ends of the overlappign region
@param startOverlap :: The start of the overlapping region
@param endOverlap :: The end of the overlapping region
@param workspace :: The workspace to determine the overlaps inside
@return a boost::tuple<int,int> containing the bin indexes of the overlaps
*/
/// Find the start and end indexes
boost
::
tuple
<
int
,
int
>
findStartEndIndexes
(
double
startOverlap
,
double
endOverlap
,
Mantid
::
API
::
MatrixWorkspace_sptr
&
workspace
);
///
the r
ange tol
l
er
ence constant to apply to overlap values
///
R
ange toler
ance
static
const
double
range_tolerance
;
};
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Framework/Algorithms/src/Stitch1D.cpp
+
239
−
201
View file @
443ef2d1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment