Add progress notify

This commit is contained in:
kradchen
2023-09-12 09:53:30 +08:00
parent 1e6dfaf212
commit b2721db958
12 changed files with 118 additions and 25 deletions

View File

@@ -3,6 +3,7 @@
#include "Function1D.h"
#include "Function2D.h"
#include "common/dataBlockCreation/removeDataFromArrays.h"
#include "log/notify.h"
#include "src//config/config.h"
#include "src/common/getGeometryInfo.h"
#include "src/common/temperatureCalculation/extractTasTemperature.h"
@@ -370,6 +371,7 @@ TransmissionData Recon::getTransmissionData(const Aurora::Matrix& aMotorPos, con
std::cout<<"Remove: "<<index<<std::endl;
CREATE_BUFFER_CONDITION.notify_one();
}
Recon::notifyProgress(6+10*((i+1)*(j+1)/(aMotorPos.getDataSize()*(aSlList.getDataSize()/ transParams::senderTASSize))));
}
}
speedUpThread.join();

View File

@@ -7,6 +7,7 @@
#include "config/config.h"
#include "CudaEnvInit.h"
#include "log/notify.h"
#include "transmissionReconstruction/reconstruction/buildMatrix/buildMatrix.h"
#include "src/transmissionReconstruction/reconstruction/solvingEquationSystem/solve.h"
@@ -233,6 +234,7 @@ namespace Recon {
Matrix attValue = solveParameterIterator(buildMatrixR.M, bAtt, dims, false, transParams::nonNeg)[0][0];
result.outATT = attValue/100 ;
}
Recon::notifyProgress(10 + 10 * (iter/numIter));
}
return result;

View File

@@ -3,6 +3,7 @@
#include "Matrix.h"
#include "log/log.h"
#include "common/dataBlockCreation/removeDataFromArrays.h"
#include "log/notify.h"
#include "src/transmissionReconstruction/dataFilter/dataFilter.h"
#include "src/transmissionReconstruction/dataPreperation.h"
#include "src/common/getMeasurementMetaData.h"
@@ -25,21 +26,25 @@ TransmissionReconstructionResult Recon::startTransmissionReconstruction(const Au
{
RECON_INFO("Start getTransmissionData.");
auto transmissionData = getTransmissionData(aMotorPos, aMotoPosRef, aSlList, aSnList, aRlList, aRnList, aTemp, aTempRef,
aGeom, aGeomRef, aExpInfo, aExpInfoRef, aPreComputes, aParser, aParserRef);
aGeom, aGeomRef, aExpInfo, aExpInfoRef, aPreComputes, aParser, aParserRef);
Matrix dists = Recon::distanceBetweenTwoPoints(transmissionData.senderList, transmissionData.receiverList);
Matrix sosRef = Recon::temperatureToSoundSpeed(transmissionData.waterTempList, "marczak");
Recon::notifyProgress(17);
Matrix valid = Recon::checkTofDetections(transmissionData.tofDataTotal, dists, sosRef,
Recon::transParams::minSpeedOfSound,Recon::transParams::maxSpeedOfSound).valid;
Recon::notifyProgress(18);
if(transParams::qualityCheck)
{
qualityReview(sum(valid,Aurora::All)[0], transmissionData.dataInfo.numPossibleScans);
}
}
Recon::notifyProgress(19);
DiscretizePositionValues positionValues = Recon::discretizePositions(transmissionData.senderList, transmissionData.receiverList, Recon::transParams::numPixelXY);
Matrix tofData = removeDataFromArrays(transmissionData.tofDataTotal, valid);
Matrix attData = removeDataFromArrays(transmissionData.attDataTotal, valid);
Matrix senderList = removeDataFromArrays(positionValues.senderCoordList, valid);
Matrix reveiverList = removeDataFromArrays(positionValues.receiverCoordList, valid);
Recon::notifyProgress(20);
RECON_INFO("Start reconstructArt.");
auto transmissionReon = reconstructArt(tofData, attData, positionValues.dims, senderList, reveiverList, positionValues.res, aTemp.expectedSOSWater[0]);