Changeset 15197
- Timestamp:
- Oct 3, 2007, 4:31:08 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroChooseRefstars.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroChooseRefstars.c
r13164 r15197 29 29 pmFPAview *view = pmFPAviewAlloc (0); 30 30 pmFPA *fpa = input->fpa; 31 32 // sort by mag 33 psVector *index = psArraySortIndex (NULL, refs, psastroSortByMag); 34 35 int nMax = psMetadataLookupS32 (&status, recipe, "PSASTRO.MAX.NREF"); 31 36 32 37 // this loop selects the matched stars for all chips … … 61 66 // project the reference objects to this chip 62 67 for (int i = 0; i < refs->n; i++) { 63 pmAstromObj *ref = pmAstromObjCopy(refs->data[i ]);68 pmAstromObj *ref = pmAstromObjCopy(refs->data[index->data.S32[i]]); 64 69 65 70 psProject (ref->TP, ref->sky, fpa->toSky); … … 76 81 skip: 77 82 psFree (ref); 83 84 if (nMax && (refstars->n >= nMax)) break; 78 85 } 79 86 psTrace ("psastro", 4, "Added %ld refstars\n", refstars->n); … … 93 100 } 94 101 102 psFree (index); 95 103 psFree (view); 96 104 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
