Changeset 41892 for trunk/psModules/src/astrom/pmAstrometryUtils.c
- Timestamp:
- Nov 4, 2021, 6:05:18 PM (5 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/astrom/pmAstrometryUtils.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
-
trunk/psModules/src/astrom/pmAstrometryUtils.c
r35768 r41892 23 23 #include "pmAstrometryUtils.h" 24 24 25 static int transform_extra_orders = 3; 26 27 int pmAstrometryGetExtraOrders (void) { 28 return transform_extra_orders; 29 } 30 31 int pmAstrometrySetExtraOrders (int orders) { 32 transform_extra_orders = orders; 33 return transform_extra_orders; 34 } 35 25 36 // this is used by the test output block 26 37 static int Nout = 0; … … 120 131 121 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? 122 134 psPlaneTransform *psPlaneTransformSetCenter (psPlaneTransform *output, psPlaneTransform *input, double Xo, double Yo) 123 135 { 124 136 125 // 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"); 126 141 127 142 if (output == NULL) { 128 output = psPlaneTransformAlloc(input->x->nX, input->x->nY );143 output = psPlaneTransformAlloc(input->x->nX, input->x->nY, PS_POLYNOMIAL_ORD); 129 144 } 130 145 … … 169 184 170 185 // rotate a transformation L(x,y) by theta 171 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta)186 psPlaneTransform *psPlaneTransformRotate (psPlaneTransform *output, psPlaneTransform *input, double theta) 172 187 { 173 188 /* given the polynomial transformations: … … 181 196 182 197 if (output == NULL) { 183 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); 184 200 } 185 201 … … 216 232 217 233 // all coeffs and masks initially set to 0 218 transform = psPlaneTransformAlloc (order, order );234 transform = psPlaneTransformAlloc (order, order, PS_POLYNOMIAL_ORD); 219 235 220 236 for (int i = 0; i <= order; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
