Changeset 15667
- Timestamp:
- Nov 20, 2007, 9:12:05 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroConvert.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroConvert.c
r15636 r15667 55 55 float iMagMin = psMetadataLookupF32 (&status, recipe, "PSASTRO.MIN.INST.MAG.RAW"); 56 56 57 57 58 // choose the first nMax sources 58 59 int j = 0; 59 60 psArray *rawStars = psArrayAlloc (PS_MIN (nMax, inStars->n)); 61 62 float mMin = +100.0; 63 float mMax = -100.0; 64 60 65 for (int i = 0; (i < inStars->n) && (j < rawStars->n); i++) { 61 66 int n = index->data.S32[i]; … … 64 69 if ((iMagMax != 0.0) && (source->psfMag > iMagMax)) continue; 65 70 if ((iMagMin != 0.0) && (source->psfMag < iMagMin)) continue; 71 if (!isfinite(source->psfMag)) continue; 72 mMin = PS_MIN (mMin, source->psfMag); 73 mMax = PS_MAX (mMax, source->psfMag); 66 74 rawStars->data[j] = psMemIncrRefCounter (inStars->data[n]); 67 75 j++; … … 70 78 71 79 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.RAWSTARS", PS_DATA_ARRAY, "astrometry objects", rawStars); 72 psLogMsg ("psastro", 4, "loaded %ld sources, using %ld of %ld good sources \n", sources->n, rawStars->n, inStars->n);80 psLogMsg ("psastro", 4, "loaded %ld sources, using %ld of %ld good sources (inst mag: %f to %f)\n", sources->n, rawStars->n, inStars->n, mMin, mMax); 73 81 74 82 psFree (index);
Note:
See TracChangeset
for help on using the changeset viewer.
