fixed bugs

This commit is contained in:
James E McClure 2016-04-25 15:58:10 -04:00
parent ca97cd9133
commit 40c75ee1bb

View File

@ -711,7 +711,8 @@ int main(int argc, char **argv)
} }
else{ else{
mean_minus += spM(i,j,k); mean_minus += spM(i,j,k);
count_minus += 1.0; } count_minus += 1.0;
}
} }
} }
} }
@ -747,7 +748,7 @@ int main(int argc, char **argv)
for (i=0;i<nsx;i++){ for (i=0;i<nsx;i++){
float dst = spDist(i,j,k); float dst = spDist(i,j,k);
// use exponential weight based on the distance // use exponential weight based on the distance
float temp = 1.0-exp(-lambda*fabs(dst))); float temp = 1.0-exp(-lambda*fabs(dst));
float value; float value;
if (dst > 0){ if (dst > 0){
value = temp*mean_plus; value = temp*mean_plus;