Browse Source

改善光学算法

master
zhaohe 3 months ago
parent
commit
61bb52065a
  1. 2
      src/main/java/a8k/app/constant/OptConstant.java
  2. 14
      src/main/java/a8k/app/service/lowerctrl/OptScanModuleCtrlService.java
  3. 12
      src/main/java/a8k/extui/page/extapp/A8kOptVerification.java
  4. BIN
      tools/20250122光学光学报告.xlsx
  5. BIN
      tools/20250427光学光学报告.xlsx

2
src/main/java/a8k/app/constant/OptConstant.java

@ -4,5 +4,5 @@ public class OptConstant {
static public final Integer FOPT_LASTER_GAIN = 100; static public final Integer FOPT_LASTER_GAIN = 100;
static public final Integer TOPT_LASTER_GAIN = 100; static public final Integer TOPT_LASTER_GAIN = 100;
static public final Integer OPT_RESULT_TOLERATE = 300; static public final Integer OPT_RESULT_TOLERATE = 300;
static public final Integer OPT_TARGE_VAL = 2600;
static public final Integer OPT_TARGE_VAL = 1000;
} }

14
src/main/java/a8k/app/service/lowerctrl/OptScanModuleCtrlService.java

@ -132,7 +132,7 @@ public class OptScanModuleCtrlService {
} }
public OptRawScanData doOptScan(A8kOptType optType) throws AppException {
public OptRawScanData doOptScan(A8kOptType optType, Boolean autoAmpl) throws AppException {
log.info("doOptScan ............"); log.info("doOptScan ............");
log.info(" optType : {}", optType); log.info(" optType : {}", optType);
@ -159,6 +159,9 @@ public class OptScanModuleCtrlService {
log.info(" scanRealGain : {}", scanRealGain); log.info(" scanRealGain : {}", scanRealGain);
result = startOptScan(optType, lasterGain, scanRawGain); result = startOptScan(optType, lasterGain, scanRawGain);
if (!autoAmpl) {
break;
}
if (i + 1 >= adjustCount) { if (i + 1 >= adjustCount) {
@ -188,8 +191,7 @@ public class OptScanModuleCtrlService {
return rawData; return rawData;
} }
public OptScanResult optScan(ProjBuildinInfo projBuildinInfo, Integer subProjIndex) throws AppException {
public OptScanResult optScan(ProjBuildinInfo projBuildinInfo, Integer subProjIndex, Boolean autoAmpl) throws AppException {
UISender.txInfoMsg(log, "光学扫描"); UISender.txInfoMsg(log, "光学扫描");
A8kOptCurveAnalyzer a8KOptCurveAnalyzer = new A8kOptCurveAnalyzer(); A8kOptCurveAnalyzer a8KOptCurveAnalyzer = new A8kOptCurveAnalyzer();
@ -197,7 +199,7 @@ public class OptScanModuleCtrlService {
OptScanResult result = new OptScanResult(); OptScanResult result = new OptScanResult();
result.scanDate = new Date(); result.scanDate = new Date();
OptRawScanData rawData = doOptScan(projBuildinInfo.optcfg.get(subProjIndex).optType);
OptRawScanData rawData = doOptScan(projBuildinInfo.optcfg.get(subProjIndex).optType, autoAmpl);
A8kOptPeakInfo analysResult = a8KOptCurveAnalyzer.analysCurve(projBuildinInfo.projId, projBuildinInfo.optcfg.get(subProjIndex), rawData.rawData); A8kOptPeakInfo analysResult = a8KOptCurveAnalyzer.analysCurve(projBuildinInfo.projId, projBuildinInfo.optcfg.get(subProjIndex), rawData.rawData);
result.rawData = rawData; result.rawData = rawData;
@ -205,4 +207,8 @@ public class OptScanModuleCtrlService {
return result; return result;
} }
public OptScanResult optScan(ProjBuildinInfo projBuildinInfo, Integer subProjIndex) throws AppException {
return optScan(projBuildinInfo, subProjIndex, true);
}
} }

12
src/main/java/a8k/extui/page/extapp/A8kOptVerification.java

@ -129,14 +129,12 @@ public class A8kOptVerification {
} }
static class OptScanReport { static class OptScanReport {
public A8kOptType optType; public A8kOptType optType;
public A8kScanCurve optScanCurve; public A8kScanCurve optScanCurve;
public OptScanResult optScanResult; public OptScanResult optScanResult;
public ProjBuildinInfo projInfo; public ProjBuildinInfo projInfo;
public Integer subProjIndex;
public Integer subProjIndex;
} }
List<OptScanReport> optScanReports = new ArrayList<>(); List<OptScanReport> optScanReports = new ArrayList<>();
@ -170,7 +168,7 @@ public class A8kOptVerification {
} }
public String doOptScan() throws AppException, IOException {
public String doOptScan(Boolean autoAmpl) throws AppException, IOException {
// fileMgrService.clearOptReport(); // fileMgrService.clearOptReport();
optScanReports.clear(); optScanReports.clear();
var projInfo = projInfoMgrService.getProjBuildInInfoByMountedCard(); var projInfo = projInfoMgrService.getProjBuildInInfoByMountedCard();
@ -180,7 +178,7 @@ public class A8kOptVerification {
for (int i = 0; i < projInfo.optcfg.size(); i++) { for (int i = 0; i < projInfo.optcfg.size(); i++) {
OptScanResult scanResult = getOptScanResult(projInfo.optcfg.get(i).optType); OptScanResult scanResult = getOptScanResult(projInfo.optcfg.get(i).optType);
if (scanResult == null) { if (scanResult == null) {
scanResult = optScanModuleCtrlService.optScan(projInfo, i);
scanResult = optScanModuleCtrlService.optScan(projInfo, i, autoAmpl);
} }
generateOptReport(projInfo, i, scanResult); generateOptReport(projInfo, i, scanResult);
} }
@ -245,7 +243,7 @@ public class A8kOptVerification {
public FileToBeDownload getTOptReport() throws AppException, IOException { public FileToBeDownload getTOptReport() throws AppException, IOException {
for (var report : optScanReports) { for (var report : optScanReports) {
if (report.optType.equals(A8kOptType.TOPT)) { if (report.optType.equals(A8kOptType.TOPT)) {
return new FileToBeDownload(fileMgrService.storageOptReport(report.projInfo.projName, report.projInfo.projId, report.optScanResult));
return new FileToBeDownload(fileMgrService.storageOptReport(report.projInfo.projName, report.projInfo.projId, report.optScanResult));
} }
} }
throw AppException.ofSimplePrompt("当前项目没有T光学报告"); throw AppException.ofSimplePrompt("当前项目没有T光学报告");
@ -254,7 +252,7 @@ public class A8kOptVerification {
public FileToBeDownload getFOptReport() throws AppException, IOException { public FileToBeDownload getFOptReport() throws AppException, IOException {
for (var report : optScanReports) { for (var report : optScanReports) {
if (report.optType.equals(A8kOptType.FOPT)) { if (report.optType.equals(A8kOptType.FOPT)) {
return new FileToBeDownload(fileMgrService.storageOptReport(report.projInfo.projName, report.projInfo.projId, report.optScanResult));
return new FileToBeDownload(fileMgrService.storageOptReport(report.projInfo.projName, report.projInfo.projId, report.optScanResult));
} }
} }
throw AppException.ofSimplePrompt("当前项目没有F光学报告"); throw AppException.ofSimplePrompt("当前项目没有F光学报告");

BIN
tools/20250122光学光学报告.xlsx

BIN
tools/20250427光学光学报告.xlsx

Loading…
Cancel
Save