IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2007, 5:20:02 PM (19 years ago)
Author:
eugene
Message:

adding source plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotChoosePSF.c

    r11702 r12665  
    7474
    7575    // select the candidate PSF stars (pointers to original sources)
    76     for (int i = 0; (i < sources->n) && (stars->n < NSTARS); i++) {
     76    for (int i = 0; i < sources->n; i++) {
    7777        pmSource *source = sources->data[i];
    78         if (source->mode & PM_SOURCE_MODE_PSFSTAR) psArrayAdd (stars, 200, source);
     78        if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
     79            // keep NSTARS PSF stars, unmark the rest
     80            if (stars->n < NSTARS) {
     81                psArrayAdd (stars, 200, source);
     82            } else {
     83                source->mode &= ~PM_SOURCE_MODE_PSFSTAR;
     84            }
     85        }
    7986    }
    8087    psLogMsg ("psphot.pspsf", PS_LOG_DETAIL, "selected candidate %ld PSF objects\n", stars->n);
Note: See TracChangeset for help on using the changeset viewer.