Ticket #9175 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

BinaryOperateMasks new workspace

Reported by: Peter Peterson Owned by: Wenduo Zhou
Priority: major Milestone: Release 3.2
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

When using BinaryOperateMasks to combine two masks, but not doing it in-place, the resulting mask workspace loses contact with the instrument in a way that MaskWorkspace::isMasked throws an exception

cal_dir='/SNS/users/3ah/2014-A-data/Diamond Cal/JANIS Hot Stick/'
LoadCalFile(InstrumentName='POWGEN',
    CalFilename=cal_dir+'PG3_calibrate_d17932_2014_03_12.cal',
    WorkspaceName='PG3')
LoadMask(Instrument='POWGEN',InputFile=cal_dir+'Mask-17532.xml',
    OutputWorkspace='other_mask')
BinaryOperateMasks(InputWorkspace1='PG3_mask',InputWorkspace2='other_mask',
    OperationType='OR',OutputWorkspace='new_mask')
SaveCalFile(GroupingWorkspace="PG3_group", OffsetsWorkspace="PG3_offsets", 
    MaskWorkspace="new_mask", Filename="/tmp/deleteme.cal")

Attachments

verify9175.py (453 bytes) - added by Wenduo Zhou 6 years ago.
test script
PG3_JANIShighT_d17932_2014_03_12.cal (1.7 MB) - added by Wenduo Zhou 6 years ago.
calibration file
Mask-19884.xml (505 bytes) - added by Wenduo Zhou 6 years ago.
mask file

Change History

comment:1 Changed 7 years ago by Peter Peterson

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Wenduo Zhou

  • Status changed from assigned to inprogress

Refs #9175. Solved the issue by adding copyFrom().

The reported problem is caused by calling parent's copyFrom(), which does not set m_hasInstrument right. An override on this method solved the issue.

Use a method to check the status whether mask workspace has instrument to enhance the robustness.

Changeset: 4ae1a676539e0b49e1c9ca2859ba576db444f78e

comment:3 Changed 6 years ago by Wenduo Zhou

Made copyFrom virtual. Refs #9175.

Changeset: f5c501e593758e6094c2742fab8cbc433aef9e52

comment:4 Changed 6 years ago by Wenduo Zhou

Fixed unit test due to change of behavior of exception. Refs #9175.

Changeset: fb2a82c6399b589a9b63f67ea391d285d6d30e1a

comment:5 Changed 6 years ago by Wenduo Zhou

Cleaned the codes. Refs #9175.

Changeset: 0756fba2bc94f2c80f1c70f125ee54eda8241514

Changed 6 years ago by Wenduo Zhou

test script

Changed 6 years ago by Wenduo Zhou

calibration file

Changed 6 years ago by Wenduo Zhou

mask file

comment:6 Changed 6 years ago by Wenduo Zhou

For tester

  1. Download the 3 attached files in this ticket;
  2. Locate POWGEN run 19884;
  3. Run script verify9175.py to check whether the reported bug is cleared.

comment:7 Changed 6 years ago by Wenduo Zhou

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

comment:8 Changed 6 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:9 Changed 6 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote branch 'origin/bugfix/9175_binary_mask_exception'

Full changeset: 9171e4bffaef431716796de0bb8e4dd2f3ce158d

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10018

Note: See TracTickets for help on using tickets.