Changeset 9655
- Timestamp:
- Oct 19, 2006, 11:57:02 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroOneChip.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroOneChip.c
r9647 r9655 2 2 3 3 bool psastroOneChip (pmFPA *fpa, pmChip *chip, psArray *refstars, psArray *rawstars, psMetadata *recipe, psMetadata *updates) { 4 5 // bool status;6 psArray *match;7 8 psastroWriteStars ("raw.0.dat", rawstars);9 psastroWriteStars ("ref.0.dat", refstars);10 // psastroWriteTransform (chip->toFPA);11 4 12 5 // find initial offset / rotation … … 18 11 psLogMsg ("psastro", 3, "basic grid search result - offset: %f,%f pixels, rotation: %f deg\n", gridStats->offset.x, gridStats->offset.y, DEG_RAD*gridStats->angle); 19 12 13 // tweak the position by finding peak of matches stars 20 14 pmAstromStats *stats = pmAstromGridTweak (rawstars, refstars, recipe, gridStats); 21 15 if (stats == NULL) { 16 psError(PSASTRO_ERR_DATA, false, "failed to measure tweaked grid solution\n"); 17 return false; 18 } 22 19 psLogMsg ("psastro", 3, "tweak grid search result - offset: %f,%f pixels, rotation: %f deg\n", stats->offset.x, stats->offset.y, DEG_RAD*stats->angle); 23 20 … … 26 23 psastroUpdateChipToFPA (fpa, chip, rawstars, refstars); 27 24 28 psastroWriteStars ("raw.1.dat", rawstars);29 psastroWriteStars ("ref.1.dat", refstars);30 // psastroWriteTransform (chip->toFPA);31 32 25 // use small radius to match stars 33 match = pmAstromRadiusMatch (rawstars, refstars, recipe); 26 psArray *match = pmAstromRadiusMatch (rawstars, refstars, recipe); 27 if (stats == NULL) { 28 psError(PSASTRO_ERR_UNKNOWN, false, "failed to find radius-matched sources\n"); 29 return false; 30 } 34 31 35 32 // improved fit for astrometric terms … … 42 39 psastroUpdateChipToFPA (fpa, chip, rawstars, refstars); 43 40 44 psastroWriteStars ("raw.2.dat", rawstars);45 psastroWriteStars ("ref.2.dat", refstars);46 psastroWriteTransform (chip->toFPA);47 48 41 psFree (match); 49 42 psFree (stats); … … 52 45 } 53 46 47 // psastroWriteStars ("raw.1.dat", rawstars); 48 // psastroWriteStars ("ref.1.dat", refstars); 49 // psastroWriteTransform (chip->toFPA); 50
Note:
See TracChangeset
for help on using the changeset viewer.
