Skip to content

Commit

Permalink
Merge pull request mantidproject#34702 from mantidproject/fix_hb2a_co…
Browse files Browse the repository at this point in the history
…lltrans

Fix hb2a colltrans
  • Loading branch information
peterfpeterson authored Nov 10, 2022
2 parents 54307e6 + 86ff48a commit b71e2a4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Framework/PythonInterface/plugins/algorithms/HB2AReduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ def PyExec(self):
col_time = col_time[monitor_mask]

# Get either vcorr file or vanadium data
colltrans = data['colltrans'][0] if "colltrans" in data.dtype.names else 0.
vanadium_count, vanadium_monitor, vcorr = self.get_vanadium(detector_mask, data['m1'][0],
data['colltrans'][0], exp,
colltrans, exp,
indir, metadata)

def_x = self.getProperty("DefX").value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ def test_new_new_convention(self):
HB2AReduce_ws.delete()
norm_time_wsk.delete()

HB2AReduce_ws = HB2AReduce('HB2A_exp0882_scan0012.dat',
IndividualDetectors=True,
SaveData=False)
norm_time_wsk = mtd[HB2AReduce_ws.name() + "_norm_time"]
self.assertTrue(norm_time_wsk)

HB2AReduce_ws.delete()
norm_time_wsk.delete()


if __name__ == '__main__':
unittest.main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d21099e344c06aa48be56c6d15b7dec9
1 change: 1 addition & 0 deletions Testing/Data/UnitTest/HB2A_exp0882_scan0012.dat.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4eab51644e5ab0f3585b961278055485
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed an issue with :ref:`HB2AReduce <algm-HB2AReduce>` when 'colltrans' column is not available in the data file. This corresponds to the situation when the 'colltrans' motor is not connected.

0 comments on commit b71e2a4

Please sign in to comment.