Changeset 12492 for trunk/psastro/src/psastroMosaicGradients.c
- Timestamp:
- Mar 18, 2007, 12:28:16 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicGradients.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicGradients.c
r10880 r12492 16 16 if (!chip->process || !chip->file_exists) { continue; } 17 17 18 psRegion *region = pmChipExtent (chip); 19 18 20 while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) { 19 21 psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process); … … 37 39 38 40 // measure the local gradients for this set of stars 39 gradients = pmAstromMeasureGradients (gradients, rawstars, refstars, match, recipe); 41 // XXX 2,2 are the number of test boxes on the chip. put this in the recipe 42 gradients = pmAstromMeasureGradients (gradients, rawstars, refstars, match, region, 2, 2); 40 43 } 41 44 } 45 psFree (region); 42 46 } 43 47 … … 59 63 } 60 64 65 // physical pixel scale in microns per pixel (FP is in physical units, chip is in pixels) 66 double pixelScale = psMetadataLookupF32 (&status, recipe, "PSASTRO.PIXEL.SCALE"); 67 if (!status) { 68 psError(PS_ERR_IO, false, "Failed to lookup pixel scale"); 69 return false; 70 } 71 61 72 // fit the measured gradients with the telescope distortion model (polynomial order based on toTPA) 62 pmAstromFitDistortion (fpa, gradients, recipe); 63 psastroMosaicSetAstrom (fpa); 73 if (!pmAstromFitDistortion (fpa, gradients, pixelScale)) { 74 psError(PSASTRO_ERR_UNKNOWN, false, "failed to fit the distortion terms\n"); 75 psFree (gradients); 76 psFree (view); 77 return false; 78 } 79 80 if (!psastroMosaicSetAstrom (fpa)) { 81 psError(PSASTRO_ERR_UNKNOWN, false, "failed to apply mosaic distortion terms\n"); 82 psFree (gradients); 83 psFree (view); 84 return false; 85 } 64 86 65 87 psFree (gradients);
Note:
See TracChangeset
for help on using the changeset viewer.
