version 1.23, 2014/02/18 19:50:19
|
version 1.24, 2014/02/18 23:18:07
|
Line 1055 int computeR(float *bz_err, float *los, |
|
Line 1055 int computeR(float *bz_err, float *los, |
|
init_fresize_boxcar(&fresboxcar,1,1); | init_fresize_boxcar(&fresboxcar,1,1); |
| |
// setup convolution kernel | // setup convolution kernel |
//init_fresize_gaussian(&fresgauss,sigma,4,1); |
|
init_fresize_gaussian(&fresgauss,sigma,20,1); | init_fresize_gaussian(&fresgauss,sigma,20,1); |
| |
if ((nx || ny) < 40.) return -1; |
// make sure convolution kernel is smaller than or equal to array size |
|
if ((nx || ny) < 41.) return -1; |
//float *test = (float *)malloc(nx1*ny1*sizeof(float)); |
|
| |
fsample(los, rim, nx, ny, nx, nx1, ny1, nx1, scale, 0, 0, 0.0); | fsample(los, rim, nx, ny, nx, nx1, ny1, nx1, scale, 0, 0, 0.0); |
for (i = 0; i < nx1; i++) | for (i = 0; i < nx1; i++) |
Line 1110 int computeR(float *bz_err, float *los, |
|
Line 1108 int computeR(float *bz_err, float *los, |
|
else | else |
*Rparam = log10(sum); | *Rparam = log10(sum); |
| |
printf("Rparam=%f",*Rparam); |
|
|
|
free_fresize(&fresboxcar); | free_fresize(&fresboxcar); |
free_fresize(&fresgauss); | free_fresize(&fresgauss); |
| |