Skip to content

Commit

Permalink
Merge pull request #708 from mantidproject/11688_qlimits_issue
Browse files Browse the repository at this point in the history
Fix qlimits issue in old reflectometry GUI
  • Loading branch information
FedeMPouzols committed May 20, 2015
2 parents 3d28511 + 8dc4fcd commit 7e61d87
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/Stitch1D.cpp
Expand Up @@ -501,8 +501,8 @@ void Stitch1D::exec() {
const double intersectionMin = intesectionXRegion.get<0>();
const double intersectionMax = intesectionXRegion.get<1>();

const double startOverlap = getStartOverlap(intersectionMin, intersectionMax);
const double endOverlap = getEndOverlap(intersectionMin, intersectionMax);
double startOverlap = getStartOverlap(intersectionMin, intersectionMax);
double endOverlap = getEndOverlap(intersectionMin, intersectionMax);

if (startOverlap > endOverlap) {
std::string message = boost::str(
Expand All @@ -518,6 +518,12 @@ void Stitch1D::exec() {
const double &xMin = params.front();
const double &xMax = params.back();

if (std::abs(xMin - startOverlap) < 1E-6)
startOverlap = xMin;

if (std::abs(xMax - endOverlap) < 1E-6)
endOverlap = xMax;

if (startOverlap < xMin) {
std::string message = boost::str(
boost::format("Stitch1D StartOverlap is outside the available X range "
Expand Down
6 changes: 6 additions & 0 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
Expand Up @@ -809,6 +809,12 @@ def _process(self):
Qmin = min(w1.readX(0))
Qmax = max(w2.readX(0))

if len(self.tableMain.item(row, i * 5 + 3).text()) > 0:
Qmin = float(self.tableMain.item(row, i * 5 + 3).text())

if len(self.tableMain.item(row, i * 5 + 4).text()) > 0:
Qmax = float(self.tableMain.item(row, i * 5 + 4).text())

wcomb = combineDataMulti(wksp, outputwksp, overlapLow, overlapHigh, Qmin, Qmax, -dqq, 1, keep=True)


Expand Down

0 comments on commit 7e61d87

Please sign in to comment.