Skip to content

Commit

Permalink
refs #8951. Params should be mandatory for algorithm.
Browse files Browse the repository at this point in the history
Since this algorithm could be used for workspaces in any units. Selecting a default step-size is bad, because for say TOF workspaces, 0.1 is a very very small step.
  • Loading branch information
OwenArnold authored and RussellTaylor committed Feb 25, 2014
1 parent 2244497 commit 8e3c57c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -32,7 +32,7 @@ def PyInit(self):

self.declareProperty(FloatArrayProperty(name="StartOverlaps", values=[]), doc="Overlap in Q.")
self.declareProperty(FloatArrayProperty(name="EndOverlaps", values=[]), doc="End overlap in Q.")
self.declareProperty(FloatArrayProperty(name="Params", values=[0.1]), doc="Rebinning Parameters. See Rebin for format.")
self.declareProperty(FloatArrayProperty(name="Params", validator=FloatArrayMandatoryValidator()), doc="Rebinning Parameters. See Rebin for format.")
self.declareProperty(name="ScaleRHSWorkspace", defaultValue=True, doc="Scaling either with respect to workspace 1 or workspace 2.")
self.declareProperty(name="UseManualScaleFactor", defaultValue=False, doc="True to use a provided value for the scale factor.")
self.declareProperty(name="ManualScaleFactor", defaultValue=1.0, doc="Provided value for the scale factor.")
Expand Down
Expand Up @@ -58,6 +58,13 @@ def test_stitch_throws_with_wrong_number_of_End_overlaps(self):
self.fail("Two end overlaps, but only two workspaces. Should have thrown.")
except RuntimeError:
pass

def test_stich_throws_if_no_params(self):
try:
stitched = Stitch1DMany(InputWorkspaces='a, b')
self.fail("No Params given. Should have thrown.")
except RuntimeError:
pass

#Cross-check that the result of using Stitch1DMany with two workspaces is the same as using Stitch1D.

Expand Down

0 comments on commit 8e3c57c

Please sign in to comment.