First update.

This commit is contained in:
sunwen
2023-10-09 09:29:21 +08:00
parent a434c105c0
commit 903ac2c087
56 changed files with 1044 additions and 1021 deletions

View File

@@ -9,17 +9,17 @@
namespace Recon
{
Aurora::Matrix reconstructBandpasssubsampling(Aurora::Matrix aMatrix, double aAScanReconstructionFreq, double aSampleRate)
Aurora::Matrix reconstructBandpasssubsampling(Aurora::Matrix aMatrix, float aAScanReconstructionFreq, float aSampleRate)
{
double downsamplingfactor = aAScanReconstructionFreq / aSampleRate;
double minimalExpectedAScanLength = 48;
float downsamplingfactor = aAScanReconstructionFreq / aSampleRate;
float minimalExpectedAScanLength = 48;
int expectedAScanlengthDS = (int)std::ceil(minimalExpectedAScanLength/downsamplingfactor);
double expectedAScanLength = std::max(expectedAScanlengthDS*downsamplingfactor, aMatrix.getDimSize(0)*downsamplingfactor);
float expectedAScanLength = std::max(expectedAScanlengthDS*downsamplingfactor, aMatrix.getDimSize(0)*downsamplingfactor);
expectedAScanlengthDS = std::ceil(expectedAScanLength/downsamplingfactor);
double s1 = aAScanReconstructionFreq;
double f1Stride = s1 / (expectedAScanLength - 1);
double * f1Data = Aurora::malloc(expectedAScanLength);
float s1 = aAScanReconstructionFreq;
float f1Stride = s1 / (expectedAScanLength - 1);
float * f1Data = Aurora::malloc(expectedAScanLength);
auto f1 = Aurora::Matrix::New(f1Data,expectedAScanLength,1,1);
for (int i = 0; i<expectedAScanLength; ++i) {
f1Data[i] = i*f1Stride;