Skip to content
Snippets Groups Projects
Commit 8252dc20 authored by WHITFIELDRE email's avatar WHITFIELDRE email
Browse files

Add systemtest for HB3A. Add release notes.

parent 357581f5
No related branches found
No related tags found
No related merge requests found
f524fad52590c9f68172293d05d01d52
...@@ -63,3 +63,53 @@ class ConvertWANDSCDtoQTest(systemtesting.MantidSystemTest): ...@@ -63,3 +63,53 @@ class ConvertWANDSCDtoQTest(systemtesting.MantidSystemTest):
return False return False
return True return True
class ConvertWANDSCDtoQ_HB3A_Test(systemtesting.MantidSystemTest):
def requiredMemoryMB(self):
return 8000
def runTest(self):
LoadMD('HB3A_data.nxs', OutputWorkspace='ConvertWANDSCDtoQ_HB3ATest_data')
SetGoniometer('ConvertWANDSCDtoQ_HB3ATest_data',
Axis0='omega,0,1,0,-1',
Axis1='chi,0,0,1,-1',
Axis2='phi,0,1,0,-1')
ConvertWANDSCDtoQ(InputWorkspace='ConvertWANDSCDtoQ_HB3ATest_data',
Wavelength=1.008,
BinningDim0='-5.0125,5.0125,401',
BinningDim1='-2.0125,3.0125,201',
BinningDim2='-0.0125,5.0125,201',
KeepTemporaryWorkspaces=True,
OutputWorkspace='ConvertWANDSCDtoQTest_Q')
ConvertWANDSCDtoQTest_peaks=FindPeaksMD(InputWorkspace='ConvertWANDSCDtoQTest_Q_data',
PeakDistanceThreshold=0.25,
DensityThresholdFactor=20000,
CalculateGoniometerForCW=True,
Wavelength=1.008,
FlipX=True,
InnerGoniometer=False)
IndexPeaks(ConvertWANDSCDtoQTest_peaks)
self.assertEqual(ConvertWANDSCDtoQTest_peaks.getNumberPeaks(), 1)
peak = ConvertWANDSCDtoQTest_peaks.getPeak(0)
self.assertDelta(peak.getWavelength(), 1.008, 1e-7)
np.testing.assert_allclose(peak.getQSampleFrame(), [-0.425693,1.6994,2.30206], rtol=1e-5)
np.testing.assert_array_equal(peak.getHKL(), [0, 0, 6])
ConvertWANDSCDtoQTest_HKL = ConvertWANDSCDtoQ(InputWorkspace='ConvertWANDSCDtoQ_HB3ATest_data',
Wavelength=1.008,
Frame='HKL',
BinningDim0='-1.01,1.01,101',
BinningDim1='-1.01,1.01,101',
BinningDim2='4.99,7.01,101',
KeepTemporaryWorkspaces=True)
signal = ConvertWANDSCDtoQTest_HKL.getSignalArray()
# peak should be roughly the center of the volume
np.testing.assert_array_equal(np.unravel_index(np.nanargmax(signal), signal.shape), (50, 51, 53))
...@@ -15,6 +15,8 @@ output Q sample space, then the UB can be found and used to then ...@@ -15,6 +15,8 @@ output Q sample space, then the UB can be found and used to then
convert to HKL. The default binning ranges are good for converting to convert to HKL. The default binning ranges are good for converting to
Q sample with the default wavelength. Q sample with the default wavelength.
This algorithm will also work for data from DEMAND (HB3A).
The normalization is calculated in the same way as The normalization is calculated in the same way as
:ref:`algm-MDNormSCD` but with the solid angle and flux coming from :ref:`algm-MDNormSCD` but with the solid angle and flux coming from
the NormalisationWorkspace, normally vanadium. A brief introduction to the NormalisationWorkspace, normally vanadium. A brief introduction to
......
...@@ -18,7 +18,9 @@ Engineering Diffraction ...@@ -18,7 +18,9 @@ Engineering Diffraction
Single Crystal Diffraction Single Crystal Diffraction
-------------------------- --------------------------
- Support added for DEMAND (HB3A) to the algorithms :ref:`ConvertWANDSCDtoQ <algm-ConvertWANDSCDtoQ-v1>` and :ref:`FindPeaksMD <algm-FindPeaksMD-v1>` in order to handle additional goniometers.
Imaging Imaging
------- -------
:ref:`Release 4.3.0 <v4.3.0>` :ref:`Release 4.3.0 <v4.3.0>`
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment