1 | # Test MergeReplaceExisting |
---|
2 | ws1 = CreateWorkspace(OutputWorkspace='SomeWorkspace',DataX='1',DataY='2',DataE='3',UnitX='Label',VerticalAxisUnit='Empty',VerticalAxisValues='0') |
---|
3 | ws2 = CreateWorkspace(OutputWorkspace='SomeOtherWorkspace',DataX='1',DataY='2',DataE='3',UnitX='Label',VerticalAxisUnit='Empty',VerticalAxisValues='0') |
---|
4 | |
---|
5 | #Add logs to first workspace |
---|
6 | AddSampleLog(Workspace='SomeWorkspace',LogName='A',LogText='Hello') |
---|
7 | AddSampleLog(Workspace='SomeWorkspace',LogName='B',LogText='World') |
---|
8 | AddSampleLog(Workspace='SomeWorkspace',LogName='D',LogText='Yeah!') |
---|
9 | |
---|
10 | #Add logs to second workspace |
---|
11 | AddSampleLog(Workspace='SomeOtherWorkspace',LogName='A',LogText='Hello') |
---|
12 | AddSampleLog(Workspace='SomeOtherWorkspace',LogName='B',LogText='Universe') |
---|
13 | AddSampleLog(Workspace='SomeOtherWorkspace',LogName='C',LogText='Today') |
---|
14 | |
---|
15 | CopyLogs(InputWorkspace=ws1, OutputWorkspace=ws2,MergeStrategy="MergeReplaceExisting") |
---|
16 | |
---|
17 | |
---|
18 | # Test WipeExisting |
---|
19 | ws4 = CreateWorkspace(OutputWorkspace='SomeOtherWorkspace2',DataX='1',DataY='2',DataE='3',UnitX='Label',VerticalAxisUnit='Empty',VerticalAxisValues='0') |
---|
20 | |
---|
21 | #Add logs to first workspace |
---|
22 | AddSampleLog(Workspace='SomeWorkspace',LogName='A',LogText='Hello') |
---|
23 | AddSampleLog(Workspace='SomeWorkspace',LogName='B',LogText='World') |
---|
24 | AddSampleLog(Workspace='SomeWorkspace',LogName='D',LogText='Yeah!') |
---|
25 | |
---|
26 | #Add logs to second workspace |
---|
27 | AddSampleLog(Workspace='SomeOtherWorkspace2',LogName='A',LogText='Hello') |
---|
28 | AddSampleLog(Workspace='SomeOtherWorkspace2',LogName='B',LogText='Universe') |
---|
29 | AddSampleLog(Workspace='SomeOtherWorkspace2',LogName='C',LogText='Today') |
---|
30 | |
---|
31 | CopyLogs(InputWorkspace=ws1, OutputWorkspace=ws4,MergeStrategy="WipeExisting") |
---|
32 | |
---|
33 | |
---|
34 | # Test MergeKeepExisting |
---|
35 | ws6 = CreateWorkspace(OutputWorkspace='SomeOtherWorkspace3',DataX='1',DataY='2',DataE='3',UnitX='Label',VerticalAxisUnit='Empty',VerticalAxisValues='0') |
---|
36 | |
---|
37 | #Add logs to first workspace |
---|
38 | AddSampleLog(Workspace='SomeWorkspace',LogName='A',LogText='Hello') |
---|
39 | AddSampleLog(Workspace='SomeWorkspace',LogName='B',LogText='World') |
---|
40 | AddSampleLog(Workspace='SomeWorkspace',LogName='D',LogText='Yeah!') |
---|
41 | |
---|
42 | #Add logs to second workspace |
---|
43 | AddSampleLog(Workspace='SomeOtherWorkspace3',LogName='A',LogText='Hello') |
---|
44 | AddSampleLog(Workspace='SomeOtherWorkspace3',LogName='B',LogText='Universe') |
---|
45 | AddSampleLog(Workspace='SomeOtherWorkspace3',LogName='C',LogText='Today') |
---|
46 | |
---|
47 | CopyLogs(InputWorkspace=ws1, OutputWorkspace=ws6,MergeStrategy="MergeKeepExisting") |
---|