Skip to content

Commit

Permalink
fix warning for zero weights (i.e. masked pixels)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Tessore committed Jan 26, 2016
1 parent 91f2536 commit a9fe8d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lensed.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,12 @@ int main(int argc, char* argv[])
}
}

// make sure weights are positive
// make sure weights are non-negative
for(size_t i = 0; i < lensed->size; ++i)
{
if(!(lensed->weight[i] > 0))
if(!(lensed->weight[i] >= 0))
{
warn("non-positive values in weights\n"
warn("negative values in weights\n"
"Some pixel weights are not positive numbers. This will "
"almost certainly lead to wrong results. If you did not "
"provide the weight map yourself, the reason might be a "
Expand Down

0 comments on commit a9fe8d0

Please sign in to comment.