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;
}