76 |
|
/* photometric types */ |
77 |
|
#define PM_C 1 |
78 |
|
#define PM_B 2 |
79 |
+ |
#define PM_A 3 |
80 |
|
/* unit types */ |
81 |
|
#define U_FEET 1 |
82 |
|
#define U_METERS 2 |
700 |
|
fprintf(stderr, "dosource: bad lamp specification\n"); |
701 |
|
return(-1); |
702 |
|
} |
703 |
+ |
if (pmtype != PM_C && pmtype != PM_B) { |
704 |
+ |
fprintf(stderr, "dosource: unsupported photometric type (%d)\n", |
705 |
+ |
pmtype); |
706 |
+ |
return(-1); |
707 |
+ |
} |
708 |
|
sinf->mult = multiplier*mult*bfactor*pfactor; |
709 |
|
if (nangles[0] < 2 || nangles[1] < 1) { |
710 |
|
fprintf(stderr, "dosource: too few measured angles\n"); |
742 |
|
fprintf(out, "7 "); |
743 |
|
else |
744 |
|
fprintf(out, "5 "); |
745 |
< |
dolower = (bounds[0][0] < 90.); |
746 |
< |
doupper = (bounds[0][1] > 90.); |
745 |
> |
dolower = (bounds[0][0] < 90.-FTINY); |
746 |
> |
doupper = (bounds[0][1] > 90.+FTINY); |
747 |
|
dosides = (doupper & dolower && sinf->h > MINDIM); |
748 |
|
fprintf(out, "%s %s source.cal ", |
749 |
|
sinf->type==SPHERE ? "corr" : |
756 |
|
else |
757 |
|
fprintf(out, "srcB_horiz "); |
758 |
|
fprintf(out, "srcB_vert "); |
759 |
< |
} else /* pmtype == PM_A */ { |
759 |
> |
} else /* pmtype == PM_C */ { |
760 |
|
if (nangles[1] >= 2) { |
761 |
|
d1 = bounds[1][1] - bounds[1][0]; |
762 |
|
if (d1 <= 90.+FTINY) |