From 8bcb4ecd213a85d9c1e7830d8c1b2cc37dadcb93 Mon Sep 17 00:00:00 2001 From: anxinglong <2910824064@qq.com> Date: Wed, 22 Jul 2026 14:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B=E6=97=A0RO?= =?UTF-8?q?I=E5=8C=BA=E5=9F=9F=E6=97=B6=20=20=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DataProcessWorkPool.cpp | 6 +++--- src/EnergyScaleDataModel.cpp | 3 ++- src/RegionOfInterest/RegionOfInterest.cpp | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/DataProcessWorkPool.cpp b/src/DataProcessWorkPool.cpp index 45ce378..ceb03ef 100644 --- a/src/DataProcessWorkPool.cpp +++ b/src/DataProcessWorkPool.cpp @@ -1615,9 +1615,9 @@ bool ManualFindPeaksTask::processTask() arma::vec p_fit = NolinearLeastSquaresCurveFit::Lsqcurvefit( PhotonPeakModel, armaX, armaY, p0 ); - double amplitude = p_fit(0); // 峰振幅 - double sigma = p_fit(1); // 高斯sigma - double center = p_fit(5); // 峰中心(峰位) + double amplitude = p_fit(0);// 峰振幅 + double sigma = p_fit(1);// 高斯sigma + double center = p_fit(5);// 峰中心(峰位) double fwhm = sigma * 2.355; double baseline = p_fit(4); // 本底 double peakHeight = amplitude + baseline; // 峰高 = 振幅 + 本底 diff --git a/src/EnergyScaleDataModel.cpp b/src/EnergyScaleDataModel.cpp index da4528a..4fcd09e 100644 --- a/src/EnergyScaleDataModel.cpp +++ b/src/EnergyScaleDataModel.cpp @@ -25,7 +25,8 @@ const QString &EnergyScaleDataModel::GetDataFilename() const bool EnergyScaleDataModel::LoadData() { QFile json_file(_data_filename); - if (!json_file.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (!json_file.open(QIODevice::ReadOnly | QIODevice::Text)) + { return false; } QJsonDocument json_doc = QJsonDocument::fromJson(json_file.readAll()); diff --git a/src/RegionOfInterest/RegionOfInterest.cpp b/src/RegionOfInterest/RegionOfInterest.cpp index c6b9f99..b20829d 100644 --- a/src/RegionOfInterest/RegionOfInterest.cpp +++ b/src/RegionOfInterest/RegionOfInterest.cpp @@ -350,13 +350,13 @@ void RegionOfInterest::loadROIFromFile() QString roiPath = QApplication::applicationDirPath() + "/configure/RegionOfInterest/roiData.json"; if (!QFile::exists(roiPath)) { - QMessageBox::information(this, "提示", "暂无保存的ROI文件"); + // QMessageBox::information(this, "提示", "暂无保存的ROI文件"); return; } QJsonArray arr = readAllROIJson(); if (arr.isEmpty()) { - QMessageBox::information(this, "提示", "文件内无ROI数据"); + // QMessageBox::information(this, "提示", "文件内无ROI数据"); return; } // 清空当前界面与内存