@@ -42,56 +42,30 @@ namespace nc::fft
4242 // /
4343 // / @param inArray
4444 // / @param n Length of the transformed axis of the output.
45- // / @param inAxis (Optional, default NONE)
4645 // /
4746 // / @return NdArray
4847 // /
4948 template <typename dtype>
50- NdArray<std::complex <double >> fft2_resample (const NdArray<dtype>& inArray, uint32 inN, Axis inAxis = Axis::NONE )
49+ NdArray<std::complex <double >> fft2resample (const NdArray<dtype>& inArray, const Shape& inShape )
5150 {
51+ STATIC_ASSERT_ARITHMETIC_OR_COMPLEX (dtype);
52+
53+ return ifft2 (fft2 (inArray, inShape), inShape);
5254 }
5355
5456 // ===========================================================================
5557 // Method Description:
5658 // / Resample a series to m,n points via Fourier interpolation
5759 // /
5860 // / @param inArray
59- // / @param inAxis (Optional, default NONE)
6061 // /
6162 // / @return NdArray
6263 // /
6364 template <typename dtype>
64- NdArray<std::complex <double >> fft2_resample (const NdArray<dtype>& inArray, Axis inAxis = Axis::NONE )
65+ NdArray<std::complex <double >> fft2resample (const NdArray<dtype>& inArray)
6566 {
66- }
67+ STATIC_ASSERT_ARITHMETIC_OR_COMPLEX (dtype);
6768
68- // ============================================================================
69- // Method Description:
70- // / Resample a series to m,n points via Fourier interpolation
71- // /
72- // / @param inArray
73- // / @param n Length of the transformed axis of the output.
74- // / @param inAxis (Optional, default NONE)
75- // /
76- // / @return NdArray
77- // /
78- template <typename dtype>
79- NdArray<std::complex <double >>
80- fft2_resample (const NdArray<std::complex <dtype>>& inArray, uint32 inN, Axis inAxis = Axis::NONE)
81- {
82- }
83-
84- // ============================================================================
85- // Method Description:
86- // / Resample a series to m,n points via Fourier interpolation
87- // /
88- // / @param inArray
89- // / @param inAxis (Optional, default NONE)
90- // /
91- // / @return NdArray
92- // /
93- template <typename dtype>
94- NdArray<std::complex <double >> fft2_resample (const NdArray<std::complex <dtype>>& inArray, Axis inAxis = Axis::NONE)
95- {
69+ return ifft2 (fft2 (inArray));
9670 }
9771} // namespace nc::fft
0 commit comments