IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39995


Ignore:
Timestamp:
Mar 5, 2017, 11:22:44 AM (9 years ago)
Author:
eugene
Message:

fix the grid range trunction

Location:
trunk/Ohana/src/relastro/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/BrightCatalog.c

    r39926 r39995  
    294294      secfilt[i].Mmax   = Mmax[i];
    295295    }
    296     fprintf (stderr, "loaded data for %lld averages\n", (long long) Nrow);
     296    // fprintf (stderr, "loaded data for %lld secfilt\n", (long long) Nrow);
    297297
    298298    free (M    );
  • trunk/Ohana/src/relastro/src/bcatalog.c

    r39994 r39995  
    365365  gfits_scan (&oldcatalog[0].header, "DEC1", "%lf", 1, &Dmax);
    366366
    367   if (VERBOSE2) fprintf (stderr, "extracting from catalog covering region %f,%f to %f,%f\n", Rmin, Dmin, Rmax, Dmax);
     367  if (VERBOSE) fprintf (stderr, "extracting from catalog covering region %f,%f to %f,%f (%d average)\n", Rmin, Dmin, Rmax, Dmax, (int) subcatalog[0].Naverage);
    368368
    369369  float AREA = fabs(Dmax - Dmin) * fabs(Rmax - Rmin) * cos (0.5*RAD_DEG*(Dmax + Dmin));
     
    459459    if (isnan(X[i])) continue;
    460460    if (isnan(Y[i])) continue;
    461     ix = MIN(0, MAX(NX - 1, (X[i] - Xmin) / 200.0));
    462     iy = MIN(0, MAX(NY - 1, (Y[i] - Ymin) / 200.0));
     461    ix = MAX(0, MIN(NX - 1, (X[i] - Xmin) / 200.0));
     462    iy = MAX(0, MIN(NY - 1, (Y[i] - Ymin) / 200.0));
    463463    int Nn = Nn_grid[ix][iy];
    464464    Nm_grid[ix][iy][Nn] = subcatalog[0].average[i].Nmeasure;
Note: See TracChangeset for help on using the changeset viewer.