jfjoch_viewer: Minor adjustments
This commit is contained in:
@@ -21,16 +21,9 @@ JFJochViewerSidePanelChart::JFJochViewerSidePanelChart(QWidget *parent) : QWidge
|
||||
this, &JFJochViewerSidePanelChart::comboBoxSelected);
|
||||
|
||||
azint_plot = new JFJochSimpleChartView(this);
|
||||
one_over_d_sq_plot = new JFJochOneOverResSqChartView(this);
|
||||
|
||||
stack = new QStackedWidget(this);
|
||||
stack->addWidget(azint_plot); // index 0
|
||||
stack->addWidget(one_over_d_sq_plot); // index 2
|
||||
|
||||
layout->addWidget(stack);
|
||||
|
||||
layout->addWidget(azint_plot); // index 0
|
||||
setLayout(layout);
|
||||
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanelChart::comboBoxSelected(int val) {
|
||||
@@ -46,40 +39,37 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
case 0:
|
||||
x = image->GetAzInt1D_BinToQ();
|
||||
y = image->GetAzInt1D();
|
||||
azint_plot->UpdateData(x, y, "Q [Å^-1]", "");
|
||||
stack->setCurrentWidget(azint_plot);
|
||||
azint_plot->UpdateData(x, y, "Q [Å^-1]", "", false);
|
||||
break;
|
||||
case 1:
|
||||
x = image->ImageData().integration_B_one_over_d_square;
|
||||
y = image->ImageData().integration_B_logI;
|
||||
one_over_d_sq_plot->UpdateData(x, y, "d [Å]", "ln(<I>)");
|
||||
stack->setCurrentWidget(one_over_d_sq_plot);
|
||||
azint_plot->UpdateData(x, y, "d [Å]", "ln(<I>)", true);
|
||||
|
||||
break;
|
||||
case 2:
|
||||
x = image->ImageData().integration_Isigma_one_over_d_square;
|
||||
y = image->ImageData().integration_Isigma;
|
||||
one_over_d_sq_plot->UpdateData(x, y, "d [Å]", "I/sigma");
|
||||
stack->setCurrentWidget(one_over_d_sq_plot);
|
||||
azint_plot->UpdateData(x, y, "d [Å]", "I/sigma", true);
|
||||
|
||||
break;
|
||||
case 4:
|
||||
x = image->Dataset().experiment.GetFluorescenceSpectrum().GetEnergy_eV();
|
||||
y = image->Dataset().experiment.GetFluorescenceSpectrum().GetData();
|
||||
for (auto &iter: x)
|
||||
iter /= 1000.0; // Convert eV to keV
|
||||
azint_plot->UpdateData(x, y, "E [keV]", "");
|
||||
stack->setCurrentWidget(azint_plot);
|
||||
azint_plot->UpdateData(x, y, "E [keV]", "", false);
|
||||
break;
|
||||
case 5:
|
||||
x = image->ImageData().spot_plot_one_over_d_square;
|
||||
y = image->ImageData().spot_plot_count;
|
||||
one_over_d_sq_plot->UpdateData(x, y, "d [Å]", "Count");
|
||||
stack->setCurrentWidget(one_over_d_sq_plot);
|
||||
azint_plot->UpdateData(x, y, "d [Å]", "Count", true);
|
||||
|
||||
break;
|
||||
case 6:
|
||||
x = image->ImageData().spot_plot_one_over_d_square;
|
||||
y = image->ImageData().spot_plot_intensity;
|
||||
one_over_d_sq_plot->UpdateData(x, y, "d [Å]", "Count");
|
||||
stack->setCurrentWidget(one_over_d_sq_plot);
|
||||
azint_plot->UpdateData(x, y, "d [Å]", "Count", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -87,10 +77,6 @@ void JFJochViewerSidePanelChart::redrawPlot() {
|
||||
[&](QString string, int timeout_ms) {
|
||||
emit writeStatusBar(string, timeout_ms);
|
||||
});
|
||||
connect(one_over_d_sq_plot, &JFJochSimpleChartView::writeStatusBar,
|
||||
[&](QString string, int timeout_ms) {
|
||||
emit writeStatusBar(string, timeout_ms);
|
||||
});
|
||||
}
|
||||
|
||||
void JFJochViewerSidePanelChart::loadImage(std::shared_ptr<const JFJochReaderImage> in_image) {
|
||||
|
||||
Reference in New Issue
Block a user