1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
//how the data is read in
auto uv_data = utilities::read_visibility(input_data_path, false);
uv_data.units = utilities::vis_units::radians;
//expected number of visibilities
REQUIRE(uv_data.size() == 13107);
//image size
t_uint const imsizey = 256;
t_uint const imsizex = 256;
//input parameters for measurement operator
auto const measurements_transform
= factory::measurement_operator_factory<Vector<t_complex>>(
factory::distributed_measurement_operator::serial, uv_data, imsizey, imsizex, 1, 1, 2, 100,
0.0001, kernels::kernel_from_string.at("kb"), 4, 4);
//input wavelets for sara dictionary
std::vector<std::tuple<std::string, t_uint>> const sara{
std::make_tuple("Dirac", 3u), std::make_tuple("DB1", 3u), std::make_tuple("DB2", 3u),
std::make_tuple("DB3", 3u), std::make_tuple("DB4", 3u), std::make_tuple("DB5", 3u),
std::make_tuple("DB6", 3u), std::make_tuple("DB7", 3u), std::make_tuple("DB8", 3u)};
//how the wavelet operator was made
auto const wavelets = factory::wavelet_operator_factory<Vector<t_complex>>(factory::distributed_wavelet_operator::serial, sara, imsizey, imsizex);
//the value of sigma, this is generated from the SNR value and simulated measurements, which was 10
t_real const sigma = 0.02378738741225; //see test_parameters file
// values put into the algorithm factory. You need to look into the algorithm factory for how gamma and epsilon are calculated
auto const padmm
= factory::algorithm_factory<sopt::algorithm::ImagingProximalADMM<t_complex>>(
factory::algorithm::padmm, factory::algo_distribution::serial,
measurements_transform, wavelets, uv_data, sigma, imsizey, imsizex, sara.size(), 500);
auto const diagnostic = (*padmm)();
//The expected number of iterations
CHECK(diagnostic.niters == 139);
|