IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 16, 2007, 2:37:55 PM (18 years ago)
Author:
eugene
Message:

allow limits to inst mag range

File:
1 edited

Legend:

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

    r15365 r15636  
    4949    // we are going to select the brighter Nmax subset for astrometry
    5050    int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NRAW");
    51     if (!status || !nMax) nMax = inStars->n; // 10 is really somewhat absurd as a lower limit
     51    if (!status || !nMax) nMax = inStars->n;
     52
     53    // we are going to select the brighter Nmax subset for astrometry
     54    float iMagMax = psMetadataLookupF32 (&status, recipe, "PSASTRO.MAX.INST.MAG.RAW");
     55    float iMagMin = psMetadataLookupF32 (&status, recipe, "PSASTRO.MIN.INST.MAG.RAW");
    5256
    5357    // choose the first nMax sources
     
    5862        pmSource *source = sources->data[n];
    5963        if (source->mode & PM_SOURCE_MODE_SATSTAR) continue;
     64        if ((iMagMax != 0.0) && (source->psfMag > iMagMax)) continue;
     65        if ((iMagMin != 0.0) && (source->psfMag < iMagMin)) continue;
    6066        rawStars->data[j] = psMemIncrRefCounter (inStars->data[n]);
    6167        j++;
Note: See TracChangeset for help on using the changeset viewer.