Skip to content

Commit

Permalink
Added feedback to REF_L side. This refs #5801
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Nov 28, 2012
1 parent 6bae549 commit 09932f4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public slots:

public:
signals:
void python_peak_back_tof_range_update(double, double, double, double, double, double);
void peak_back_tof_range_update(double, double, double, double, double, double);

private:
RefIVConnections() {}
Expand Down
36 changes: 18 additions & 18 deletions Code/Mantid/MantidQt/RefDetectorViewer/src/RefIVConnections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,28 +342,25 @@ void RefIVConnections::graph_range_changed()

void RefIVConnections::peak_back_tof_range_update()
{
std::cout << "Inside RefImageView::peak_back_tof_range_update: ";

QLineEdit * peak_left_control = iv_ui->lineEdit_peakLeft;
std::cout << peak_left_control->text().toStdString() << std::endl;

// double peakmin = iv_ui->lineEdit_peakLeft->text()->toDouble();
// double peakmax = iv_ui->lineEdit_peakRight->text()->toDouble();
// double backmin = iv_ui->lineEdit_backLeft->text()->toDouble();
// double backmax = iv_ui->lineEdit_backright->text()->toDouble();
// double tofmin = iv_ui->lineEdit_TOFmin->text()->toDouble();
// double tofmax = iv_ui->lineEdit_TOFmax->text()->toDouble();
// std::cout << "peakmin: " << peakmin << std::endl;
double peakmin = peak_left_control->text().toDouble();

QLineEdit * peak_right_control = iv_ui->lineEdit_peakRight;
double peakmax = peak_right_control->text().toDouble();

QLineEdit * back_left_control = iv_ui->lineEdit_backLeft;
double backmin = back_left_control->text().toDouble();

double peakmin = 1;
double peakmax = 1;
double backmin = 1;
double backmax = 1;
double tofmin = 1;
double tofmax = 1;
QLineEdit * back_right_control = iv_ui->lineEdit_backRight;
double backmax = back_right_control->text().toDouble();

emit python_peak_back_tof_range_update(peakmin, peakmax, backmin, backmax, tofmin, tofmax);
QLineEdit * tof_min_control = iv_ui->lineEdit_TOFmin;
double tofmin = tof_min_control->text().toDouble();

QLineEdit * tof_max_control = iv_ui->lineEdit_TOFmax;
double tofmax = tof_max_control->text().toDouble();

emit peak_back_tof_range_update(peakmin, peakmax, backmin, backmax, tofmin, tofmax);
}

void RefIVConnections::edit_manual_input()
Expand Down Expand Up @@ -436,6 +433,7 @@ void RefIVConnections::edit_manual_input()
}

image_display->UpdateImage();
peak_back_tof_range_update();

}

Expand Down Expand Up @@ -485,6 +483,8 @@ void RefIVConnections::imagePicker2_moved()
int index = selected_points.size() - 1;
int mouseClick = 1;
image_display->SetPointedAtPoint( selected_points[index], mouseClick );
peak_back_tof_range_update();

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,17 +911,17 @@ def _plot_data_count_vs_tof_2d(self):
import mantidqtpython
self.ref_det_view = mantidqtpython.MantidQt.RefDetectorViewer.RefMatrixWSImageView(ws_output_base)
QtCore.QObject.connect(self.ref_det_view.getConnections(),
QtCore.SIGNAL("python_peak_back_tof_range_update(double,double, double,double,double,double)"), self.call_back)
QtCore.SIGNAL("peak_back_tof_range_update(double,double, double,double,double,double)"), self.call_back)


def call_back(self, peakmin, peakmax, backmin, backmax, tofmin, tofmax):
print 'Inside the call_back in the python side'
# self._summary.data_peak_from_pixel.setText("%-d" % int(peakmin))
# self._summary.data_peak_to_pixel.setText("%-d" % int(peakmax))
# self._summary.data_background_from_pixel1.setText("%-d" % int(backmin))
# self._summary.data_background_to_pixel1.setText("%-d" % int(backmax))
# self._summary.x_min_edit.setText("%-d" % int(tofmin))
# self._summary.x_max_edit.setText("%-d" % int(tofmax))
self._summary.data_peak_from_pixel.setText("%-d" % int(peakmin))
self._summary.data_peak_to_pixel.setText("%-d" % int(peakmax))
self._summary.data_background_from_pixel1.setText("%-d" % int(backmin))
self._summary.data_background_to_pixel1.setText("%-d" % int(backmax))
self._summary.data_from_tof.setText("%-d" % int(tofmin))
self._summary.data_to_tof.setText("%-d" % int(tofmax))


def _norm_count_vs_y(self):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def _load_entry(entry, ws, title=""):

# 2D plot
output_2d = ws_output+'_2D'
print output_2d
Rebin(InputWorkspace=ws,OutputWorkspace=output_2d,Params="%d,200,%d" % (tof_min, tof_max))
if is_pixel_y:
grouping_file = os.path.join(instr_dir, "Grouping",
Expand Down

0 comments on commit 09932f4

Please sign in to comment.