Changeset 10880 for trunk/psastro/src/psastroMosaicGradients.c
- Timestamp:
- Jan 2, 2007, 3:26:52 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicGradients.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicGradients.c
r10830 r10880 1 1 # include "psastro.h" 2 2 3 psArray *psastroMosaicGradients (pmFPA *fpa, psMetadata *recipe) {3 bool psastroMosaicGradients (pmFPA *fpa, psMetadata *recipe) { 4 4 5 bool status; 5 6 pmChip *chip = NULL; 6 7 pmCell *cell = NULL; … … 36 37 37 38 // measure the local gradients for this set of stars 38 // XXX update the function prototype to accept an incoming gradient structure to which the new elements are added39 39 gradients = pmAstromMeasureGradients (gradients, rawstars, refstars, match, recipe); 40 40 } 41 41 } 42 42 } 43 return (gradients); 43 44 // allocate mosaic-level polynomial transformation and set masks needed by DVO 45 int order = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.ORDER"); 46 if (!status) { 47 psError(PSASTRO_ERR_UNKNOWN, false, "failed to find single-chip fit order\n"); 48 return false; 49 } 50 psFree (fpa->toTPA); 51 fpa->toTPA = psPlaneTransformAlloc (order, order); 52 for (int i = 0; i <= fpa->toTPA->x->nX; i++) { 53 for (int j = 0; j <= fpa->toTPA->x->nY; j++) { 54 if (i + j > order) { 55 fpa->toTPA->x->mask[i][j] = 1; 56 fpa->toTPA->y->mask[i][j] = 1; 57 } 58 } 59 } 60 61 // fit the measured gradients with the telescope distortion model (polynomial order based on toTPA) 62 pmAstromFitDistortion (fpa, gradients, recipe); 63 psastroMosaicSetAstrom (fpa); 64 65 psFree (gradients); 66 psFree (view); 67 return true; 44 68 }
Note:
See TracChangeset
for help on using the changeset viewer.
