2025-06-23T17:30:20
This commit is contained in:
parent
2b879ef928
commit
f3c25014f1
BIN
experiment_data/sample_data/~$铟(1).xlsx
Normal file
BIN
experiment_data/sample_data/~$铟(1).xlsx
Normal file
Binary file not shown.
BIN
experiment_data/sample_data/铟(1).xlsx
Normal file
BIN
experiment_data/sample_data/铟(1).xlsx
Normal file
Binary file not shown.
@ -274,6 +274,9 @@ float PointCalculate::calculateArea() {
|
|||||||
logde<<"coefficient:"<<coefficient;
|
logde<<"coefficient:"<<coefficient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logde<<"integral:"<<integral;
|
||||||
|
logde<<"coefficient:"<<coefficient;
|
||||||
|
logde<<"Global::DefaultParamter:"<<Global::DefaultParamter;
|
||||||
|
|
||||||
float area = integral * coefficient * Global::DefaultParamter;
|
float area = integral * coefficient * Global::DefaultParamter;
|
||||||
|
|
||||||
|
@ -164,6 +164,17 @@ QString getFileName(const QString filePath)
|
|||||||
return fileInfo.fileName();
|
return fileInfo.fileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double converStrToDouble(const QString str)
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
|
double value = str.toDouble(&ok); // 将字符串转换为 double,并检查是否成功
|
||||||
|
if (!ok) {
|
||||||
|
qDebug() << "转换失败,输入的字符串不是有效的数字";
|
||||||
|
return 0.0; // 如果转换失败,返回默认值
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -177,6 +177,7 @@ extern double _OITAutoAnalysisThreshold;
|
|||||||
|
|
||||||
// common func
|
// common func
|
||||||
QString converDoubleToStr(const double);
|
QString converDoubleToStr(const double);
|
||||||
|
double converStrToDouble(const QString);
|
||||||
void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]);
|
void quadraticLeastSquaresFit(double x[], double y[], int n, double coeff[]);
|
||||||
double findNegativeStartPoint(double m, double b, double start, double end);
|
double findNegativeStartPoint(double m, double b, double start, double end);
|
||||||
bool isZero(double value, double epsilon = 1e-9);
|
bool isZero(double value, double epsilon = 1e-9);
|
||||||
|
@ -1411,21 +1411,25 @@ void CentralWidget::calculateAnalysisResult(
|
|||||||
|
|
||||||
//enthalpy
|
//enthalpy
|
||||||
double sampleWeight = 1.0f;
|
double sampleWeight = 1.0f;
|
||||||
for(Global::CurveFileData& cfd:Global::_curveFileDataVtr){
|
if(Global::_curveFileDataVtr.empty()){
|
||||||
for(Global::PhaseTotalInfo& pti:cfd.phaseTotalVtr){
|
sampleWeight = Global::converStrToDouble(Global::_experimentInfo.sampleWeight);
|
||||||
|
}else{
|
||||||
|
for(Global::CurveFileData& cfd:Global::_curveFileDataVtr){
|
||||||
|
for(Global::PhaseTotalInfo& pti:cfd.phaseTotalVtr){
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if(_currentCurve && _currentCurve == pti.curve){
|
if(_currentCurve && _currentCurve == pti.curve){
|
||||||
sampleWeight = cfd.ei.sampleWeight.toDouble();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if(_currentCurve){
|
|
||||||
if(_currentCurve == pti.curve){
|
|
||||||
sampleWeight = cfd.ei.sampleWeight.toDouble();
|
sampleWeight = cfd.ei.sampleWeight.toDouble();
|
||||||
}else{
|
|
||||||
}
|
}
|
||||||
}else{
|
#endif
|
||||||
// logde<<"current curve nullptr.";
|
if(_currentCurve){
|
||||||
|
if(_currentCurve == pti.curve){
|
||||||
|
sampleWeight = cfd.ei.sampleWeight.toDouble();
|
||||||
|
}else{
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
// logde<<"current curve nullptr.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user