IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20363


Ignore:
Timestamp:
Oct 24, 2008, 2:52:39 PM (18 years ago)
Author:
eugene
Message:

add number of stars per grid cell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/GridOps.c

    r20323 r20363  
    11# include "relphot.h"
    22
    3 typedef enum {
    4   GRID_FITTED,
    5   GRID_FROZEN,
    6   GRID_REFERENCE,
     3enum {
     4    GRID_FITTED,
     5    GRID_FROZEN,
     6    GRID_REFERENCE,
    77};
    88
     
    235235  mlist[i][Nlist[i]] = meas;
    236236
     237  // for the moment, add up the total grid count
     238  gridN[i]++;
     239
    237240  Nlist[i] ++;
    238241  if (Nlist[i] == NLIST[i]) {
     
    247250}
    248251
     252int showGridCount() {
     253
     254    int ix, iy, i;
     255
     256    for (iy = 0; iy < gridY; iy++) {
     257        for (ix = 0; ix < gridX; ix++) {
     258            i = ix + iy*gridX;
     259            fprintf (stderr, "%3d  ", gridN[i]);
     260        }
     261        fprintf (stderr, "\n");
     262    }
     263}
     264
    249265float getMgrid (int meas, int cat) {
    250266
     
    258274  // during the grid annealing process, we skip over grid cells until they have enough
    259275  // valid stars to be fitted
    260   if (gridV[i] == GRID_FROZEN) return (NAN);
     276  if (gridV[i] == GRID_FROZEN) {
     277    return (NAN);
     278  }
    261279
    262280  value = gridM[i];
Note: See TracChangeset for help on using the changeset viewer.