Ticket #9655 (assigned)
Stitch1DMany 3 fold overlap.
Reported by: | Owen Arnold | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | Reflectometry | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: |
Description
Tim is going to pass me a real life failure example. In the mean time I tried this out (see below) and it seemed to work OK for my test case:
import numpy as np def createCosWorkspace(name,start,end): dataX = np.arange(start,end,0.1) dataY = np.cos(dataX) ws = CreateWorkspace(dataX, dataY, OutputWorkspace=name) ws = ConvertToHistogram(ws, OutputWorkspace=name) return ws #create some histograms to test the algorithm with ws1 = createCosWorkspace('left', 0, 12) ws2 = createCosWorkspace('right', 3, 15) ws3 = createCosWorkspace('right1', 6, 18) ws4, sf = Stitch1D(ws1, ws2, Params=[0,0.1,18], StartOverlap=6.0, EndOverlap=12.0) ws5, sf = Stitch1D(ws4, ws3, Params=[0,0.1,18], StartOverlap=6.0, EndOverlap=12.0) plotSpectrum(['left', 'right', 'ws4', 'ws5'], 0) ws6, sf = Stitch1DMany(InputWorkspaces='left,right,right1', Params=[0,0.1,18], StartOverlaps=[6.0, 6.0], EndOverlaps=[12.0,12.0]) plotSpectrum(ws6,0)
Example above has three identical cosine waves overlapping at x = 6 to x = 12.
Change History
Note: See
TracTickets for help on using
tickets.