99 |
|
t2 = DOT(rdirscan(py)[px], |
100 |
|
rdirscan(y)[x]); |
101 |
|
if (t2 <= FTINY) continue; |
102 |
+ |
/* use approximation instead |
103 |
|
t2 = acos(t2); |
104 |
|
t2 = 1./(t2*t2); |
105 |
+ |
*/ |
106 |
+ |
t2 = .5 / (1. - t2); |
107 |
|
copycolor(ctmp, fovscan(y)[x]); |
108 |
|
scalecolor(ctmp, t2); |
109 |
|
addcolor(vsum, ctmp); |
180 |
|
}; |
181 |
|
double l10La; |
182 |
|
register int i; |
183 |
< |
/* interpolate/extrapolate data */ |
183 |
> |
/* check limits */ |
184 |
> |
if (La <= 7.85e-4) |
185 |
> |
return(resfreq[0]); |
186 |
> |
if (La >= 1.78e3) |
187 |
> |
return(resfreq[NPOINTS-1]); |
188 |
> |
/* interpolate data */ |
189 |
|
l10La = log10(La); |
190 |
|
for (i = 0; i < NPOINTS-2 && l10lum[i+1] <= l10La; i++) |
191 |
|
; |
363 |
|
} |
364 |
|
fcross(cp, diffx, diffy); |
365 |
|
omega = 0.5 * sqrt(DOT(cp,cp)); |
366 |
< |
tsampr(x,y) = PI/180. / sqrt(omega) / |
367 |
< |
hacuity(plum(fovscan(y)[x])); |
368 |
< |
if (tsampr(x,y) > maxsr) |
366 |
> |
if (omega <= FTINY) |
367 |
> |
tsampr(x,y) = 1.; |
368 |
> |
else if ((tsampr(x,y) = PI/180. / sqrt(omega) / |
369 |
> |
hacuity(plum(fovscan(y)[x]))) > maxsr) |
370 |
|
maxsr = tsampr(x,y); |
371 |
|
} |
372 |
|
/* copy perimeter (easier) */ |