IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2007, 4:31:27 PM (19 years ago)
Author:
eugene
Message:

added PSASTRO.MAX.NRAW, fix usage

File:
1 edited

Legend:

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

    r15117 r15198  
    4848
    4949    // we are going to select the brighter Nmax subset for astrometry
    50     int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NSTAR");
    51     if (!status || (nMax < 10)) nMax = 300; // 10 is really somewhat absurd as a lower limit
     50    int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NRAW");
     51    if (!status || !nMax) nMax = inStars->n; // 10 is really somewhat absurd as a lower limit
    5252
    5353    // choose the first nMax sources
     54    int j = 0;
    5455    psArray *rawStars = psArrayAlloc (PS_MIN (nMax, inStars->n));
    55     for (int i = 0, j = 0; (i < inStars->n) && (j < rawStars->n); i++) {
     56    for (int i = 0; (i < inStars->n) && (j < rawStars->n); i++) {
    5657        int n = index->data.S32[i];
    5758        pmSource *source = sources->data[n];
     
    6061        j++;
    6162    }
     63    rawStars->n = j;
    6264
    6365    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.RAWSTARS", PS_DATA_ARRAY, "astrometry objects", rawStars);
Note: See TracChangeset for help on using the changeset viewer.