Changeset 7014 for trunk/psastro/src/psastroConvert.c
- Timestamp:
- Apr 30, 2006, 12:15:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroConvert.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroConvert.c
r6958 r7014 1 1 # include "psastro.h" 2 // XXX leak free 2006.04.27 2 3 4 // XXX pass/apply the WCS information? 5 bool psastroConvert (pmReadout *readout, psMetadata *recipe) { 6 7 psArray *sources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES"); 8 if (sources == NULL) 9 return false; 10 11 psArray *objects = pmSourceToAstromObj (sources); 12 13 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSASTRO.OBJECTS", PS_DATA_ARRAY, "astrometry objects", objects); 14 psFree (objects); 15 16 return true; 17 } 18 19 // XXX select a magnitude range? 3 20 psArray *pmSourceToAstromObj (psArray *sources) { 4 21 … … 6 23 7 24 for (int i = 0; i < sources->n; i++) { 8 p sSource *source = sources->data[i];25 pmSource *source = sources->data[i]; 9 26 10 27 // only accept the PSF sources? 11 if (source->type != PM_SOURCE_ STAR) continue;28 if (source->type != PM_SOURCE_TYPE_STAR) continue; 12 29 13 30 pmModel *model = source->modelPSF; … … 25 42 // XXX do we have the information giving the readout and cell offset? 26 43 // for the moment, assume chip == cell == readout 27 obj->cell = obj->pix; 28 obj->chip = obj->cell; 29 30 // can we make an initial guess of the astrometry to set FP, TP, and sky coords? 31 32 44 *obj->cell = *obj->pix; 45 *obj->chip = *obj->cell; 46 47 psArrayAdd (objects, 100, obj); 48 psFree (obj); 49 } 50 return objects; 33 51 }
Note:
See TracChangeset
for help on using the changeset viewer.
