Skip to content

Fix bugs in examples #357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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++) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honorary mention to this 🐛

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(static_cast<int>(std::floor(imsizey / 2)), static_cast<int>(std::floor(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