2025-04-30T10:59:07
This commit is contained in:
parent
51732f394c
commit
de17180ada
BIN
experiment_data/sample_data/~$锡.xlsx
Normal file
BIN
experiment_data/sample_data/~$锡.xlsx
Normal file
Binary file not shown.
@ -631,4 +631,33 @@ QVector<QPointF> PointCalculate::getPointVtrInXRange(const float x1, const float
|
|||||||
return targetVtr;
|
return targetVtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString PointCalculate::textFormatPeakPointWithTime(const float enthalpyValue, const float peakValue, const float startPoint, const float endPoint)
|
||||||
|
{
|
||||||
|
return QString("峰的综合信息:\n"
|
||||||
|
"焓值:%1 J/g \n"
|
||||||
|
"峰值:%2min \n"
|
||||||
|
"起始点:%3min \n"
|
||||||
|
"终止点:%4min"
|
||||||
|
)
|
||||||
|
.arg(QString::number(enthalpyValue, 'f', 3))
|
||||||
|
.arg(QString::number(peakValue, 'f', 3))
|
||||||
|
.arg(QString::number(startPoint, 'f', 3))
|
||||||
|
.arg(QString::number(endPoint, 'f', 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
double PointCalculate::obtainTimeValueBasedOnTemperatureValue(const double sampleTemp)
|
||||||
|
{
|
||||||
|
double minDiff = std::numeric_limits<float>::max();
|
||||||
|
double targetValue = 0.0;
|
||||||
|
|
||||||
|
for(const Global::ExperimentData &ed : _dataVtr) {
|
||||||
|
double min = std::abs(ed.sampleTemp - sampleTemp);
|
||||||
|
if (min < minDiff) {
|
||||||
|
minDiff = min;
|
||||||
|
targetValue = ed.runTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -23,12 +23,17 @@ QPair<float, float> getMaxMinValue();
|
|||||||
|
|
||||||
QPair<QPointF,QPointF> calculateStartAndEndPoint();
|
QPair<QPointF,QPointF> calculateStartAndEndPoint();
|
||||||
float calculateArea();
|
float calculateArea();
|
||||||
|
double obtainTimeValueBasedOnTemperatureValue(const double sampleTemp);
|
||||||
|
|
||||||
// text format
|
// text format
|
||||||
QString textFormatPeakPoint(const float enthalpyValue,
|
QString textFormatPeakPoint(const float enthalpyValue,
|
||||||
const float peakValue,
|
const float peakValue,
|
||||||
const float startPoint,
|
const float startPoint,
|
||||||
const float endPoint);
|
const float endPoint);
|
||||||
|
QString textFormatPeakPointWithTime(const float enthalpyValue,
|
||||||
|
const float peakValue,
|
||||||
|
const float startPoint,
|
||||||
|
const float endPoint);
|
||||||
QString textFormatNumbericalLabel(const QPointF);
|
QString textFormatNumbericalLabel(const QPointF);
|
||||||
QString textFormatStartPoint(const QPointF);
|
QString textFormatStartPoint(const QPointF);
|
||||||
QString textFormatEndPoint(const QPointF);
|
QString textFormatEndPoint(const QPointF);
|
||||||
|
@ -171,6 +171,7 @@ void XlsxHandler::writeFile(const QString filePath)
|
|||||||
xlsx.write(row , 2, ConPhaseHeaderTime);
|
xlsx.write(row , 2, ConPhaseHeaderTime);
|
||||||
xlsx.write(row , 3, ConPhaseHeaderTemp);
|
xlsx.write(row , 3, ConPhaseHeaderTemp);
|
||||||
xlsx.write(row , 4, ConPhaseHeaderVoltage);
|
xlsx.write(row , 4, ConPhaseHeaderVoltage);
|
||||||
|
xlsx.write(row , 5, ConPhaseHeaderTime);
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
xlsx.write(row , 1, ConPhaseIndex);
|
xlsx.write(row , 1, ConPhaseIndex);
|
||||||
|
@ -13,6 +13,8 @@ CurveExperimentData* _currentCurveExperimentDataPtr = nullptr;
|
|||||||
bool _enthalpyCoefficientEnableFlag = false;
|
bool _enthalpyCoefficientEnableFlag = false;
|
||||||
QVector<double> _enthalpyCoefficientVtr;
|
QVector<double> _enthalpyCoefficientVtr;
|
||||||
|
|
||||||
|
bool _displayTimeValue = false;
|
||||||
|
|
||||||
QString converDoubleToStr(const double num)
|
QString converDoubleToStr(const double num)
|
||||||
{
|
{
|
||||||
return QString::number(num,'f',3);
|
return QString::number(num,'f',3);
|
||||||
|
@ -18,6 +18,8 @@ const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state";
|
|||||||
|
|
||||||
const QString CurveOfTimeTypeObjectName("curve_time");
|
const QString CurveOfTimeTypeObjectName("curve_time");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum Mode{
|
enum Mode{
|
||||||
Analysis,
|
Analysis,
|
||||||
ConnectedToDev,
|
ConnectedToDev,
|
||||||
@ -89,6 +91,8 @@ extern CurveExperimentData* _currentCurveExperimentDataPtr;
|
|||||||
extern bool _enthalpyCoefficientEnableFlag;
|
extern bool _enthalpyCoefficientEnableFlag;
|
||||||
///abc
|
///abc
|
||||||
extern QVector<double> _enthalpyCoefficientVtr;
|
extern QVector<double> _enthalpyCoefficientVtr;
|
||||||
|
// peak comprehensive ananlysis
|
||||||
|
extern bool _displayTimeValue;
|
||||||
|
|
||||||
// common func
|
// common func
|
||||||
QString converDoubleToStr(const double);
|
QString converDoubleToStr(const double);
|
||||||
|
@ -45,6 +45,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
QLabel *permenentLabel = new QLabel(this);
|
QLabel *permenentLabel = new QLabel(this);
|
||||||
permenentLabel->setText("Software Ver:" + Global::ConSoftVersion);
|
permenentLabel->setText("Software Ver:" + Global::ConSoftVersion);
|
||||||
ui->statusbar->addPermanentWidget(permenentLabel);
|
ui->statusbar->addPermanentWidget(permenentLabel);
|
||||||
|
|
||||||
|
ui->actionTimeAxisAnalysisPCTMode->setCheckable(true);
|
||||||
//
|
//
|
||||||
setSubWidgetAttribute(_expertmentSettingForm);
|
setSubWidgetAttribute(_expertmentSettingForm);
|
||||||
setSubWidgetAttribute(_specificHeatComparisonMethodForm);
|
setSubWidgetAttribute(_specificHeatComparisonMethodForm);
|
||||||
@ -348,7 +350,7 @@ void MainWindow::on_actionOITAutoAnalysisMode_triggered()
|
|||||||
|
|
||||||
void MainWindow::on_actionTimeAxisAnalysisPCTMode_triggered()
|
void MainWindow::on_actionTimeAxisAnalysisPCTMode_triggered()
|
||||||
{
|
{
|
||||||
|
Global::_displayTimeValue = ui->actionTimeAxisAnalysisPCTMode->isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionDegreeOfCuring_triggered()
|
void MainWindow::on_actionDegreeOfCuring_triggered()
|
||||||
|
@ -370,11 +370,24 @@ void CentralWidget::slotAnalysisSettingApply()
|
|||||||
logde<<"start,end:"<<startEndPointPair.first.x()<<","
|
logde<<"start,end:"<<startEndPointPair.first.x()<<","
|
||||||
<<startEndPointPair.second.x();
|
<<startEndPointPair.second.x();
|
||||||
|
|
||||||
drawText(peakPoint,
|
if(Global::_displayTimeValue){
|
||||||
PointCalculate::textFormatPeakPoint(enthalpyValue,
|
double peakPointTime = PointCalculate::obtainTimeValueBasedOnTemperatureValue(peakPoint.x());
|
||||||
peakPoint.x(),
|
double startPointTime = PointCalculate::obtainTimeValueBasedOnTemperatureValue(startEndPointPair.first.x());
|
||||||
startEndPointPair.first.x(),
|
double endPointTime = PointCalculate::obtainTimeValueBasedOnTemperatureValue(startEndPointPair.second.x());
|
||||||
startEndPointPair.second.x()));
|
|
||||||
|
drawText(peakPoint,
|
||||||
|
PointCalculate::textFormatPeakPointWithTime(
|
||||||
|
enthalpyValue,
|
||||||
|
peakPointTime,
|
||||||
|
startPointTime,
|
||||||
|
endPointTime));
|
||||||
|
}else{
|
||||||
|
drawText(peakPoint,
|
||||||
|
PointCalculate::textFormatPeakPoint(enthalpyValue,
|
||||||
|
peakPoint.x(),
|
||||||
|
startEndPointPair.first.x(),
|
||||||
|
startEndPointPair.second.x()));
|
||||||
|
}
|
||||||
//
|
//
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user