Changeset 15254 for trunk/psModules/src/astrom/pmAstrometryUtils.c
- Timestamp:
- Oct 9, 2007, 9:27:04 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/astrom/pmAstrometryUtils.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/astrom/pmAstrometryUtils.c
r12696 r15254 7 7 * @author EAM, IfA 8 8 * 9 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2007- 03-30 21:12:56$9 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-10-09 19:27:04 $ 11 11 * 12 12 * Copyright 2006 Institute for Astronomy, University of Hawaii … … 105 105 psPolynomial2D *yPy = psPolynomial2DCopy (NULL, yPx); 106 106 for (int j = 0; j <= input->x->nY; j++) { 107 output->x-> mask[i][j] = input->x->mask[i][j];108 output->y-> mask[i][j] = input->y->mask[i][j];109 output->x->coeff[i][j] = (output->x-> mask[i][j]) ? 0 : psPolynomial2DEval (xPy, Xo, Yo) / tgamma(i+1) / tgamma(j+1);110 output->y->coeff[i][j] = (output->y-> mask[i][j]) ? 0 : psPolynomial2DEval (yPy, Xo, Yo) / tgamma(i+1) / tgamma(j+1);107 output->x->coeffMask[i][j] = input->x->coeffMask[i][j]; 108 output->y->coeffMask[i][j] = input->y->coeffMask[i][j]; 109 output->x->coeff[i][j] = (output->x->coeffMask[i][j] & PS_POLY_MASK_SET) ? 0 : psPolynomial2DEval (xPy, Xo, Yo) / tgamma(i+1) / tgamma(j+1); 110 output->y->coeff[i][j] = (output->y->coeffMask[i][j] & PS_POLY_MASK_SET) ? 0 : psPolynomial2DEval (yPy, Xo, Yo) / tgamma(i+1) / tgamma(j+1); 111 111 112 112 // take the next derivative wrt y, catch output (is NULL on last pass) … … 146 146 for (int j = 0; j <= order; j++) { 147 147 if (i + j > order) { 148 transform->x-> mask [i][j] = 1;149 transform->y-> mask [i][j] = 1;148 transform->x->coeffMask [i][j] = PS_POLY_MASK_SET; 149 transform->y->coeffMask [i][j] = PS_POLY_MASK_SET; 150 150 } 151 151 } … … 153 153 transform->x->coeff[1][0] = 1; 154 154 transform->y->coeff[0][1] = 1; 155 transform->x-> mask[1][0] = 0;156 transform->y-> mask[0][1] = 0;155 transform->x->coeffMask[1][0] = PS_POLY_MASK_NONE; 156 transform->y->coeffMask[0][1] = PS_POLY_MASK_NONE; 157 157 158 158 return transform; … … 197 197 if (i + j > order) { 198 198 // high-order cross terms must be masked (eg, x^3 y^2) 199 status &= transform->x->mask[i][j];199 status &= (transform->x->coeffMask[i][j] & PS_POLY_MASK_SET); 200 200 } else { 201 status &= ! transform->x->mask[i][j];201 status &= !(transform->x->coeffMask[i][j] & PS_POLY_MASK_SET); 202 202 if ((i == 1) && (i + j == 1)) { 203 203 // linear, diagonal terms must be non-zero … … 216 216 if (i + j > order) { 217 217 // high-order cross terms must be masked (eg, x^3 y^2) 218 status &= transform->y->mask[i][j];218 status &= (transform->y->coeffMask[i][j] & PS_POLY_MASK_SET); 219 219 } else { 220 status &= ! transform->y->mask[i][j];220 status &= !(transform->y->coeffMask[i][j] & PS_POLY_MASK_SET); 221 221 if ((j == 1) && (i + j == 1)) { 222 222 // linear, diagonal terms must be 1.0 … … 249 249 for (int j = 0; j <= order; j++) { 250 250 if (i + j > order) { 251 distort->x-> mask [i][j][0][0] = 1;252 distort->y-> mask [i][j][0][0] = 1;251 distort->x->coeffMask [i][j][0][0] = PS_POLY_MASK_SET; 252 distort->y->coeffMask [i][j][0][0] = PS_POLY_MASK_SET; 253 253 } 254 254 } … … 306 306 if (i + j > order) { 307 307 // high-order cross terms must be masked (eg, x^3 y^2) 308 status &= distort->x->mask[i][j][0][0];308 status &= (distort->x->coeffMask[i][j][0][0] & PS_POLY_MASK_SET); 309 309 } else { 310 status &= ! distort->x->mask[i][j][0][0];310 status &= !(distort->x->coeffMask[i][j][0][0] & PS_POLY_MASK_SET); 311 311 if ((i == 1) && (i + j == 1)) { 312 312 // linear, diagonal terms must be 1.0 … … 325 325 if (i + j > order) { 326 326 // high-order cross terms must be masked (eg, x^3 y^2) 327 status &= distort->y->mask[i][j][0][0];327 status &= (distort->y->coeffMask[i][j][0][0] & PS_POLY_MASK_SET); 328 328 } else { 329 status &= ! distort->y->mask[i][j][0][0];329 status &= !(distort->y->coeffMask[i][j][0][0] & PS_POLY_MASK_SET); 330 330 if ((j == 1) && (i + j == 1)) { 331 331 // linear, diagonal terms must be 1.0
Note:
See TracChangeset
for help on using the changeset viewer.
