Ticket #11282 (closed)
User experience improvements for reactor source experiments
Reported by: | Andrei Savici | Owned by: | Wenduo Zhou |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Diffraction | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Andrei Savici |
Description
As part of testing ticket #10929 I have found a few things left to improve
- LoadSpiceAscii should not require dat time format
- ConvertSpiceDataToRealSpace creates an MD workspace with Y min and max limits both 0
- ConvertCWPDMDToSpectra is a weird name. It should at least be explained in the documentation
- Binning parameters must contain 3 numbers. People might be used to Rebin, that can also use one value. Minimum and maximum can be calculated
- There is a weird warning message "Unable to set unit to an Unit::Empty object." The reason is that the "Degrees" unit is not registered.
Changes:
a) Code/Mantid/Framework/Kernel/inc/MantidKernel/Unit.h, line 616, replace
{ return ""; }with
;b) Code/Mantid/Framework/Kernel/src/Unit.cpp add line 1121
DECLARE_UNIT(Degrees)c) fix code in Code/Mantid/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp about Twotheta to
pdws->getAxis(0)->setUnit("Degrees");
Change History
comment:2 Changed 6 years ago by Wenduo Zhou
Refs #11282. Fixed some issues related to reduce HFIR data.
- LoadSpiceAscii has date time format with default to SPICE's current
standard
- ConvertCWPDMDToSpectra is explained in the sumary;
- Binning parameters can accept bin size only in
ConvertCWPDMDToSpectra. Xmin and Xmax will be searched automatically.
- modified: ../Mantid/Framework/DataHandling/src/LoadSpiceAscii.cpp
- modified: ../Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/ConvertCWPDMDToSpectra.h
- modified: ../Mantid/Framework/MDAlgorithms/src/ConvertCWPDMDToSpectra.cpp
- modified: ../Mantid/Framework/MDAlgorithms/test/ConvertCWPDMDToSpectraTest.h
Changeset: 6dab661ded9c2c7b555ccb05913a55db0f89bef6
comment:3 Changed 6 years ago by Wenduo Zhou
Refs #11282. Implemented unit Degrees.
And added unit test for it.
Fixed a bug about MomentumTransfer in ConvertCWPDMDToSpectra.
Use Degrees for output workspace if target unit is 2theta for ConvertCWPDMDToSpectra.
Changeset: efe1ecf9736de56e43736b48833a36c77a0ff7f4
comment:4 Changed 6 years ago by Wenduo Zhou
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #370.
comment:5 Changed 6 years ago by Wenduo Zhou
- Status changed from verify to reopened
- Resolution fixed deleted
comment:6 Changed 6 years ago by Wenduo Zhou
- Status changed from reopened to inprogress
Fixed a bug in LoadSpiceAscii's doc. Refs #11282.
Changeset: a067b1b8d38540e7685854e567daffb96aa0a6ba
comment:10 Changed 6 years ago by Wenduo Zhou
Jenkins, retest this please
comment:11 Changed 6 years ago by Wenduo Zhou
Refs #11282. Fixed some issue on bin boundary.
Changeset: 3614b9afa19f52e8080963e116f5a0e07aba5e81
comment:12 Changed 6 years ago by Wenduo Zhou
Tester:
Here is the list of item that you can check against the requests for this ticket:
- LoadSpiceAscii should not require date time format:
- A default value is set to property DateAndTimeLog. The default value is of current HFIR's standard;
- ConvertSpiceDataToRealSpace creates an MD workspace with Y min and max limits both 0:
- This issue will be resolved in ticket #11288(http://trac.mantidproject.org/mantid/ticket/11288).
- ConvertCWPDMDToSpectra is a weird name. It should at least be explained in the documentation:
- Check the documentation and this algorithm's summary. The issue is addressed
4.Binning parameters must contain 3 numbers. People might be used to Rebin, that can also use one value. Minimum and maximum can be calculated:
- Minimum value and maximum value can be determined automatically. To test, you can run the script attached in the next comment. The difference between the diffraction pattern with min/max given or not should have very small difference.
- There is a weird warning message "Unable to set unit to an Unit::Empty object." The reason is that the "Degrees" unit is not registered:
- 'Degree' is added. You can check unit test and the result in the script next.
comment:13 Changed 6 years ago by Wenduo Zhou
Test script: test file 'HB2A_exp0231_scan0001.dat' can be found in unit test.
LoadSpiceAscii(Filename='HB2A_exp0231_scan0001.dat', DateAndTimeLog='date,MM/DD/YYYY,time,HH:MM:SS AM', OutputWorkspace='HB2A_exp0231_scan0001_DataTable', RunInfoWorkspace='HB2A_exp0231_scan0001_Log')
ConvertSpiceDataToRealSpace(InputWorkspace='HB2A_exp0231_scan0001_DataTable', RunInfoWorkspace='HB2A_exp0231_scan0001_Log', OutputWorkspace='HB2A_exp0231_scan0001_DataMD', OutputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD')
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='5,0.1,150', OutputWorkspace='TTheta', NeutronWaveLength=2.4100000000000001)
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='0.1', OutputWorkspace='TTheta2', NeutronWaveLength=2.4100000000000001)
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='0.5,0.01, 30.0', OutputWorkspace='Dspace', NeutronWaveLength=2.4100000000000001, UnitOutput='dSpacing')
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='0.01', OutputWorkspace='Dspace2', NeutronWaveLength=2.4100000000000001, UnitOutput='dSpacing')
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='0.5,0.01, 30.0', OutputWorkspace='Q', NeutronWaveLength=2.4100000000000001, UnitOutput='Momentum Transfer (Q)')
ConvertCWPDMDToSpectra(InputWorkspace='HB2A_exp0231_scan0001_DataMD', InputMonitorWorkspace='HB2A_exp0231_scan0001_MonitorMD',
BinningParams='0.01', OutputWorkspace='Q2', NeutronWaveLength=2.4100000000000001, UnitOutput='Momentum Transfer (Q)')
comment:14 Changed 6 years ago by Wenduo Zhou
Cleaned the codes for log output. Refs #11282.
Changeset: 2265ef043d4ef4f1a28c12ba8794a01a7eab02f4
comment:15 Changed 6 years ago by Wenduo Zhou
- Status changed from inprogress to verifying
- Tester set to Wenduo Zhou
comment:16 Changed 6 years ago by Wenduo Zhou
- Status changed from verifying to verify
- Tester Wenduo Zhou deleted
comment:17 Changed 6 years ago by Andrei Savici
- Status changed from verify to verifying
- Tester set to Andrei Savici
comment:18 Changed 6 years ago by Wenduo Zhou
Retest this please.
comment:19 Changed 6 years ago by Andrei Savici
The code is very complicated. It reimplements Rebin, InterpolatingRebin, Scale. It can be reduced by at least a factor of 3, and made more readable. I have created ticket #11399 (http://trac.mantidproject.org/mantid/ticket/11399) to deal with this issue
comment:20 Changed 6 years ago by Andrei Savici
- Status changed from verifying to closed
Merge pull request #370 from mantidproject/feature/11282_spice_issues
Fixing usability issues for reducing HFIR data from SPICE file
Full changeset: f946f7f9bf6a1e8fbffc2ab17c767a01852c4f13
comment:21 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 12121