| 278 |
|
fprintf(stderr, "%s: linear scaling factor = %f\n", |
| 279 |
|
progname, scalef); |
| 280 |
|
#endif |
| 281 |
< |
if (scalef < 0.99 | scalef > 1.01) |
| 282 |
< |
fputexpos(scalef, stdout); /* write in header */ |
| 281 |
> |
fputexpos(inpexp*scalef, stdout); /* record exposure */ |
| 282 |
|
if (lumf == cielum) scalef /= WHTEFFICACY; |
| 283 |
|
} |
| 284 |
|
putchar('\n'); /* complete header */ |
| 377 |
|
register int i; |
| 378 |
|
|
| 379 |
|
/* check for within display range */ |
| 380 |
< |
if (!(what2do&DO_LINEAR) && Lb(bwmax)/Lb(bwmin) <= ldmax/ldmin) |
| 380 |
> |
l = Lb(bwmax)/Lb(bwmin); |
| 381 |
> |
if (l <= ldmax/ldmin) |
| 382 |
|
what2do |= DO_LINEAR; |
| 383 |
+ |
/* determine if veiling significant */ |
| 384 |
+ |
if (l < 100.) /* heuristic */ |
| 385 |
+ |
what2do &= ~DO_VEIL; |
| 386 |
|
|
| 387 |
< |
if (!(what2do & (DO_ACUITY|DO_COLOR|DO_VEIL))) |
| 387 |
> |
if (!(what2do & (DO_ACUITY|DO_COLOR))) |
| 388 |
|
return; |
| 389 |
|
/* find 5th percentile */ |
| 390 |
|
sum = histot*0.05 + .5; |
| 393 |
|
break; |
| 394 |
|
b = (i+.5)*(bwmax-bwmin)/HISTRES + bwmin; |
| 395 |
|
l = Lb(b); |
| 393 |
– |
#if 0 |
| 396 |
|
/* determine if acuity adj. useful */ |
| 397 |
|
if (what2do&DO_ACUITY && |
| 398 |
|
hacuity(l) >= (inpres.xr/sqrt(ourview.hn2) + |
| 399 |
|
inpres.yr/sqrt(ourview.vn2))/(2.*180./PI*2.)) |
| 400 |
|
what2do &= ~DO_ACUITY; |
| 399 |
– |
#endif |
| 401 |
|
/* color sensitivity loss? */ |
| 402 |
|
if (l >= 6.0) |
| 403 |
|
what2do &= ~DO_COLOR; |
| 403 |
– |
if (!(what2do&DO_VEIL)) |
| 404 |
– |
return; |
| 405 |
– |
/* find 50th percentile (median) */ |
| 406 |
– |
sum = histot*0.50 + .5; |
| 407 |
– |
for (i = 0; i < HISTRES; i++) |
| 408 |
– |
if ((sum -= bwhist[i]) <= 0) |
| 409 |
– |
break; |
| 410 |
– |
/* determine if veiling significant */ |
| 411 |
– |
b = (i+.5)*(bwmax-bwmin)/HISTRES + bwmin; |
| 412 |
– |
if ((b-bwmin)/(bwmax-bwmin) >= 0.70) /* heuristic */ |
| 413 |
– |
what2do &= ~DO_VEIL; |
| 404 |
|
} |