Changeset 16068
- Timestamp:
- Jan 14, 2008, 4:48:58 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/astrom/pmAstrometryWCS.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryWCS.c
r15939 r16068 7 7 * @author EAM, IfA 8 8 * 9 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $10 * @date $Date: 200 7-12-28 04:37:34$9 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2008-01-15 02:48:58 $ 11 11 * 12 12 * Copyright 2006 Institute for Astronomy, University of Hawaii … … 182 182 psProject (FP, sky, wcs->toSky); // find the RA,DEC coord of the focal-plane coordinate 183 183 184 // Ineed the inverse of wcs->transform at this point184 // XXX I actually need the inverse of wcs->transform at this point 185 185 psPlaneTransformApply (Chip, wcs->trans, FP); 186 186 … … 427 427 double rY = toSky->Ys / fpa->toSky->Ys; 428 428 429 for (int i = 0; i <= fpa->toTPA->x->nX; i++) {430 for (int j = 0; j <= fpa->toTPA->x->nY; j++) {429 for (int i = 0; i <= toFPA->x->nX; i++) { 430 for (int j = 0; j <= toFPA->x->nY; j++) { 431 431 toFPA->x->coeff[i][j] *= rX; 432 432 toFPA->y->coeff[i][j] *= rY; 433 433 } 434 434 } 435 436 // apply the exiting fromTPA transformation to make the new toFPA consistent with the toTPA layter 437 // XXX this only works if toTPA is at most a linear transformation 438 psPlaneTransform *toFPAnew = psPlaneTransformAlloc(toFPA->x->nX, toFPA->x->nY); 439 for (int i = 0; i <= toFPA->x->nX; i++) { 440 for (int j = 0; j <= toFPA->x->nY; j++) { 441 double f1 = toFPA->x->coeffMask[i][j] ? 0.0 : fpa->fromTPA->x->coeff[1][0]*toFPA->x->coeff[i][j]; 442 double f2 = toFPA->y->coeffMask[i][j] ? 0.0 : fpa->fromTPA->x->coeff[0][1]*toFPA->y->coeff[i][j]; 443 toFPAnew->x->coeff[i][j] = f1 + f2; 444 445 double g1 = toFPA->x->coeffMask[i][j] ? 0.0 : fpa->fromTPA->y->coeff[1][0]*toFPA->x->coeff[i][j]; 446 double g2 = toFPA->y->coeffMask[i][j] ? 0.0 : fpa->fromTPA->y->coeff[0][1]*toFPA->y->coeff[i][j]; 447 toFPAnew->y->coeff[i][j] = g1 + g2; 448 } 449 } 450 toFPAnew->x->coeff[0][0] += fpa->fromTPA->x->coeff[0][0]; 451 toFPAnew->y->coeff[0][0] += fpa->fromTPA->y->coeff[0][0]; 452 453 psFree (toFPA); 454 toFPA = toFPAnew; 435 455 436 456 // adjust reference pixel for new toSky reference coordinate
Note:
See TracChangeset
for help on using the changeset viewer.
