- Timestamp:
- Oct 11, 2021, 11:35:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/psModules/src/astrom/pmAstrometryUtils.c
r41826 r41832 131 131 132 132 // convert a transformation L(x,y) to L'(x-xo,y-yo) 133 // is this used for an upward (e.g., chip->fpa) or a downward (fpa->chip) transform? 133 134 psPlaneTransform *psPlaneTransformSetCenter (psPlaneTransform *output, psPlaneTransform *input, double Xo, double Yo) 134 135 { 135 136 136 // validate fit order 137 // validate fit type: 138 // polynomial in input transforms must match type -- and for now be ORD 139 psAssert (input->x->type == PS_POLYNOMIAL_ORD, "fix for CHEB"); 140 psAssert (input->y->type == PS_POLYNOMIAL_ORD, "fix for CHEB"); 137 141 138 142 if (output == NULL) { 139 output = psPlaneTransformAlloc(input->x->nX, input->x->nY );143 output = psPlaneTransformAlloc(input->x->nX, input->x->nY, PS_POLYNOMIAL_ORD); 140 144 } 141 145 … … 180 184 181 185 // rotate a transformation L(x,y) by theta 182 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta)186 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta) 183 187 { 184 188 /* given the polynomial transformations: … … 192 196 193 197 if (output == NULL) { 194 output = psPlaneTransformAlloc(input->x->nX, input->x->nY); 198 // generate a new transform using the same order and type as the input 199 output = psPlaneTransformAlloc(input->x->nX, input->x->nY, input->x->type); 195 200 } 196 201 … … 227 232 228 233 // all coeffs and masks initially set to 0 229 transform = psPlaneTransformAlloc (order, order );234 transform = psPlaneTransformAlloc (order, order, PS_POLYNOMIAL_ORD); 230 235 231 236 for (int i = 0; i <= order; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
