Update geometry info , measrementInfo for startReconstruction.

This commit is contained in:
sunwen
2023-05-19 10:28:22 +08:00
parent e5088ea657
commit 7088602b59
9 changed files with 168 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
#include "estimatePulseLength.h"
#include "Function1D.h"
#include "Function2D.h"
#include <cstddef>
#include <vector>
using namespace Aurora;
double Recon::estimatePulseLength(const CeEstimatePulseLength& aCe, double aSampleFreq)
{
Matrix value1 = abs(hilbert(aCe.ce));
double value2 = 0.05 * max(abs(hilbert(aCe.ce)),All)[0];
std::vector<size_t> t;
for(size_t i=0; i<value1.getDataSize(); ++i)
{
if(value1[i] > value2)
{
t.push_back(i);
}
}
return (t[t.size()-1] - t[0]) / aCe.ce_sf * aSampleFreq;
}

View File

@@ -0,0 +1,17 @@
#ifndef ESTIMATE_PULSE_LENGTH_H
#define ESTIMATE_PULSE_LENGTH_H
#include "Matrix.h"
namespace Recon
{
struct CeEstimatePulseLength
{
Aurora::Matrix ce;
double ce_sf;
};
double estimatePulseLength(const CeEstimatePulseLength& aCe, double aSampleFreq);
}
#endif

View File

@@ -192,13 +192,13 @@ void getApertureBoundingBox(GeometryInfo& aOutput)
}
}
GeometryInfo Recon::getGeometryInfo(const Matrix& aMotorPos, const Matrix& aTransformationMatricesRef,
GeometryInfo Recon::getGeometryInfo(const Matrix& aMotorPos, const Matrix& aTransformationMatrices,
const Matrix aRlList, const Matrix aRnList, const Matrix aSlList, const Matrix aSnList)
{
GeometryInfo result;
result.headTable = Recon::HEAD_TABLE;
result.sensChar = loadSensitivity();
transformGeometry(aMotorPos, aTransformationMatricesRef, aRlList, aRnList, aSlList, aSnList, result);
transformGeometry(aMotorPos, aTransformationMatrices, aRlList, aRnList, aSlList, aSnList, result);
getApertureBoundingBox(result);
result.maxSL = emitterPositions.size();
result.maxSN = emitterPositions[0].getDimSize(0);

View File

@@ -26,7 +26,7 @@ namespace Recon
std::vector<Aurora::Matrix> receiverPositions;
};
GeometryInfo getGeometryInfo(const Aurora::Matrix& aMotorPos, const Aurora::Matrix& aTransformationMatricesRef,
GeometryInfo getGeometryInfo(const Aurora::Matrix& aMotorPos, const Aurora::Matrix& aTransformationMatrices,
const Aurora::Matrix aRlList, const Aurora::Matrix aRnList, const Aurora::Matrix aSlList, const Aurora::Matrix aSnList);
}

View File

@@ -53,6 +53,8 @@ MeasurementInfo Recon::loadMeasurementInfos(Parser* aParser)
result.Wavelength = 3;
result.expectedAScanLength = result.numberSamples;
result.rootMeasUniqueID = metaData.getMeasurementID();
result.dacDelay = metaData.getDacDelay();
result.filterByPass = metaData.getFilterByPass();
if(result.Bandpassundersampling)
{
result.expectedAScanLength = reflectParams::aScanReconstructionFrequency / result.sampleRate * result.expectedAScanLength;

View File

@@ -20,6 +20,9 @@ namespace Recon
int Wavelength;
unsigned int expectedAScanLength;
std::string rootMeasUniqueID;
double dacDelay;
double filterByPass;
Aurora::Matrix matchedFilter;
};
struct CEInfo