IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16072


Ignore:
Timestamp:
Jan 14, 2008, 4:53:20 PM (18 years ago)
Author:
eugene
Message:

add options to skip objects based on modes listed in the recipe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroConvert.c

    r16014 r16072  
    5757    float iMagMin = psMetadataLookupF32 (&status, recipe, "PSASTRO.MIN.INST.MAG.RAW");
    5858
     59    // we are going to select the brighter Nmax subset for astrometry
     60    pmSourceMode skip = PM_SOURCE_MODE_DEFAULT;
     61    char *ignoreList = psMetadataLookupStr (&status, recipe, "PSASTRO.IGNORE");
     62    if (ignoreList != NULL) {
     63      psArray *list = psStringSplitArray (ignoreList, ",", false);
     64      for (int i = 0; i < list->n; i++) {
     65        pmSourceMode mode = pmSourceModeFromString (list->data[i]);
     66        if (mode == PM_SOURCE_MODE_DEFAULT) {
     67          psWarning ("unknown source mode in PSASTRO.IGNORE, skipping");
     68          continue;
     69        }
     70        skip |= mode;
     71      }
     72      psFree (list);
     73    }
    5974
    6075    // choose the first nMax sources
     
    6984        pmSource *source = sources->data[n];
    7085        // XXX this needs to be flexible
    71         if (source->mode & PM_SOURCE_MODE_SATSTAR) continue;
    72         if (source->mode & PM_SOURCE_MODE_BLEND) continue;
     86        if (source->mode & skip) continue;
    7387        if ((iMagMax != 0.0) && (source->psfMag > iMagMax)) continue;
    7488        if ((iMagMin != 0.0) && (source->psfMag < iMagMin)) continue;
Note: See TracChangeset for help on using the changeset viewer.