Skip to content
Snippets Groups Projects
Commit f2976dd1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

inline local fct

parent 4edf234e
No related branches found
No related tags found
1 merge request!1982GUI 2d data import now showing u,v (bin) for all files
...@@ -17,22 +17,14 @@ ...@@ -17,22 +17,14 @@
#include "Base/Math/FourierTransform.h" #include "Base/Math/FourierTransform.h"
#include "Device/Data/Datafield.h" #include "Device/Data/Datafield.h"
namespace { Datafield Analyze::createFFT(const Datafield& data)
std::vector<std::vector<double>> FT2DArray(const std::vector<std::vector<double>>& signal)
{ {
FourierTransform ft; const auto signal = data.values2D();
std::vector<std::vector<double>> result;
ft.fft(signal, result);
ft.fftshift(result); // low frequency to center of array
return result;
}
} // namespace FourierTransform ft;
std::vector<std::vector<double>> signal2;
ft.fft(signal, signal2);
ft.fftshift(signal2); // low frequency to center of array
Datafield Analyze::createFFT(const Datafield& data) return {"~" + data.xAxis().axisLabel(), "~" + data.yAxis().axisLabel(), signal2};
{
auto array_2d = data.values2D();
auto fft_array_2d = FT2DArray(array_2d);
return {"~" + data.xAxis().axisLabel(), "~" + data.yAxis().axisLabel(), fft_array_2d};
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment