IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37459


Ignore:
Timestamp:
Oct 3, 2014, 10:18:27 AM (12 years ago)
Author:
eugene
Message:

bump up MAXSIZE so we do not clobber things...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20130712/extsrc/gpcsw/gpcsrc/fits/burntool/persistio.c

    r34220 r37459  
    115115#define DIFFERENT_STREAK 20     /* Proximity for union versus intersection */
    116116
     117# define myMAXSIZE 20000
     118
     119
    117120/****************************************************************/
    118121/* persist_merge(): Disentangle overlapping persistence streaks */
     
    123126   int lapmax;
    124127   OBJBOX *box;
    125    int xusage[MAXSIZE], yctr[MAXSIZE], boxid[MAXSIZE];
     128   int xusage[myMAXSIZE], yctr[myMAXSIZE], boxid[myMAXSIZE];
    126129   double zk, zj;
    127130
     
    131134
    132135/* Assess the clustering of all the streaks */
    133    for(i=0; i<MAXSIZE; i++) xusage[i] = 0;
    134    for(i=0; i<MAXSIZE; i++) boxid[i] = -1;
     136   for(i=0; i<myMAXSIZE; i++) xusage[i] = 0;
     137   for(i=0; i<myMAXSIZE; i++) boxid[i] = -1;
    135138   for(k=0; k<nbox; k++) {
    136       if(box[k].exfit >= MAXSIZE-1) continue;
     139      if(box[k].exfit >= myMAXSIZE-1) continue;
    137140      for(i=box[k].sxfit; i<=box[k].exfit; i++) xusage[i] += 1;
    138141   }
    139142
    140143/* Identify clusters */
    141    for(xs=0; xs<MAXSIZE-1; xs++) {
     144   for(xs=0; xs<myMAXSIZE-1; xs++) {
    142145      if(xusage[xs] == 0) continue;
    143       for(xe=xs, lapmax=0; xe<MAXSIZE-1; xe++) {
     146      for(xe=xs, lapmax=0; xe<myMAXSIZE-1; xe++) {
    144147         if(xusage[xe+1] == 0) break;
    145148         lapmax = MAX(lapmax, xusage[xe]);
Note: See TracChangeset for help on using the changeset viewer.