Changeset 15198 for trunk/psastro/src/psastroConvert.c
- Timestamp:
- Oct 3, 2007, 4:31:27 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroConvert.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroConvert.c
r15117 r15198 48 48 49 49 // we are going to select the brighter Nmax subset for astrometry 50 int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.N STAR");51 if (!status || (nMax < 10)) nMax = 300; // 10 is really somewhat absurd as a lower limit50 int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NRAW"); 51 if (!status || !nMax) nMax = inStars->n; // 10 is really somewhat absurd as a lower limit 52 52 53 53 // choose the first nMax sources 54 int j = 0; 54 55 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++) { 56 57 int n = index->data.S32[i]; 57 58 pmSource *source = sources->data[n]; … … 60 61 j++; 61 62 } 63 rawStars->n = j; 62 64 63 65 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.RAWSTARS", PS_DATA_ARRAY, "astrometry objects", rawStars);
Note:
See TracChangeset
for help on using the changeset viewer.
