IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2010, 2:52:38 PM (16 years ago)
Author:
eugene
Message:

more largefile support mods -- code now builds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/largefiles.20100314/Ohana/src/relphot/src/MosaicOps.c

    r27306 r27312  
    88static off_t   **bin;    /* catalog, measure -> mosaic */
    99
    10 static off_t   **clist;  /* mosaic -> catalog[] */
     10static int     **clist;  /* mosaic -> catalog[] */
    1111static off_t   **mlist;  /* mosiac -> measure[] */
    1212static off_t    *Nlist;
     
    2626  ALLOCATE (mosaic, Mosaic, NMOSAIC);
    2727
    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);
    3131
    3232  /* generate list of unique mosaics */
     
    7878    if (Nmosaic == NMOSAIC) {
    7979      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);
    8484    }
    8585  }
     
    201201
    202202  /* 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);
    206206  ALLOCATE (mlist, off_t *, Nmosaic);
    207207
     
    209209    Nlist[i] = 0;
    210210    NLIST[i] = 100;
    211     ALLOCATE (clist[i], off_t, NLIST[i]);
     211    ALLOCATE (clist[i], int,  NLIST[i]);
    212212    ALLOCATE (mlist[i], off_t, NLIST[i]);
    213213  }
     
    239239int findMosaics (Catalog *catalog, int Ncatalog) {
    240240 
     241  int i, ecode;
    241242  off_t j;
    242   int i, ecode;
    243243
    244244  if (!MOSAIC_ZEROPT) return (FALSE);
     
    260260void matchMosaics (Catalog *catalog, off_t meas, int cat) {
    261261
    262   int off_t;
     262  int i;
    263263
    264264  for (i = 0; i < Nmosaic; i++) {
     
    286286    if (Nlist[i] == NLIST[i]) {
    287287      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]);
    290290    }   
    291291    return;
     
    295295}
    296296
    297 float getMmos (off_t meas, off_t cat) {
     297float getMmos (off_t meas, int cat) {
    298298
    299299  off_t i;
     
    392392      mark = (N < IMAGE_TOOFEW) || (N < IMAGE_GOOD_FRACTION*Nlist[i]);
    393393      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]);
    395395        mosaic[i].flags |= ID_IMAGE_FEW;
    396396        Nfew ++;
     
    400400    }
    401401    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);
    403403    mosaic[i].Mcal  = stats.mean;
    404404    mosaic[i].dMcal = stats.sigma;
     
    511511    n++;
    512512  }
    513   fprintf (stderr, "Nmosaic: %d, n: %d\n", Nmosaic, n);
     513  fprintf (stderr, "Nmosaic: %lld, n: %lld\n", (long long) Nmosaic, (long long) n);
    514514
    515515  liststats (list, dlist, n, &stats);
     
    591591  }
    592592
    593   fprintf (stderr, "%d mosaics marked poor\n", Nmark);
     593  fprintf (stderr, "%lld mosaics marked poor\n", (long long) Nmark);
    594594  initstats (STATMODE);
    595595  free (mlist);
     
    635635    }
    636636 
    637     sprintf (string, "Mosaic %d", i);
     637    sprintf (string, "Mosaic %lld", (long long) i);
    638638    plot_defaults (&graphdata);
    639639    plot_list (&graphdata, xlist, ylist, N, string, NULL);
Note: See TracChangeset for help on using the changeset viewer.