15 #define ARGS_MACRO(NAME, ARGN, VALUE, TYPE) \ 
   17       static_cast<TYPE>((nargs > ARGN) ? std::stod(static_cast<std::string>(args[ARGN])) : VALUE); 
   27   auto const oversample_ratio = 2;
 
   28   auto const power_iters = 100;
 
   29   auto const power_tol = 1e-5;
 
   32   auto const imsizex = imsize;
 
   33   auto const imsizey = imsize;
 
   34   const t_real wval = w;
 
   39   const std::string suffix =
 
   40       "_" + std::to_string(
static_cast<int>(wval)) + 
"_" +
 
   41       std::to_string(
static_cast<int>(imsize)) + 
"_" + std::to_string(
static_cast<int>(cell)) +
 
   42       "_" + std::to_string(
static_cast<int>(Jw)) + 
"_" + ((
radial) ? 
"radial" : 
"2d");
 
   46   t_uint 
const number_of_pixels = imsizex * imsizey;
 
   47   t_uint 
const number_of_vis = std::floor(number_of_pixels * 2);
 
   53   uv_vis.w = Vector<t_real>::Constant(1, wval);
 
   54   uv_vis.units = utilities::vis_units::radians;
 
   56       2, imsizey, imsizex, [](t_real) { 
return 1.; }, [](t_real) { 
return 1.; }, wval, cell, cell);
 
   59       pfitsio::header_params(
"", 
" ", 1, 0, 0, stokes::I, cell, cell, 0, 1, 0, 0, 0, 0, 0);
 
   60   header.fits_name = 
"chirp_real_" + std::to_string(
static_cast<int>(wval)) + 
"_" +
 
   61                      std::to_string(
static_cast<int>(imsize)) + 
"_" +
 
   62                      std::to_string(
static_cast<int>(cell)) + 
".fits";
 
   64   header.fits_name = 
"chirp_imag_" + std::to_string(
static_cast<int>(wval)) + 
"_" +
 
   65                      std::to_string(
static_cast<int>(imsize)) + 
"_" +
 
   66                      std::to_string(
static_cast<int>(cell)) + 
".fits";
 
   68   const auto measure_opw = std::get<2>(sopt::algorithm::normalise_operator<Vector<t_complex>>(
 
   70           uv_vis, imsizey, imsizex, cell, cell, oversample_ratio,
 
   72           (radial) ? dde_type::wkernel_radial : dde_type::wkernel_2d),
 
   73       power_iters, power_tol, Vector<t_complex>::Random(imsizex * imsizey)));
 
   75       (measure_opw->adjoint() * Vector<t_complex>::Constant(1, 1)).conjugate();
 
   78   Image<t_complex> out =
 
   79       Image<t_complex>::Map(
measurements.data(), imsizey, imsizex) * std::sqrt(imsizex * imsizey);
 
   80   header.fits_name = 
"wproj_real" + suffix + 
".fits";
 
   82   header.fits_name = 
"wproj_imag" + suffix + 
".fits";
 
   84   header.fits_name = 
"diff_real" + suffix + 
".fits";
 
   85   pfitsio::write2d(2 * (chirp - out).real() / (chirp.real().abs() + out.real().abs()).array(),
 
   87   header.fits_name = 
"diff_imag" + suffix + 
".fits";
 
   88   pfitsio::write2d(2 * (chirp - out).imag() / (chirp.imag().abs() + out.imag().abs()).array(),
 
#define ARGS_MACRO(NAME, ARGN, VALUE, TYPE)
 
const t_real pi
mathematical constant
 
Image< t_complex > init_correction2d(const t_real &oversample_ratio, const t_uint &imsizey_, const t_uint &imsizex_, const std::function< t_real(t_real)> ftkernelu, const std::function< t_real(t_real)> ftkernelv, const t_real &w_mean, const t_real &cellx, const t_real &celly)
 
const std::map< std::string, kernel > kernel_from_string
 
void set_level(const std::string &level)
Method to set the logging level of the default Log object.
 
std::shared_ptr< sopt::LinearTransform< T > > init_degrid_operator_2d(const Vector< t_real > &u, const Vector< t_real > &v, const Vector< t_real > &w, const Vector< t_complex > &weights, const t_uint &imsizey, const t_uint &imsizex, const t_real &oversample_ratio=2, const kernels::kernel kernel=kernels::kernel::kb, const t_uint Ju=4, const t_uint Jv=4, const bool w_stacking=false, const t_real &cellx=1, const t_real &celly=1)
Returns linear transform that is the standard degridding operator.
 
void write2d(const Image< t_real > &eigen_image, const pfitsio::header_params &header, const bool &overwrite)
Write image to fits file.
 
utilities::vis_params random_sample_density(const t_int vis_num, const t_real mean, const t_real standard_deviation, const t_real rms_w)
Generates a random visibility coverage.
 
t_int w_support(const t_real w, const t_real du, const t_int min, const t_int max)
estimate support size of w given u resolution du
 
t_real pixel_to_lambda(const t_real cell, const t_uint imsize, const t_real oversample_ratio)
return factors to convert between arcsecond pixel size image space and lambda for uv space