Ticket #4561 (closed: fixed)
Plus isn't summing total proton charge correctly if RHSWorkspace=Output
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Karl Palmen |
Description
From Aziz (I adapted his script to give the one below to illuminate the exact issue). This is affecting his reduction scripts
file1 = 'HRP39187.raw' file2 = 'HRP39191.RAW' Load(Filename=file1,OutputWorkspace='total_sum',LoadLogFiles='0') print 'Charge from file1',mtd['total_sum'].getRun().getProtonCharge() Load(Filename=file2,OutputWorkspace='__temp',LoadLogFiles='0') print 'Charge from file2',str(mtd['__temp'].getRun().getProtonCharge()) # Sum into separate workspace Plus(LHSWorkspace="total_sum",RHSWorkspace="__temp", OutputWorkspace="separate_sum") print 'Charge from sum into separate workspace',str(mtd['separate_sum'].getRun().getProtonCharge()) # Sum with accumulator on LHS Plus(LHSWorkspace="total_sum",RHSWorkspace="__temp", OutputWorkspace="total_sum") print 'Charge from sum with accumulator on LHS',str(mtd['total_sum'].getRun().getProtonCharge()) # Sum with accumulator on RHS # Reload total sum Load(Filename=file1,OutputWorkspace='total_sum',LoadLogFiles='0') Plus(LHSWorkspace="__temp",RHSWorkspace="total_sum", OutputWorkspace="total_sum") print 'Charge from sum with accumulator on RHS',str(mtd['total_sum'].getRun().getProtonCharge())
Script output:
Charge from file1 225.018066406 Charge from file2 175.025421143 Charge from sum into separate workspace 400.043487549 Charge from sum with accumulator on LHS 400.043487549 Charge from sum with accumulator on RHS 350.050842285
Change History
comment:1 Changed 9 years ago by Nick Draper
- Owner set to Martyn Gigg
- Status changed from new to assigned
comment:3 Changed 9 years ago by Martyn Gigg
Refs #4561. Fix bug with Run summing in Plus
The run values, charge etc, are now summed correctly regardless of whether lhs/rhs are the output.
Changeset: a00aeff789cb63ebbfaff5704c9eec427f1c4e85
comment:4 Changed 9 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:5 Changed 9 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:6 Changed 9 years ago by Karl Palmen
- Status changed from verifying to closed
Script output
Charge from file1 225.018066406 Charge from file2 175.025421143 Charge from sum into separate workspace 400.043487549 Charge from sum with accumulator on LHS 400.043487549 Charge from sum with accumulator on RHS 400.043487549
Note: See
TracTickets for help on using
tickets.