IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28965


Ignore:
Timestamp:
Aug 19, 2010, 3:04:00 PM (16 years ago)
Author:
rhenders
Message:

Changed FilterStars function to also filter detections based on DETECTIONFILTER mask supplied in ptolemyrc

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

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r27435 r28965  
    209209Stars     *ReadStarsSDSS          PROTO((FILE *f, char *name, Header *header, Header *in_theader, Image *images, off_t *nimages, unsigned int *nstars));
    210210int        ReadImageHeader        PROTO((Header *header, Image *image, int photcode));
    211 Stars     *FilterStars            PROTO((Stars *instars, Image *image, unsigned int imageID));
     211Stars     *FilterStars            PROTO((Stars *instars, Image *image, unsigned int imageID, const AddstarClientOptions *options));
    212212Stars     *MergeStars             PROTO((Stars *stars, unsigned int *Nstars, Stars *instars, unsigned int Ninstars));
    213213double     scat_subpix            PROTO((double x, double y));
  • trunk/Ohana/src/addstar/src/FilterStars.c

    r28214 r28965  
    11# include "addstar.h"
     2#include "pslib/psMetadata.h"
     3#include "psmodules/pmSourceMasks.h"
    24# define EXTERNAL_ID TRUE
    35
     
    1012// the imageID supplied here is the sequence **within this set**
    1113// this value is updated based on the image table later
    12 Stars *FilterStars (Stars *instars, Image *image, unsigned int imageID) {
     14Stars *FilterStars (Stars *instars, Image *image, unsigned int imageID, const AddstarClientOptions *options) {
    1315
    1416  int j, N;
     
    2830  ALLOCATE (stars, Stars, image[0].nstar);
    2931  for (N = j = 0; j < image[0].nstar; j++) {
     32
     33    if (instars[j].measure.photFlags & options->detectionFilter) continue;
    3034
    3135    /* allow for some dynamic filtering of star list */
     
    100104    N ++;
    101105  }
     106
     107  // DEBUG printf("N stars orig = %d after filter = %d\n", image[0].nstar, N);
     108 
    102109  image[0].nstar = N;
    103110  REALLOCATE (stars, Stars, image[0].nstar);
Note: See TracChangeset for help on using the changeset viewer.