1 |
< |
/* Copyright (c) 1996 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1997 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
185 |
|
{ |
186 |
|
double b, s; |
187 |
|
register int i; |
188 |
< |
double wlum, sf; |
188 |
> |
double wlum, sf, dlum; |
189 |
|
|
190 |
|
sf = scalef*inpexp; |
191 |
|
if (lumf == cielum) sf *= WHTEFFICACY; |
192 |
|
s = (bwmax - bwmin)/HISTRES; |
193 |
|
for (i = 0, b = bwmin + .5*s; i < HISTRES; i++, b += s) { |
194 |
|
wlum = Lb(b); |
195 |
< |
if (what2do&DO_LINEAR) |
196 |
< |
fprintf(fp, "%e %e\n", wlum, sf*wlum); |
197 |
< |
else |
195 |
> |
if (what2do&DO_LINEAR) { |
196 |
> |
dlum = sf*wlum; |
197 |
> |
if (dlum > ldmax) dlum = ldmax; |
198 |
> |
else if (dlum < ldmin) dlum = ldmin; |
199 |
> |
fprintf(fp, "%e %e\n", wlum, dlum); |
200 |
> |
} else |
201 |
|
fprintf(fp, "%e %e\n", wlum, Lb(BLw(wlum))); |
202 |
|
} |
203 |
|
} |