Update geometry info , measrementInfo for startReconstruction.
This commit is contained in:
22
src/common/estimatePulseLength.cpp
Normal file
22
src/common/estimatePulseLength.cpp
Normal 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;
|
||||
}
|
||||
17
src/common/estimatePulseLength.h
Normal file
17
src/common/estimatePulseLength.h
Normal 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
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace Recon
|
||||
int Wavelength;
|
||||
unsigned int expectedAScanLength;
|
||||
std::string rootMeasUniqueID;
|
||||
double dacDelay;
|
||||
double filterByPass;
|
||||
Aurora::Matrix matchedFilter;
|
||||
};
|
||||
|
||||
struct CEInfo
|
||||
|
||||
Reference in New Issue
Block a user