Commit 5aac42a1 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Allow minimum TOF to be equal to zero

This will get rid of negative time-of-flight values in the cases when
the DAS writes them to the raw data file.
parent e6c342ce
......@@ -502,7 +502,8 @@ void AlignAndFocusPowder::exec() {
}
m_progress->report();
if (xmin > 0. || xmax > 0.) {
// crop the workspace in time-of-flight
if (xmin >= 0. || xmax > 0.) {
double tempmin;
double tempmax;
m_outputW->getXMinMax(tempmin, tempmax);
......@@ -512,7 +513,7 @@ void AlignAndFocusPowder::exec() {
API::IAlgorithm_sptr cropAlg = createChildAlgorithm("CropWorkspace");
cropAlg->setProperty("InputWorkspace", m_outputW);
cropAlg->setProperty("OutputWorkspace", m_outputW);
if ((xmin > 0.) && (xmin > tempmin))
if ((xmin >= 0.) && (xmin > tempmin))
cropAlg->setProperty("Xmin", xmin);
if ((xmax > 0.) && (xmax < tempmax))
cropAlg->setProperty("Xmax", xmax);
......
......@@ -52,6 +52,7 @@ Bugfixes
- Fixed the issue with :ref:`SNSPowderReduction <algm-SNSPowderReduction>` - when an invalid height unit is encountered while reading sample log the geometry is ignored and it relies purely on user input.
- Fixed a bug when converting TOF to d-spacing using diffractometer constants with non-zero DIFA when a parabolic model is selected.
- Corrected the equation for pseudo-voigt FWHM and mixing parameter in peak profile function :ref:`Bk2BkExpConvPV <func-Bk2BkExpConvPV>`.
- Fixed a bug when filtering events in :ref:`AlignAndFocusPowder <algm-AlignAndFocusPowder-v1>` based on time-of-flight. The code now allows setting the minimum time-of-flight to zero (inclusive).
Engineering Diffraction
-----------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment