PURIFY
Next-generation radio interferometric imaging
Functions
purify::projection_kernels Namespace Reference

Functions

t_complex fourier_wproj_kernel (const t_real x, const t_real y, const t_real w, const t_real u, const t_real v, const t_real du, const t_real dv)
 integration kernel for 2d fourier transform of chirp, bounded to a circle of radius x/du < 1 More...
 
t_complex hankel_wproj_kernel (const t_real r, const t_real w, const t_real u, const t_real v, const t_real du)
 integration kernel for hankel transform with chirp More...
 
t_complex exact_w_projection_integration_1d (const t_real u, const t_real v, const t_real w, const t_real du, const t_real oversample_ratio, const std::function< t_complex(t_real)> &ftkerneluv, const t_uint &max_evaluations, const t_real &absolute_error, const t_real &relative_error, const integration::method method, t_uint &evaluations)
 
t_complex exact_w_projection_integration (const t_real u, const t_real v, const t_real w, const t_real du, const t_real dv, const t_real oversample_ratio, const std::function< t_complex(t_real)> &ftkernelu, const std::function< t_complex(t_real)> &ftkernelv, const t_uint &max_evaluations, const t_real &absolute_error, const t_real &relative_error, const integration::method method, t_uint &evaluations)
 numerical integration of chirp and kernel in image domain More...
 

Function Documentation

◆ exact_w_projection_integration()

t_complex purify::projection_kernels::exact_w_projection_integration ( const t_real  u,
const t_real  v,
const t_real  w,
const t_real  du,
const t_real  dv,
const t_real  oversample_ratio,
const std::function< t_complex(t_real)> &  ftkernelu,
const std::function< t_complex(t_real)> &  ftkernelv,
const t_uint &  max_evaluations,
const t_real &  absolute_error,
const t_real &  relative_error,
const integration::method  method,
t_uint &  evaluations 
)

numerical integration of chirp and kernel in image domain

Definition at line 46 of file wkernel_integration.cc.

53  {
54  auto const func = [&](const Vector<t_real> &x) -> t_complex {
55  evaluations++;
56  return ftkernelu(x(0)) * ftkernelv(x(1)) * fourier_wproj_kernel(x(0), x(1), w, u, v, du, dv);
57  };
58  Vector<t_real> xmax = Vector<t_real>::Zero(2);
59  xmax(0) = oversample_ratio / 2.;
60  xmax(1) = oversample_ratio / 2.;
61  const Vector<t_real> xmin = -xmax;
62  return integration::integrate(xmin, xmax, func, integration::norm_type::paired, absolute_error,
63  relative_error, max_evaluations, method) /
64  (xmax(0) - xmin(0)) / (xmax(1) - xmin(1));
65 }
const std::vector< t_real > u
data for u coordinate
Definition: operators.cc:18
const std::vector< t_real > v
data for v coordinate
Definition: operators.cc:20
t_real integrate(const Vector< t_real > &xmin, const Vector< t_real > &xmax, const std::function< t_real(Vector< t_real >)> &func, const norm_type norm, const t_real required_abs_error, const t_real required_rel_error, const t_uint max_evaluations, const method methodtype)
adaptive integration with cubature for real scalar to vector
Definition: integration.cc:7
t_complex fourier_wproj_kernel(const t_real x, const t_real y, const t_real w, const t_real u, const t_real v, const t_real du, const t_real dv)
integration kernel for 2d fourier transform of chirp, bounded to a circle of radius x/du < 1

References fourier_wproj_kernel(), purify::integration::integrate(), purify::integration::paired, operators_test::u, and operators_test::v.

Referenced by purify::details::init_gridding_matrix_2d(), main(), and TEST_CASE().

◆ exact_w_projection_integration_1d()

t_complex purify::projection_kernels::exact_w_projection_integration_1d ( const t_real  u,
const t_real  v,
const t_real  w,
const t_real  du,
const t_real  oversample_ratio,
const std::function< t_complex(t_real)> &  ftkerneluv,
const t_uint &  max_evaluations,
const t_real &  absolute_error,
const t_real &  relative_error,
const integration::method  method,
t_uint &  evaluations 
)

numerical integration of chirp and radial symmetric kernel in the image domain using hankel transform

Definition at line 25 of file wkernel_integration.cc.

31  {
32  evaluations = 0;
33  const auto func = [&](const Vector<t_real> &x) -> t_complex {
34  evaluations++;
35  assert(std::abs(x(0)) <= 1);
36  return ftkerneluv(x(0)) * hankel_wproj_kernel(x(0), w, u, v, du);
37  };
38  const Vector<t_real> xmin = Vector<t_real>::Zero(1);
39  const Vector<t_real> xmax = Vector<t_real>::Constant(1, oversample_ratio / 2.);
40  return 2. * constant::pi *
41  integration::integrate(xmin, xmax, func, integration::norm_type::paired, absolute_error,
42  relative_error, max_evaluations, method) /
43  std::pow(xmax(0), 2);
44 }
const t_real pi
mathematical constant
Definition: types.h:70
t_complex hankel_wproj_kernel(const t_real r, const t_real w, const t_real u, const t_real v, const t_real du)
integration kernel for hankel transform with chirp

References hankel_wproj_kernel(), purify::integration::integrate(), purify::integration::paired, purify::constant::pi, operators_test::u, and operators_test::v.

Referenced by purify::details::init_gridding_matrix_2d(), main(), and TEST_CASE().

◆ fourier_wproj_kernel()

t_complex purify::projection_kernels::fourier_wproj_kernel ( const t_real  x,
const t_real  y,
const t_real  w,
const t_real  u,
const t_real  v,
const t_real  du,
const t_real  dv 
)

integration kernel for 2d fourier transform of chirp, bounded to a circle of radius x/du < 1

Definition at line 7 of file wkernel_integration.cc.

8  {
9  // checking bounds don't go past the horizon...
10  if ((std::pow(x / du, 2) + std::pow(y / dv, 2)) < 1)
11  return std::exp(t_complex(
12  0.,
13  -2 * constant::pi *
14  (u * x + v * y + w * (std::sqrt(1 - (x * x) / (du * du) - (y * y) / (dv * dv)) - 1))));
15  else
16  return 0;
17 }

References purify::constant::pi, operators_test::u, and operators_test::v.

Referenced by exact_w_projection_integration(), and TEST_CASE().

◆ hankel_wproj_kernel()

t_complex purify::projection_kernels::hankel_wproj_kernel ( const t_real  r,
const t_real  w,
const t_real  u,
const t_real  v,
const t_real  du 
)

integration kernel for hankel transform with chirp

Definition at line 18 of file wkernel_integration.cc.

19  {
20  return ((r / du < 1.) ? std::exp(t_complex(
21  0., -2 * constant::pi * w * (std::sqrt(1 - (r * r) / (du * du)) - 1)))
22  : 1) *
23  boost::math::cyl_bessel_j(0, 2 * constant::pi * r * std::sqrt(u * u + v * v)) * r;
24 }

References purify::constant::pi, operators_test::u, and operators_test::v.

Referenced by exact_w_projection_integration_1d().