Skip to content

Commit

Permalink
dwidenoise: Move noise estimate from member to functor scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Lestropie committed Nov 7, 2024
1 parent 239e994 commit b66bf23
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/dwidenoise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ template <typename F> class DenoisingFunctor {
// Marchenko-Pastur optimal threshold
const double lam_r = std::max(s[0], 0.0) / q;
double clam = 0.0;
sigma2 = 0.0;
double sigma2 = 0.0;
ssize_t cutoff_p = 0;
for (ssize_t p = 0; p < r; ++p) // p+1 is the number of noise components
{ // (as opposed to the paper where p is defined as the number of signal components)
Expand Down Expand Up @@ -559,7 +559,6 @@ template <typename F> class DenoisingFunctor {
MatrixType XtX;
Eigen::SelfAdjointEigenSolver<MatrixType> eig;
SValsType s;
double sigma2;
Image<bool> mask;
Image<real_type> noise;
Image<uint16_t> rankmap;
Expand Down

0 comments on commit b66bf23

Please sign in to comment.