| 16 |
|
|
| 17 |
|
char *progname; /* global argv[0] */ |
| 18 |
|
|
| 19 |
+ |
long beamtot, samptot; /* total beams and samples */ |
| 20 |
|
|
| 21 |
+ |
|
| 22 |
|
main(argc, argv) |
| 23 |
|
int argc; |
| 24 |
|
char *argv[]; |
| 67 |
|
psectstats(hdsect, fout); /* print section statistics */ |
| 68 |
|
} |
| 69 |
|
nextloc = hdfilen(fd); /* print global statistics */ |
| 70 |
+ |
fputs("=====================================================\n", fout); |
| 71 |
+ |
fprintf(fout, "Total samples/beams: %ld/%ld (%.2f samples/beam)\n", |
| 72 |
+ |
samptot, beamtot, (double)samptot/beamtot); |
| 73 |
|
fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n", |
| 74 |
|
nextloc/(1024.*1024.), |
| 75 |
|
100.*(nextloc-hdfiluse(fd,1))/nextloc); |
| 87 |
|
{ |
| 88 |
|
int scount[NHBINS]; |
| 89 |
|
int minsamp = 10000, maxsamp = 0; |
| 90 |
+ |
FVECT vt; |
| 91 |
|
double sqrtmaxp; |
| 92 |
|
int bmin, bmax, cnt; |
| 93 |
|
register int i; |
| 94 |
|
|
| 95 |
+ |
fcross(vt, hp->xv[0], hp->xv[1]); |
| 96 |
+ |
fprintf(fp, "\tWorld volume: %g\n", fabs(DOT(vt,hp->xv[2]))); |
| 97 |
|
fprintf(fp, "\tGrid resolution: %d x %d x %d\n", |
| 98 |
|
hp->grid[0], hp->grid[1], hp->grid[2]); |
| 99 |
< |
fprintf(fp, "\tNumber of beams: %d\n", nbeams(hp)); |
| 100 |
< |
fprintf(fp, "\tNumber of ray samples: %d\n", biglob(hp)->nrd); |
| 99 |
> |
fprintf(fp, "\tNumber of beams: %ld\n", (long)nbeams(hp)); |
| 100 |
> |
beamtot += nbeams(hp); |
| 101 |
> |
fprintf(fp, "\tNumber of ray samples: %ld\n", (long)biglob(hp)->nrd); |
| 102 |
> |
samptot += biglob(hp)->nrd; |
| 103 |
|
if (biglob(hp)->nrd <= 0) |
| 104 |
|
return; /* no samples to stat! */ |
| 105 |
|
for (i = nbeams(hp); i > 0; i--) { |