isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
NFFT.h
1 // -*- C++ -*-
2 // -*- coding: utf-8 -*-
3 //
4 // Author: Brian Hawkins
5 // Copyright 2019-
6 //
7 
8 #pragma once
9 
10 #include "forward.h"
11 
12 #include <cmath>
13 #include <valarray>
14 
15 #include <isce3/core/Constants.h>
16 #include <isce3/core/Kernels.h>
17 #include "Signal.h"
18 
42 template<class T>
43 class isce3::signal::NFFT {
44  public:
51  NFFT(size_t m, size_t n, size_t fft_size);
52 
66  void execute(const std::valarray<std::complex<T>> &spectrum,
67  const std::valarray<double> &times,
68  std::valarray<std::complex<T>> &out);
69 
86  void execute(size_t isize, size_t istride,
87  const std::complex<T> *spectrum,
88  size_t tsize, size_t tstride,
89  const double *times,
90  size_t osize, size_t ostride,
91  std::complex<T> *out);
92 
104  void execute_adjoint(const std::valarray<std::complex<T>> &time_series,
105  const std::valarray<double> &times,
106  std::valarray<std::complex<T>> &spectrum);
107 
120  void execute_adjoint(size_t isize, size_t istride,
121  const std::complex<T> *time_series,
122  size_t tsize, size_t tstride,
123  const double *times,
124  size_t osize, size_t ostride,
125  std::complex<T> *spectrum);
126 
127 
139  void set_spectrum(const std::valarray<std::complex<T>> &x);
140 
152  void set_spectrum(size_t size, size_t stride, const std::complex<T> *x);
153 
161  std::complex<T> interp(double t) const;
162 
163  size_t size_kernel() const {return 2*_m+1;}
164  size_t size_spectrum() const {return _n;}
165  size_t size_transform() const {return _fft_size;}
166 
167  private:
168  size_t _m, _n, _fft_size;
169  std::valarray<std::complex<T>> _xf, _xt;
170  std::valarray<T> _weights;
173 };
Non-equispaced fast Fourier transform (NFFT)
Definition: forward.h:9
NFFT(size_t m, size_t n, size_t fft_size)
NFFT Constructor.
Definition: NFFT.cpp:20
std::complex< T > interp(double t) const
Interpolate the transformed signal.
Definition: NFFT.cpp:101
void set_spectrum(const std::valarray< std::complex< T >> &x)
Ingest a spectrum for transform.
Definition: NFFT.cpp:92
void execute(const std::valarray< std::complex< T >> &spectrum, const std::valarray< double > &times, std::valarray< std::complex< T >> &out)
Execute a transform.
Definition: NFFT.cpp:132
void execute_adjoint(const std::valarray< std::complex< T >> &time_series, const std::valarray< double > &times, std::valarray< std::complex< T >> &spectrum)
Execute an adjoint transform.
Definition: NFFT.cpp:195

Generated for ISCE3.0 by doxygen 1.8.5.