Skip to content

Commit

Permalink
Merge pull request #357 from astro-informatics/tk/debug_examples
Browse files Browse the repository at this point in the history
Fix bugs in examples
  • Loading branch information
tkoskela authored Oct 9, 2024
2 parents 2537a2b + 98335ab commit 4ad17e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/example/mem_w_algos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main(int nargs, char const **args) {
std::vector<t_int> image_index;
std::tie(uv_data, image_index, w_stacks) = utilities::w_stacking_with_all_to_all(
uv_data, du, Ju, Jw, world, 100, 0., cost, k_means_rel_diff);
for (t_real k = 0; k < uv_data.size(); k++) {
for (t_int k = 0; k < uv_data.size(); k++) {
const t_int Ju_max = widefield::w_support(uv_data.w(k) - w_stacks.at(image_index.at(k)), du,
static_cast<t_int>(Ju), static_cast<t_int>(Jw));
const t_real mem = (Ju_max * Ju_max) * 16.;
Expand Down
2 changes: 1 addition & 1 deletion cpp/example/padmm_real_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void padmm(const std::string &name, const t_uint &imsizex, const t_uint &imsizey
auto const Psi = sopt::linear_transform<t_complex>(sara, imsizey, imsizex);
const Vector<> dimage = (measurements_transform->adjoint() * uv_data.vis).real();
Matrix<t_complex> point = Matrix<t_complex>::Zero(imsizey, imsizex);
point(std::floor(imsizey / 2), std::floor(imsizex / 2)) = 1.;
point(int(imsizey / 2), int(imsizex / 2)) = 1.;
const Vector<> psf =
(measurements_transform->adjoint() *
(*measurements_transform * Vector<t_complex>::Map(point.data(), point.size())).eval())
Expand Down
1 change: 0 additions & 1 deletion cpp/example/plot_wkernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "purify/config.h"

#include <iostream>
#include "catch.hpp"
#include "purify/directories.h"

#include "purify/types.h"
Expand Down

0 comments on commit 4ad17e3

Please sign in to comment.