Ticket #3198 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Create a MergeCalFiles algorithm

Reported by: Nick Draper Owned by: Nick Draper
Priority: major Milestone: Iteration 29
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Owen Arnold

Description

to merge the offsets, groups and or selections of two files (possibly incomplete)

Attachments

cycle_111.cal (234.6 KB) - added by Nick Draper 9 years ago.
test2_cycle111.cal (18.3 KB) - added by Nick Draper 9 years ago.

Change History

Changed 9 years ago by Nick Draper

Changed 9 years ago by Nick Draper

comment:1 Changed 9 years ago by Nick Draper

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Nick Draper

  • Status changed from accepted to verify
  • Resolution set to fixed

(In [12645]) fixes #3198 New MergeCalFiles python algorithm

comment:3 Changed 9 years ago by Janik Zikovsky

  • Status changed from verify to verifying
  • Tester set to Janik Zikovsky

comment:4 Changed 9 years ago by Janik Zikovsky

  • Status changed from verifying to reopened
  • Resolution fixed deleted
  1. There is no automated test for this algorithm. Here is a possible test script.
  1. The last 2 calls in this test script fail with "Unknown exception":
    CreateGroupingWorkspace(InstrumentName="PG3",GroupNames="bank124,bank144,bank164,bank184",OutputWorkspace="pg3_group")
    LoadCalFile(InputWorkspace="pg3_group",CalFilename="/home/8oz/Code/Mantid/Test/AutoTestData/pg3_mantid_det.cal",MakeGroupingWorkspace="0",MakeMaskWorkspace="0",WorkspaceName="pg3")
    
    w = mtd["pg3_offsets"]
    for y in xrange(10000):
    	w.dataY(y)[0] = y*0.00001
    	
    SaveCalFile(OffsetsWorkspace="pg3_offsets", Filename="pg3_offsets.cal")
    SaveCalFile(GroupingWorkspace="pg3_group", Filename="pg3_group.cal")
    
    def check_result():
    		LoadCalFile(InstrumentName="pg3", CalFilename="pg3_merged.cal", WorkspaceName="pg3_merged", MakeGroupingWorkspace=1, MakeOffsetsWorkspace=1)
    		print CheckWorkspacesMatch("pg3_offsets", "pg3_merged_offsets", Tolerance=1e-5)
    
    MergeCalFiles(UpdateFile="pg3_offsets.cal", MasterFile="pg3_group.cal", OutputFile="pg3_merged.cal", MergeGroups=0, MergeOffsets=1, MergeSelections=0)
    check_result()
    
    for mergeGroups in [0, 1]:
    	for  mergeSelections in [0, 1]:
    		MergeCalFiles(UpdateFile="pg3_offsets.cal", MasterFile="pg3_group.cal", OutputFile="pg3_merged.cal", MergeGroups=mergeGroups, MergeOffsets=1, MergeSelections=mergeSelections)
    		check_result()
    
    
    # These fail with UNKNOWN exception!
    MergeCalFiles(UpdateFile="pg3_group.cal", MasterFile="pg3_offsets.cal", OutputFile="pg3_merged.cal", MergeGroups=1, MergeOffsets=0, MergeSelections=0)
    MergeCalFiles(UpdateFile="pg3_group.cal", MasterFile="pg3_offsets.cal", OutputFile="pg3_merged.cal", MergeGroups=1, MergeOffsets=0, MergeSelections=1)
    
    

comment:5 Changed 9 years ago by Nick Draper

  • Status changed from reopened to accepted

ticket #3284 created to add the test and deal with the failure mode

comment:6 Changed 9 years ago by Nick Draper

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:7 Changed 9 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester changed from Janik Zikovsky to Owen Arnold

Ticket

comment:8 Changed 9 years ago by Owen Arnold

  • Status changed from verifying to closed

Testing ticket created. Close this issue #3284.

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4045

Note: See TracTickets for help on using tickets.