- Timestamp:
- Mar 17, 2010, 2:52:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/MosaicOps.c
r27306 r27312 8 8 static off_t **bin; /* catalog, measure -> mosaic */ 9 9 10 static off_t**clist; /* mosaic -> catalog[] */10 static int **clist; /* mosaic -> catalog[] */ 11 11 static off_t **mlist; /* mosiac -> measure[] */ 12 12 static off_t *Nlist; … … 26 26 ALLOCATE (mosaic, Mosaic, NMOSAIC); 27 27 28 ALLOCATE (imlist, off_t *, NMOSAIC);29 ALLOCATE (Nimlist, off_t, NMOSAIC);30 ALLOCATE (NIMLIST, off_t, NMOSAIC);28 ALLOCATE (imlist, off_t *, NMOSAIC); 29 ALLOCATE (Nimlist, off_t, NMOSAIC); 30 ALLOCATE (NIMLIST, off_t, NMOSAIC); 31 31 32 32 /* generate list of unique mosaics */ … … 78 78 if (Nmosaic == NMOSAIC) { 79 79 NMOSAIC += 10; 80 REALLOCATE (mosaic, Mosaic,NMOSAIC);81 REALLOCATE (imlist, off_t *, NMOSAIC);82 REALLOCATE (Nimlist, off_t, NMOSAIC);83 REALLOCATE (NIMLIST, off_t, NMOSAIC);80 REALLOCATE (mosaic, Mosaic, NMOSAIC); 81 REALLOCATE (imlist, off_t *, NMOSAIC); 82 REALLOCATE (Nimlist, off_t, NMOSAIC); 83 REALLOCATE (NIMLIST, off_t, NMOSAIC); 84 84 } 85 85 } … … 201 201 202 202 /* mosaic -> measure */ 203 ALLOCATE (Nlist, off_t, Nmosaic);204 ALLOCATE (NLIST, off_t, Nmosaic);205 ALLOCATE (clist, off_t *,Nmosaic);203 ALLOCATE (Nlist, off_t, Nmosaic); 204 ALLOCATE (NLIST, off_t, Nmosaic); 205 ALLOCATE (clist, int *, Nmosaic); 206 206 ALLOCATE (mlist, off_t *, Nmosaic); 207 207 … … 209 209 Nlist[i] = 0; 210 210 NLIST[i] = 100; 211 ALLOCATE (clist[i], off_t,NLIST[i]);211 ALLOCATE (clist[i], int, NLIST[i]); 212 212 ALLOCATE (mlist[i], off_t, NLIST[i]); 213 213 } … … 239 239 int findMosaics (Catalog *catalog, int Ncatalog) { 240 240 241 int i, ecode; 241 242 off_t j; 242 int i, ecode;243 243 244 244 if (!MOSAIC_ZEROPT) return (FALSE); … … 260 260 void matchMosaics (Catalog *catalog, off_t meas, int cat) { 261 261 262 int off_t;262 int i; 263 263 264 264 for (i = 0; i < Nmosaic; i++) { … … 286 286 if (Nlist[i] == NLIST[i]) { 287 287 NLIST[i] += 100; 288 REALLOCATE (clist[i], int, NLIST[i]);289 REALLOCATE (mlist[i], int, NLIST[i]);288 REALLOCATE (clist[i], int, NLIST[i]); 289 REALLOCATE (mlist[i], off_t, NLIST[i]); 290 290 } 291 291 return; … … 295 295 } 296 296 297 float getMmos (off_t meas, off_t cat) {297 float getMmos (off_t meas, int cat) { 298 298 299 299 off_t i; … … 392 392 mark = (N < IMAGE_TOOFEW) || (N < IMAGE_GOOD_FRACTION*Nlist[i]); 393 393 if (mark) { 394 fprintf (stderr, "marked image %s (% d), (%d < %d) || (%d < %f*%d)\n", image[imlist[i][0]].name, i, N, IMAGE_TOOFEW, N, IMAGE_GOOD_FRACTION,Nlist[i]);394 fprintf (stderr, "marked image %s (%lld), (%lld < %d) || (%lld < %f*%lld)\n", image[imlist[i][0]].name, (long long) i, (long long) N, IMAGE_TOOFEW, (long long) N, IMAGE_GOOD_FRACTION, (long long) Nlist[i]); 395 395 mosaic[i].flags |= ID_IMAGE_FEW; 396 396 Nfew ++; … … 400 400 } 401 401 liststats (list, dlist, N, &stats); 402 if (PoorImages) fprintf (stderr, "Mmos: %f %f %d % d\n", stats.mean, stats.sigma, stats.Nmeas,N);402 if (PoorImages) fprintf (stderr, "Mmos: %f %f %d %lld\n", stats.mean, stats.sigma, stats.Nmeas, (long long) N); 403 403 mosaic[i].Mcal = stats.mean; 404 404 mosaic[i].dMcal = stats.sigma; … … 511 511 n++; 512 512 } 513 fprintf (stderr, "Nmosaic: % d, n: %d\n", Nmosaic,n);513 fprintf (stderr, "Nmosaic: %lld, n: %lld\n", (long long) Nmosaic, (long long) n); 514 514 515 515 liststats (list, dlist, n, &stats); … … 591 591 } 592 592 593 fprintf (stderr, "% d mosaics marked poor\n",Nmark);593 fprintf (stderr, "%lld mosaics marked poor\n", (long long) Nmark); 594 594 initstats (STATMODE); 595 595 free (mlist); … … 635 635 } 636 636 637 sprintf (string, "Mosaic % d",i);637 sprintf (string, "Mosaic %lld", (long long) i); 638 638 plot_defaults (&graphdata); 639 639 plot_list (&graphdata, xlist, ylist, N, string, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
