Changeset 9647
- Timestamp:
- Oct 18, 2006, 5:04:24 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroOneChip.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroOneChip.c
r9574 r9647 8 8 psastroWriteStars ("raw.0.dat", rawstars); 9 9 psastroWriteStars ("ref.0.dat", refstars); 10 psastroWriteTransform (chip->toFPA);10 // psastroWriteTransform (chip->toFPA); 11 11 12 12 // find initial offset / rotation 13 pmAstromStats stats = pmAstromGridMatch (rawstars, refstars, recipe); 14 stats = pmAstromGridTweak (rawstars, refstars, recipe, stats); 15 psLogMsg ("psastro", 3, "grid search result: %f,%f @ %f deg\n", stats.offset.x, stats.offset.y, DEG_RAD*stats.angle); 13 pmAstromStats *gridStats = pmAstromGridMatch (rawstars, refstars, recipe); 14 if (gridStats == NULL) { 15 psError(PSASTRO_ERR_DATA, false, "failed to find a grid match solution\n"); 16 return false; 17 } 18 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 20 pmAstromStats *stats = pmAstromGridTweak (rawstars, refstars, recipe, gridStats); 21 22 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); 16 23 17 24 // adjust the chip.toFPA terms only … … 21 28 psastroWriteStars ("raw.1.dat", rawstars); 22 29 psastroWriteStars ("ref.1.dat", refstars); 23 psastroWriteTransform (chip->toFPA);30 // psastroWriteTransform (chip->toFPA); 24 31 25 32 // use small radius to match stars … … 27 34 28 35 // improved fit for astrometric terms 29 pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, recipe, updates); 36 if (!pmAstromMatchFit (chip->toFPA, rawstars, refstars, match, recipe, updates)) { 37 psError(PSASTRO_ERR_DATA, false, "failed to find a valid fitted match solution\n"); 38 return false; 39 } 40 41 // write results 30 42 psastroUpdateChipToFPA (fpa, chip, rawstars, refstars); 31 43 … … 35 47 36 48 psFree (match); 49 psFree (stats); 50 psFree (gridStats); 37 51 return true; 38 52 }
Note:
See TracChangeset
for help on using the changeset viewer.
