filter negative values in ADC
In ADC's rebing, we filter negative values with :
int MaskNegativeValues (real *ptr, int nr, int ns, real mask)
{
int l,count=0;
for (int i=0; i<nr; i++) {
for (int j=0; j<ns; j++) {
l = i*ns+j;
if (ptr[l] <= 0.0) {
ptr[l] = mask;
count++;
}
}
}
return count;
}
Why is mask != 0 ? and if we consider mask is small enough, why do we test ptr[l] against 0 instead of mas ?
And why do we make 0s in density with SIGM0 ?
count = MaskNegativeValues(&(NewArray[0]),grid.globalNbRadius(),grid.nbSector(),SIGMA0);