Changeset 4770 for trunk/psModules/test
- Timestamp:
- Aug 15, 2005, 3:10:36 PM (21 years ago)
- Location:
- trunk/psModules/test
- Files:
-
- 16 edited
-
tst_pmFlatField.c (modified) (15 diffs)
-
tst_pmImageCombine.c (modified) (2 diffs)
-
tst_pmMaskBadPixels.c (modified) (13 diffs)
-
tst_pmNonLinear.c (modified) (22 diffs)
-
tst_pmObjects01.c (modified) (57 diffs)
-
tst_pmReadoutCombine.c (modified) (6 diffs)
-
tst_pmSubtractBias.c (modified) (27 diffs)
-
tst_pmSubtractSky.c (modified) (10 diffs)
-
verified/tst_pmImageCombine.stderr (modified) (1 diff)
-
verified/tst_pmImageSubtract.stdout (modified) (3 diffs)
-
verified/tst_pmNonLinear.stderr (modified) (2 diffs)
-
verified/tst_pmNonLinear.stdout (modified) (2 diffs)
-
verified/tst_pmObjects01.stderr (modified) (11 diffs)
-
verified/tst_pmObjects01.stdout (modified) (6 diffs)
-
verified/tst_pmSubtractSky.stderr (modified) (2 diffs)
-
verified/tst_pmSubtractSky.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmFlatField.c
r2950 r4770 16 16 * Test M - Attempt to use non-mask type mask image 17 17 * 18 * XXX: Added a mask argument to pmFlatField(). Must add tests. For now, all 19 * masks are NULL. 20 * 18 21 * @author Ross Harman, MHPCC 19 22 * 20 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-0 1-11 01:17:28$23 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 24 * @date $Date: 2005-08-16 01:10:36 $ 22 25 * 23 26 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 68 71 int main(int argc, char* argv[]) 69 72 { 73 psLogSetFormat("HLNM"); 70 74 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 71 75 } … … 77 81 printPositiveTestHeader(stdout, "pmFlatField", "Test A - Divide input image by flat image"); 78 82 CREATE_AND_SET_IMAGE(inImage,F64,6.0,3,3) 79 p sReadout *inReadout = psReadoutAlloc();83 pmReadout *inReadout = pmReadoutAlloc(NULL); 80 84 inReadout->image = inImage; 81 85 PRINT_MATRIX(inImage,F64,"Input image:"); 82 86 CREATE_AND_SET_IMAGE(flatImage1,F64,2.0,3,3) 83 p sReadout *flatReadout = psReadoutAlloc();87 pmReadout *flatReadout = pmReadoutAlloc(NULL); 84 88 flatReadout->image = flatImage1; 85 89 PRINT_MATRIX(flatImage1,F64,"Flat image:"); 86 if ( !pmFlatField(inReadout, flatReadout) ) {90 if ( !pmFlatField(inReadout, NULL, flatReadout) ) { 87 91 psError(PS_ERR_UNKNOWN,true,"Test A - Returned false should be true"); 88 92 return 1; … … 99 103 PRINT_MATRIX(flatImage2, F64, "Flat image:"); 100 104 flatReadout->image = flatImage2; 101 if ( !pmFlatField(inReadout, flatReadout) ) {105 if ( !pmFlatField(inReadout, NULL, flatReadout) ) { 102 106 psError(PS_ERR_UNKNOWN,true,"Test B - Returned false should be true"); 103 107 return 2; … … 118 122 psFree(inReadout->mask); 119 123 inReadout->mask = mask1; 120 if ( !pmFlatField(inReadout, flatReadout) ) {124 if ( !pmFlatField(inReadout, NULL, flatReadout) ) { 121 125 psError(PS_ERR_UNKNOWN,true,"Test C - Returned false should be true"); 122 126 return 3; … … 132 136 printNegativeTestHeader(stdout,"pmFlatField", "Test D - Attempt to use null flat readout", 133 137 "Null not allowed for flat readout", 0); 134 if( pmFlatField(inReadout, NULL ) ) {138 if( pmFlatField(inReadout, NULL, NULL) ) { 135 139 psError(PS_ERR_UNKNOWN,true,"Test D - Returned true should be false"); 136 140 return 4; … … 145 149 psImage *temp = inReadout->image; 146 150 inReadout->image = NULL; 147 if ( pmFlatField(inReadout, flatReadout) ) {151 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 148 152 psError(PS_ERR_UNKNOWN,true,"Test E - Returned true should be false" ); 149 153 return 5; … … 159 163 temp = flatReadout->image; 160 164 flatReadout->image = NULL; 161 if ( pmFlatField(inReadout, flatReadout) ) {165 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 162 166 psError(PS_ERR_UNKNOWN,true,"Test F - Returned true should be false" ); 163 167 return 6; … … 174 178 temp = flatReadout->image; 175 179 flatReadout->image = smallFlat; 176 if ( pmFlatField(inReadout, flatReadout) ) {180 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 177 181 psError(PS_ERR_UNKNOWN,true,"Test G - Returned true should be false"); 178 182 return 7; … … 189 193 temp = inReadout->mask; 190 194 inReadout->mask = largeMask; 191 if ( pmFlatField(inReadout, flatReadout) ) {195 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 192 196 psError(PS_ERR_UNKNOWN,true,"Test H - Returned true should be false"); 193 197 return 8; … … 203 207 *(int*)&inReadout->col0 = 50; 204 208 *(int*)&inReadout->row0 = 50; 205 if ( pmFlatField(inReadout, flatReadout) ) {209 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 206 210 psError(PS_ERR_UNKNOWN,true,"Test I - Returned true should be false"); 207 211 return 9; … … 217 221 "Complex types not allowed for input image", 0); 218 222 *(psElemType* ) & inReadout->image->type.type = PS_TYPE_C64; 219 if ( pmFlatField(inReadout, flatReadout) ) {223 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 220 224 psError(PS_ERR_UNKNOWN,true,"Test J - Returned true should be false"); 221 225 return 10; … … 230 234 "Complex types not allowed for flat image", 0); 231 235 *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_C64; 232 if ( pmFlatField(inReadout, flatReadout) ) {236 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 233 237 psError(PS_ERR_UNKNOWN,true,"Test K - Returned ture should be false"); 234 238 return 11; … … 243 247 "Input and flat image types differ", 0); 244 248 *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_F32; 245 if ( pmFlatField(inReadout, flatReadout) ) {249 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 246 250 psError(PS_ERR_UNKNOWN,true,"Test L - Returned true should be false"); 247 251 return 12; … … 256 260 "Mask must be PS_TYPE_MASK type", 0); 257 261 *(psElemType* ) & inReadout->mask->type.type = PS_TYPE_F32; 258 if ( pmFlatField(inReadout, flatReadout) ) {262 if ( pmFlatField(inReadout, NULL, flatReadout) ) { 259 263 psError(PS_ERR_UNKNOWN,true,"Test M - Returned true should be false"); 260 264 return 13; -
trunk/psModules/test/tst_pmImageCombine.c
r4579 r4770 9 9 * XXX: Must verify the results internally. Don't use stdout file. 10 10 * 11 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 7-19 01:44:48$11 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-08-16 01:10:36 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 int main(int argc, char* argv[]) 26 26 { 27 psLogSetFormat("HLNM"); 27 28 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 28 29 } -
trunk/psModules/test/tst_pmMaskBadPixels.c
r2951 r4770 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $20 * @date $Date: 2005-0 1-11 01:30:16 $19 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2005-08-16 01:10:36 $ 21 21 * 22 22 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 87 87 int main(int argc, char* argv[]) 88 88 { 89 psLogSetFormat("HLNM"); 89 90 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 90 91 } … … 96 97 CREATE_AND_SET_IMAGE(inImage1,F64,0,50,50); 97 98 CREATE_AND_SET_IMAGE(mask1,U8,0,50,50) 98 // p sReadout *inReadout = psReadoutAlloc(0, 0, inImage1);99 p sReadout *inReadout = psReadoutAlloc();99 // pmReadout *inReadout = pmReadoutAlloc(0, 0, inImage1); 100 pmReadout *inReadout = pmReadoutAlloc(NULL); 100 101 inReadout->image = inImage1; 101 102 mask1->data.PS_TYPE_MASK_DATA[24][24]=1; … … 114 115 CREATE_AND_SET_IMAGE(inImage2,F64,150.0,50,50); 115 116 CREATE_AND_SET_IMAGE(mask2,U8,0,50,50) 116 // p sReadout *inReadout2 = psReadoutAlloc(0, 0, inImage2);117 p sReadout *inReadout2 = psReadoutAlloc();117 // pmReadout *inReadout2 = pmReadoutAlloc(0, 0, inImage2); 118 pmReadout *inReadout2 = pmReadoutAlloc(NULL); 118 119 inReadout2->image = inImage2; 119 120 PRINT_MATRIX(mask2, U8, "Data mask:"); … … 131 132 CREATE_AND_SET_IMAGE(inImage3,F64,50.0,50,50); 132 133 CREATE_AND_SET_IMAGE(mask3,U8,0,50,50) 133 // p sReadout *inReadout3 = psReadoutAlloc(0, 0, inImage3);134 p sReadout *inReadout3 = psReadoutAlloc();134 // pmReadout *inReadout3 = pmReadoutAlloc(0, 0, inImage3); 135 pmReadout *inReadout3 = pmReadoutAlloc(NULL); 135 136 inReadout3->image = inImage3; 136 137 mask3->data.PS_TYPE_MASK_DATA[24][24]=1; … … 152 153 CREATE_AND_SET_IMAGE(mask4,U8,0,50,50) 153 154 CREATE_AND_SET_IMAGE(mask4i,U8,0,50,50) 154 // p sReadout *inReadout4 = psReadoutAlloc(0, 0, inImage4);155 p sReadout *inReadout4 = psReadoutAlloc();155 // pmReadout *inReadout4 = pmReadoutAlloc(0, 0, inImage4); 156 pmReadout *inReadout4 = pmReadoutAlloc(NULL); 156 157 inReadout4->image = inImage4; 157 158 inReadout4->mask = mask4i; … … 170 171 // Test E - Attempt to use null mask 171 172 CREATE_AND_SET_IMAGE(inImage5,F64,50.0,50,50); 172 // p sReadout *inReadout5 = psReadoutAlloc(0, 0, inImage5);173 p sReadout *inReadout5 = psReadoutAlloc();173 // pmReadout *inReadout5 = pmReadoutAlloc(0, 0, inImage5); 174 pmReadout *inReadout5 = pmReadoutAlloc(NULL); 174 175 inReadout5->image = inImage5; 175 176 pmMaskBadPixels(inReadout5, NULL, 0, 100.0, 1, 10); … … 183 184 // Test F - Attempt tp use null input image 184 185 CREATE_AND_SET_IMAGE(mask6,U8,0,50,50) 185 // p sReadout *inReadout6 = psReadoutAlloc(0, 0, NULL);186 p sReadout *inReadout6 = psReadoutAlloc();186 // pmReadout *inReadout6 = pmReadoutAlloc(0, 0, NULL); 187 pmReadout *inReadout6 = pmReadoutAlloc(NULL); 187 188 inReadout6->mask = mask6; 188 189 pmMaskBadPixels(inReadout6, mask6, 0, 100.0, 1, 10); … … 198 199 CREATE_AND_SET_IMAGE(mask7,U8,0,50,50) 199 200 CREATE_AND_SET_IMAGE(mask7i,U8,0,50,50) 200 // p sReadout *inReadout7 = psReadoutAlloc(0, 0, inImage7);201 p sReadout *inReadout7 = psReadoutAlloc();201 // pmReadout *inReadout7 = pmReadoutAlloc(0, 0, inImage7); 202 pmReadout *inReadout7 = pmReadoutAlloc(NULL); 202 203 inReadout7->image = inImage7; 203 204 inReadout7->mask = mask7i; … … 215 216 CREATE_AND_SET_IMAGE(mask8,U8,0,50,50) 216 217 CREATE_AND_SET_IMAGE(mask8i,U8,0,60,60) 217 // p sReadout *inReadout8 = psReadoutAlloc(0, 0, inImage8);218 p sReadout *inReadout8 = psReadoutAlloc();218 // pmReadout *inReadout8 = pmReadoutAlloc(0, 0, inImage8); 219 pmReadout *inReadout8 = pmReadoutAlloc(NULL); 219 220 inReadout8->image = inImage8; 220 221 inReadout8->mask = mask8i; … … 232 233 CREATE_AND_SET_IMAGE(mask9,U8,0,50,50) 233 234 CREATE_AND_SET_IMAGE(mask9i,U8,0,50,50) 234 // p sReadout *inReadout9 = psReadoutAlloc(0, 0, inImage9);235 p sReadout *inReadout9 = psReadoutAlloc();235 // pmReadout *inReadout9 = pmReadoutAlloc(0, 0, inImage9); 236 pmReadout *inReadout9 = pmReadoutAlloc(NULL); 236 237 inReadout9->image = inImage9; 237 238 inReadout9->mask = mask9i; … … 251 252 CREATE_AND_SET_IMAGE(mask10,U8,0,50,50) 252 253 CREATE_AND_SET_IMAGE(mask10i,U8,0,50,50) 253 // p sReadout *inReadout10 = psReadoutAlloc(0, 0, inImage10);254 p sReadout *inReadout10 = psReadoutAlloc();254 // pmReadout *inReadout10 = pmReadoutAlloc(0, 0, inImage10); 255 pmReadout *inReadout10 = pmReadoutAlloc(NULL); 255 256 inReadout10->image = inImage10; 256 257 inReadout10->mask = mask10i; … … 268 269 CREATE_AND_SET_IMAGE(mask11,F64,0,50,50) 269 270 CREATE_AND_SET_IMAGE(mask11i,U8,0,50,50) 270 // p sReadout *inReadout11 = psReadoutAlloc(0, 0, inImage11);271 p sReadout *inReadout11 = psReadoutAlloc();271 // pmReadout *inReadout11 = pmReadoutAlloc(0, 0, inImage11); 272 pmReadout *inReadout11 = pmReadoutAlloc(NULL); 272 273 inReadout11->image = inImage11; 273 274 inReadout11->mask = mask11i; -
trunk/psModules/test/tst_pmNonLinear.c
r2961 r4770 16 16 * @author GLG, MHPCC 17 17 * 18 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $19 * @date $Date: 2005-0 1-11 23:39:41$18 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 19 * @date $Date: 2005-08-16 01:10:36 $ 20 20 * 21 21 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 40 40 int main(int argc, char* argv[]) 41 41 { 42 psLogSetFormat("HLNM"); 42 43 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 43 44 } … … 53 54 int testStatus = true; 54 55 psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 55 p sReadout *myReadout = psReadoutAlloc();56 pmReadout *myReadout = pmReadoutAlloc(NULL); 56 57 myReadout->image = myImage; 57 58 psPolynomial1D *myPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD); … … 106 107 int tableSize = PS_MAX(numCols, numRows)*2; 107 108 psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 108 p sReadout *myReadout = psReadoutAlloc();109 pmReadout *myReadout = pmReadoutAlloc(NULL); 109 110 myReadout->image = myImage; 110 111 psVector *in = psVectorAlloc(tableSize, PS_TYPE_F32); … … 161 162 int testStatus = true; 162 163 psImage *myImage = psImageAlloc(NUM_COLS, NUM_ROWS, PS_TYPE_F32); 163 p sReadout *myReadout = psReadoutAlloc();164 p sReadout *rc = NULL;164 pmReadout *myReadout = pmReadoutAlloc(NULL); 165 pmReadout *rc = NULL; 165 166 myReadout->image = myImage; 166 167 psPolynomial1D *myPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD); … … 178 179 rc = pmNonLinearityPolynomial(NULL, myPoly); 179 180 if (rc != NULL) { 180 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");181 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 181 182 testStatus = false; 182 183 } … … 188 189 rc = pmNonLinearityPolynomial(myReadout, myPoly); 189 190 if (rc != NULL) { 190 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");191 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 191 192 testStatus = false; 192 193 } … … 197 198 rc = pmNonLinearityPolynomial(myReadout, NULL); 198 199 if (rc != NULL) { 199 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");200 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 200 201 testStatus = false; 201 202 } … … 207 208 208 209 209 int test03Init(p sReadout *myReadout)210 int test03Init(pmReadout *myReadout) 210 211 { 211 212 for (psS32 i=0;i<NUM_ROWS;i++) { … … 224 225 int tableSize = PS_MAX(NUM_COLS, NUM_ROWS)*3; 225 226 psImage *myImage = psImageAlloc(NUM_COLS, NUM_ROWS, PS_TYPE_F32); 226 p sReadout *myReadout = psReadoutAlloc();227 p sReadout *rc = NULL;227 pmReadout *myReadout = pmReadoutAlloc(NULL); 228 pmReadout *rc = NULL; 228 229 myReadout->image = myImage; 229 230 psVector *in = psVectorAlloc(tableSize, PS_TYPE_F32); … … 253 254 254 255 printf("------------------------------------------------------------\n"); 255 printf("Calling pmNonLinearityLookup() with NULL input p sReadout. Should generate error, return NULL.\n");256 printf("Calling pmNonLinearityLookup() with NULL input pmReadout. Should generate error, return NULL.\n"); 256 257 rc = pmNonLinearityLookup(NULL, in, out); 257 258 if (rc != NULL) { 258 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");259 testStatus = false; 260 } 261 262 printf("------------------------------------------------------------\n"); 263 printf("Calling pmNonLinearityLookup() with NULL input p sReadout->image. Should generate error, return NULL.\n");259 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 260 testStatus = false; 261 } 262 263 printf("------------------------------------------------------------\n"); 264 printf("Calling pmNonLinearityLookup() with NULL input pmReadout->image. Should generate error, return NULL.\n"); 264 265 psImage *tmpImage = myReadout->image; 265 266 myReadout->image = NULL; 266 267 rc = pmNonLinearityLookup(myReadout, in, out); 267 268 if (rc != NULL) { 268 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");269 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 269 270 testStatus = false; 270 271 } … … 275 276 rc = pmNonLinearityLookup(myReadout, NULL, out); 276 277 if (rc != NULL) { 277 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");278 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 278 279 testStatus = false; 279 280 } … … 283 284 rc = pmNonLinearityLookup(myReadout, in, NULL); 284 285 if (rc != NULL) { 285 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL p sReadout\n");286 printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n"); 286 287 testStatus = false; 287 288 } … … 292 293 rc = pmNonLinearityLookup(myReadout, in, outBig); 293 294 if (rc == NULL) { 294 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");295 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 295 296 testStatus = false; 296 297 } … … 312 313 rc = pmNonLinearityLookup(myReadout, in, outSmall); 313 314 if (rc == NULL) { 314 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");315 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 315 316 testStatus = false; 316 317 } … … 331 332 rc = pmNonLinearityLookup(myReadout, inSmall, out); 332 333 if (rc == NULL) { 333 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");334 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 334 335 testStatus = false; 335 336 } … … 350 351 rc = pmNonLinearityLookup(myReadout, inBig, out); 351 352 if (rc == NULL) { 352 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");353 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 353 354 testStatus = false; 354 355 } … … 369 370 rc = pmNonLinearityLookup(myReadout, inSmall, outBig); 370 371 if (rc == NULL) { 371 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");372 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 372 373 testStatus = false; 373 374 } … … 388 389 rc = pmNonLinearityLookup(myReadout, inBig, outSmall); 389 390 if (rc == NULL) { 390 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");391 testStatus = false; 392 } 393 for (i=0;i<NUM_ROWS;i++) { 394 for (j=0;j<NUM_COLS;j++) { 395 psF32 expect = (float) (2 * (i + j)); 396 psF32 actual = rc->image->data.F32[i][j]; 397 if (FLT_EPSILON < fabs(expect - actual)) { 398 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect); 399 testStatus = false; 400 } 401 } 402 } 403 404 test03Init(myReadout); 405 printf("------------------------------------------------------------\n"); 406 printf("Calling pmNonLinearityLookup() with inFlux psVector size 1. Should generate error, return original p sReadout.\n");391 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 392 testStatus = false; 393 } 394 for (i=0;i<NUM_ROWS;i++) { 395 for (j=0;j<NUM_COLS;j++) { 396 psF32 expect = (float) (2 * (i + j)); 397 psF32 actual = rc->image->data.F32[i][j]; 398 if (FLT_EPSILON < fabs(expect - actual)) { 399 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect); 400 testStatus = false; 401 } 402 } 403 } 404 405 test03Init(myReadout); 406 printf("------------------------------------------------------------\n"); 407 printf("Calling pmNonLinearityLookup() with inFlux psVector size 1. Should generate error, return original pmReadout.\n"); 407 408 rc = pmNonLinearityLookup(myReadout, inOne, out); 408 409 if (rc != myReadout) { 409 printf("TEST ERROR: pmNonLinearityPolynomial() did not return the original p sReadout\n");410 printf("TEST ERROR: pmNonLinearityPolynomial() did not return the original pmReadout\n"); 410 411 testStatus = false; 411 412 } … … 427 428 rc = pmNonLinearityLookup(myReadout, in, out); 428 429 if (rc == NULL) { 429 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");430 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 430 431 testStatus = false; 431 432 } … … 453 454 rc = pmNonLinearityLookup(myReadout, in, out); 454 455 if (rc == NULL) { 455 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");456 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 456 457 testStatus = false; 457 458 } … … 479 480 rc = pmNonLinearityLookup(myReadout, in, out); 480 481 if (rc == NULL) { 481 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL p sReadout\n");482 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n"); 482 483 testStatus = false; 483 484 } -
trunk/psModules/test/tst_pmObjects01.c
r4579 r4770 19 19 * abd never deallocate, no error is generated. 20 20 * 21 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $22 * @date $Date: 2005-0 7-19 01:44:48$21 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2005-08-16 01:10:36 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 63 63 int main(int argc, char* argv[]) 64 64 { 65 psLogSetFormat("HLNM"); 65 66 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 66 // test02();67 67 } 68 68 … … 76 76 77 77 printf("Testing pmPeakAlloc()...\n"); 78 p sPeak *tmpPeak = pmPeakAlloc(1, 2, 3.0, PM_PEAK_LONE);78 pmPeak *tmpPeak = pmPeakAlloc(1, 2, 3.0, PM_PEAK_LONE); 79 79 if (tmpPeak == NULL) { 80 printf("TEST ERROR: pmPeakAlloc() returned a NULL p sPeak\n");80 printf("TEST ERROR: pmPeakAlloc() returned a NULL pmPeak\n"); 81 81 testStatus = false; 82 82 } else { 83 83 if (tmpPeak->x != 1) { 84 printf("TEST ERROR: pmPeakAlloc() improperly set p sPeak->x\n");84 printf("TEST ERROR: pmPeakAlloc() improperly set pmPeak->x\n"); 85 85 testStatus = false; 86 86 } 87 87 if (tmpPeak->y != 2) { 88 printf("TEST ERROR: pmPeakAlloc() improperly set p sPeak->y\n");88 printf("TEST ERROR: pmPeakAlloc() improperly set pmPeak->y\n"); 89 89 testStatus = false; 90 90 } 91 91 if (tmpPeak->counts != 3.0) { 92 printf("TEST ERROR: pmPeakAlloc() improperly set p sPeak->counts\n");92 printf("TEST ERROR: pmPeakAlloc() improperly set pmPeak->counts\n"); 93 93 testStatus = false; 94 94 } 95 95 if (tmpPeak->class != PM_PEAK_LONE) { 96 printf("TEST ERROR: pmPeakAlloc() improperly set p sPeak->class\n");96 printf("TEST ERROR: pmPeakAlloc() improperly set pmPeak->class\n"); 97 97 testStatus = false; 98 98 } … … 101 101 102 102 printf("Testing pmMomentsAlloc()...\n"); 103 p sMoments *tmpMoments = pmMomentsAlloc();103 pmMoments *tmpMoments = pmMomentsAlloc(); 104 104 if (tmpMoments == NULL) { 105 printf("TEST ERROR: pmMomentsAlloc() returned a NULL p sMoments\n");105 printf("TEST ERROR: pmMomentsAlloc() returned a NULL pmMoments\n"); 106 106 testStatus = false; 107 107 } else { … … 115 115 (fabs(tmpMoments->Sky-0.0) > ERROR_TOL) || 116 116 (tmpMoments->nPixels != 0)) { 117 printf("TEST ERROR: pmMomentsAlloc() did not properly initialize the p sMoments structure.\n");117 printf("TEST ERROR: pmMomentsAlloc() did not properly initialize the pmMoments structure.\n"); 118 118 testStatus = false; 119 119 } … … 122 122 123 123 printf("Testing pmModelAlloc(PS_MODEL_GAUSS)...\n"); 124 p sModel *tmpModel = pmModelAlloc(PS_MODEL_GAUSS);124 pmModel *tmpModel = pmModelAlloc(PS_MODEL_GAUSS); 125 125 if (tmpModel == NULL) { 126 printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) returned a NULL p sModel\n");126 printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) returned a NULL pmModel\n"); 127 127 testStatus = false; 128 128 } else { … … 146 146 tmpModel = pmModelAlloc(PS_MODEL_PGAUSS); 147 147 if (tmpModel == NULL) { 148 printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) returned a NULL p sModel\n");148 printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) returned a NULL pmModel\n"); 149 149 testStatus = false; 150 150 } else { … … 168 168 tmpModel = pmModelAlloc(PS_MODEL_TWIST_GAUSS); 169 169 if (tmpModel == NULL) { 170 printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) returned a NULL p sModel\n");170 printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) returned a NULL pmModel\n"); 171 171 testStatus = false; 172 172 } else { … … 190 190 tmpModel = pmModelAlloc(PS_MODEL_WAUSS); 191 191 if (tmpModel == NULL) { 192 printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) returned a NULL p sModel\n");192 printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) returned a NULL pmModel\n"); 193 193 testStatus = false; 194 194 } else { … … 212 212 tmpModel = pmModelAlloc(PS_MODEL_SERSIC); 213 213 if (tmpModel == NULL) { 214 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) returned a NULL p sModel\n");214 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) returned a NULL pmModel\n"); 215 215 testStatus = false; 216 216 } else { … … 234 234 tmpModel = pmModelAlloc(PS_MODEL_SERSIC_CORE); 235 235 if (tmpModel == NULL) { 236 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) returned a NULL p sModel\n");236 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) returned a NULL pmModel\n"); 237 237 testStatus = false; 238 238 } else { … … 253 253 psFree(tmpModel); 254 254 255 p sSource *tmpSource = pmSourceAlloc();255 pmSource *tmpSource = pmSourceAlloc(); 256 256 if (tmpSource == NULL) { 257 printf("TEST ERROR: pmSourceAlloc() returned a NULL p sSource\n");257 printf("TEST ERROR: pmSourceAlloc() returned a NULL pmSource\n"); 258 258 testStatus = false; 259 259 } … … 545 545 // HEY: verify 546 546 for (psS32 i = 0 ; i < outData->n ; i++) { 547 p sPeak *tmpPeak = (psPeak *) outData->data[i];547 pmPeak *tmpPeak = (pmPeak *) outData->data[i]; 548 548 if (((tmpPeak->x == 0) && (tmpPeak->y == 0)) || 549 549 ((tmpPeak->x == 0) && (tmpPeak->y == numRows-1)) || … … 803 803 } 804 804 } 805 p sSource *rc = NULL;806 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST04_NUM_ROWS / 2),805 pmSource *rc = NULL; 806 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST04_NUM_ROWS / 2), 807 807 (psF32) (TST04_NUM_COLS / 2), 808 808 200.0, … … 813 813 rc = pmSourceLocalSky(NULL, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 814 814 if (rc != NULL) { 815 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");815 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 816 816 psFree(rc); 817 817 testStatus = false; … … 822 822 rc = pmSourceLocalSky(imgDataF64, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 823 823 if (rc != NULL) { 824 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");824 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 825 825 psFree(rc); 826 826 testStatus = false; … … 828 828 829 829 printf("----------------------------------------------------------------------------------\n"); 830 printf("Calling pmSourceLocalSky with NULL p sPeak. Should generate error and return NULL.\n");830 printf("Calling pmSourceLocalSky with NULL pmPeak. Should generate error and return NULL.\n"); 831 831 rc = pmSourceLocalSky(imgData, NULL, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 832 832 if (rc != NULL) { 833 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");833 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 834 834 psFree(rc); 835 835 testStatus = false; … … 840 840 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, -10.0, 20.0); 841 841 if (rc != NULL) { 842 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");842 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 843 843 psFree(rc); 844 844 testStatus = false; … … 849 849 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 5.0); 850 850 if (rc != NULL) { 851 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");851 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 852 852 psFree(rc); 853 853 testStatus = false; … … 861 861 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 862 862 if (rc != NULL) { 863 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");863 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 864 864 psFree(rc); 865 865 testStatus = false; … … 872 872 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 873 873 if (rc != NULL) { 874 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");874 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 875 875 psFree(rc); 876 876 testStatus = false; … … 883 883 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, 10.0, 20.0); 884 884 if (rc != NULL) { 885 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");885 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 886 886 psFree(rc); 887 887 testStatus = false; … … 894 894 rc = pmSourceLocalSky(imgData, tmpPeak, PS_STAT_SAMPLE_MEAN, (psF32) TST04_INNER_RADIUS, (psF32) TST04_OUTER_RADIUS); 895 895 if (rc != NULL) { 896 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL p sSource.\n");896 printf("TEST ERROR: pmSourceLocalSky() returned a non-NULL pmSource.\n"); 897 897 psFree(rc); 898 898 testStatus = false; … … 915 915 916 916 if (rc == NULL) { 917 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");917 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 918 918 testStatus = false; 919 919 } else { 920 920 if (rc->peak == NULL) { 921 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource->peak.\n");921 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource->peak.\n"); 922 922 testStatus = false; 923 923 } else { 924 924 if (rc->peak->x != tmpPeak->x) { 925 printf("TEST ERROR: pmSourceLocalSky() p sSource->peak->x was %d, should have been %d.\n", rc->peak->x, tmpPeak->x);925 printf("TEST ERROR: pmSourceLocalSky() pmSource->peak->x was %d, should have been %d.\n", rc->peak->x, tmpPeak->x); 926 926 testStatus = false; 927 927 } 928 928 929 929 if (rc->peak->y != tmpPeak->y) { 930 printf("TEST ERROR: pmSourceLocalSky() p sSource->peak->y was %d, should have been %d.\n", rc->peak->y, tmpPeak->y);930 printf("TEST ERROR: pmSourceLocalSky() pmSource->peak->y was %d, should have been %d.\n", rc->peak->y, tmpPeak->y); 931 931 testStatus = false; 932 932 } 933 933 934 934 if (rc->peak->counts != tmpPeak->counts) { 935 printf("TEST ERROR: pmSourceLocalSky() p sSource->peak->counts was %f, should have been %f.\n", rc->peak->counts, tmpPeak->counts);935 printf("TEST ERROR: pmSourceLocalSky() pmSource->peak->counts was %f, should have been %f.\n", rc->peak->counts, tmpPeak->counts); 936 936 testStatus = false; 937 937 } 938 938 939 939 if (rc->peak->class != tmpPeak->class) { 940 printf("TEST ERROR: pmSourceLocalSky() p sSource->peak->class was %d, should have been %d.\n", rc->peak->class, tmpPeak->class);940 printf("TEST ERROR: pmSourceLocalSky() pmSource->peak->class was %d, should have been %d.\n", rc->peak->class, tmpPeak->class); 941 941 testStatus = false; 942 942 } … … 944 944 945 945 if (rc->pixels == NULL) { 946 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels was NULL.\n");946 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels was NULL.\n"); 947 947 testStatus = false; 948 948 } else { 949 949 if (rc->pixels->numRows != (2 * TST04_OUTER_RADIUS)) { 950 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels->numRows was %d, should have been %d.\n",950 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels->numRows was %d, should have been %d.\n", 951 951 rc->pixels->numRows, (2 * TST04_OUTER_RADIUS)); 952 952 testStatus = false; … … 954 954 955 955 if (rc->pixels->numCols != (2 * TST04_OUTER_RADIUS)) { 956 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels->numCols was %d, should have been %d.\n",956 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels->numCols was %d, should have been %d.\n", 957 957 rc->pixels->numCols, (2 * TST04_OUTER_RADIUS)); 958 958 testStatus = false; … … 960 960 961 961 if (rc->pixels->col0 != (tmpPeak->x - TST04_OUTER_RADIUS)) { 962 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels->col0 was %d, should have been %d.\n",962 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels->col0 was %d, should have been %d.\n", 963 963 rc->pixels->col0, (tmpPeak->x - TST04_OUTER_RADIUS)); 964 964 testStatus = false; … … 966 966 967 967 if (rc->pixels->row0 != (tmpPeak->y - TST04_OUTER_RADIUS)) { 968 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels->row0 was %d, should have been %d.\n",968 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels->row0 was %d, should have been %d.\n", 969 969 rc->pixels->row0, (tmpPeak->y - TST04_OUTER_RADIUS)); 970 970 testStatus = false; … … 972 972 973 973 if (rc->pixels->type.type != PS_TYPE_F32) { 974 printf("TEST ERROR: pmSourceLocalSky() p sSource->pixels->type was %d, should have been %d.\n",974 printf("TEST ERROR: pmSourceLocalSky() pmSource->pixels->type was %d, should have been %d.\n", 975 975 rc->pixels->type.type, PS_TYPE_F32); 976 976 testStatus = false; … … 982 982 983 983 if (rc->mask == NULL) { 984 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask was NULL.\n");984 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask was NULL.\n"); 985 985 testStatus = false; 986 986 } else { 987 987 if (rc->mask->numRows != (2 * TST04_OUTER_RADIUS)) { 988 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask->numRows was %d, should have been %d.\n",988 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask->numRows was %d, should have been %d.\n", 989 989 rc->mask->numRows, (2 * TST04_OUTER_RADIUS)); 990 990 testStatus = false; … … 992 992 993 993 if (rc->mask->numCols != (2 * TST04_OUTER_RADIUS)) { 994 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask->numCols was %d, should have been %d.\n",994 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask->numCols was %d, should have been %d.\n", 995 995 rc->mask->numCols, (2 * TST04_OUTER_RADIUS)); 996 996 testStatus = false; … … 998 998 999 999 if (rc->mask->type.type != PS_TYPE_U8) { 1000 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask->type was %d, should have been %d.\n",1000 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask->type was %d, should have been %d.\n", 1001 1001 rc->mask->type.type, PS_TYPE_U8); 1002 1002 testStatus = false; … … 1018 1018 } 1019 1019 if (maskedPixels != PS_SQR(2*(TST04_INNER_RADIUS-1))) { 1020 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask had %d masked pixels, should have been %d.\n",1020 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask had %d masked pixels, should have been %d.\n", 1021 1021 maskedPixels, PS_SQR(2*(TST04_INNER_RADIUS-1))); 1022 1022 testStatus = false; 1023 1023 } 1024 1024 if (unmaskedPixels != (PS_SQR(2*TST04_OUTER_RADIUS) - PS_SQR(2*(TST04_INNER_RADIUS-1)))) { 1025 printf("TEST ERROR: pmSourceLocalSky() p sSource->mask had %d masked pixels, should have been %d.\n",1025 printf("TEST ERROR: pmSourceLocalSky() pmSource->mask had %d masked pixels, should have been %d.\n", 1026 1026 unmaskedPixels, (PS_SQR(2*TST04_OUTER_RADIUS) - PS_SQR(2*(TST04_INNER_RADIUS-1)))); 1027 1027 testStatus = false; … … 1030 1030 1031 1031 if (rc->moments == NULL) { 1032 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource->moments.\n");1032 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource->moments.\n"); 1033 1033 testStatus = false; 1034 1034 } else { 1035 1035 if (rc->moments->Sky != TST04_SKY) { 1036 printf("TEST ERROR: pmSourceLocalSky() p sSource->moments->Sky was %f, should have been %f.\n", rc->moments->Sky, TST04_SKY);1036 printf("TEST ERROR: pmSourceLocalSky() pmSource->moments->Sky was %f, should have been %f.\n", rc->moments->Sky, TST04_SKY); 1037 1037 testStatus = false; 1038 1038 } … … 1063 1063 { 1064 1064 bool testStatus = true; 1065 p sSource *tmpSource = NULL;1065 pmSource *tmpSource = NULL; 1066 1066 bool rc = false; 1067 1067 // Create the image used in this test. … … 1080 1080 1081 1081 // 1082 // Create a p sPeak with the center pixel set to the peak.1083 // 1084 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST06_NUM_ROWS / 2),1082 // Create a pmPeak with the center pixel set to the peak. 1083 // 1084 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST06_NUM_ROWS / 2), 1085 1085 (psF32) (TST06_NUM_COLS / 2), 1086 1086 200.0, … … 1093 1093 (psF32) TST06_OUTER_RADIUS); 1094 1094 if (tmpSource == NULL) { 1095 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1095 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1096 1096 psFree(imgData); 1097 1097 psFree(imgDataF64); … … 1102 1102 1103 1103 printf("----------------------------------------------------------------------------------\n"); 1104 printf("Calling pmSourceSetPixelsCircle with NULL p sSource. Should generate error and return NULL.\n");1104 printf("Calling pmSourceSetPixelsCircle with NULL pmSource. Should generate error and return NULL.\n"); 1105 1105 rc = pmSourceSetPixelsCircle(NULL, imgData, 10.0); 1106 1106 if (rc == true) { … … 1108 1108 testStatus = false; 1109 1109 } 1110 // XXX: test with p sSource->peaks NULL1110 // XXX: test with pmSource->peaks NULL 1111 1111 1112 1112 printf("----------------------------------------------------------------------------------\n"); … … 1218 1218 { 1219 1219 bool testStatus = true; 1220 p sSource *tmpSource = NULL;1221 p sSource *rc = NULL;1220 pmSource *tmpSource = NULL; 1221 pmSource *rc = NULL; 1222 1222 // Create the image used in this test. 1223 1223 psImage *imgData = psImageAlloc(TST05_NUM_COLS, TST05_NUM_ROWS, PS_TYPE_F32); … … 1229 1229 1230 1230 // 1231 // Create a p sPeak with the center pixel set to the peak.1232 // 1233 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST05_NUM_ROWS / 2),1231 // Create a pmPeak with the center pixel set to the peak. 1232 // 1233 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST05_NUM_ROWS / 2), 1234 1234 (psF32) (TST05_NUM_COLS / 2), 1235 1235 200.0, … … 1242 1242 (psF32) TST05_OUTER_RADIUS); 1243 1243 if (tmpSource == NULL) { 1244 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1244 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1245 1245 psFree(tmpSource); 1246 1246 testStatus = false; … … 1249 1249 1250 1250 printf("----------------------------------------------------------------------------------\n"); 1251 printf("Calling pmSourceMoments with NULL p sSource. Should generate error and return NULL.\n");1251 printf("Calling pmSourceMoments with NULL pmSource. Should generate error and return NULL.\n"); 1252 1252 rc = pmSourceMoments(NULL, 10.0); 1253 1253 if (rc != NULL) { 1254 printf("TEST ERROR: pmSourceMoments() returned a non-NULL p sSource.\n");1255 testStatus = false; 1256 } 1257 // XXX: test with p sSource->peaks NULL1258 // XXX: test with p sSource->pixels NULL1259 // XXX: test with p sSource->mask NULL1254 printf("TEST ERROR: pmSourceMoments() returned a non-NULL pmSource.\n"); 1255 testStatus = false; 1256 } 1257 // XXX: test with pmSource->peaks NULL 1258 // XXX: test with pmSource->pixels NULL 1259 // XXX: test with pmSource->mask NULL 1260 1260 1261 1261 printf("----------------------------------------------------------------------------------\n"); … … 1263 1263 rc = pmSourceMoments(tmpSource, -10.0); 1264 1264 if (rc != NULL) { 1265 printf("TEST ERROR: pmSourceMoments() returned a non-NULL p sSource.\n");1265 printf("TEST ERROR: pmSourceMoments() returned a non-NULL pmSource.\n"); 1266 1266 testStatus = false; 1267 1267 } … … 1485 1485 } 1486 1486 } 1487 p sSource *mySrc = NULL;1487 pmSource *mySrc = NULL; 1488 1488 bool rc = false; 1489 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST04_NUM_ROWS / 2),1489 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST04_NUM_ROWS / 2), 1490 1490 (psF32) (TST04_NUM_COLS / 2), 1491 1491 200.0, … … 1502 1502 1503 1503 if (mySrc == NULL) { 1504 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1505 testStatus = false; 1506 } 1507 1508 printf("----------------------------------------------------------------------------------\n"); 1509 printf("Calling pmSourceModelGuess with NULL p sSource. Should generate error, return FALSE.\n");1504 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1505 testStatus = false; 1506 } 1507 1508 printf("----------------------------------------------------------------------------------\n"); 1509 printf("Calling pmSourceModelGuess with NULL pmSource. Should generate error, return FALSE.\n"); 1510 1510 rc = pmSourceModelGuess(NULL, imgData, PS_MODEL_GAUSS); 1511 1511 if (rc == true) { … … 1606 1606 } 1607 1607 } 1608 p sSource *mySrc = NULL;1608 pmSource *mySrc = NULL; 1609 1609 psArray *rc = NULL; 1610 1610 1611 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST09_NUM_ROWS / 2),1611 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST09_NUM_ROWS / 2), 1612 1612 (psF32) (TST09_NUM_COLS / 2), 1613 1613 200.0, … … 1624 1624 1625 1625 if (mySrc == NULL) { 1626 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1626 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1627 1627 testStatus = false; 1628 1628 } … … 1635 1635 1636 1636 printf("----------------------------------------------------------------------------------\n"); 1637 printf("Calling pmSourceContour with NULL p sSource . Should generate error, return NULL.\n");1637 printf("Calling pmSourceContour with NULL pmSource . Should generate error, return NULL.\n"); 1638 1638 rc = pmSourceContour(NULL, imgData, LEVEL, PS_CONTOUR_CRUDE); 1639 1639 if (rc != NULL) { … … 1660 1660 printf("Calling pmSourceContour with acceptable data.\n"); 1661 1661 printf("NOTE: must figure out the parameters for this test to be meaningful.\n"); 1662 mySrc->model s->params->data.F32[0] = TST09_SKY;1663 mySrc->model s->params->data.F32[1] = 15.0;1664 mySrc->model s->params->data.F32[2] = (psF32) (TST09_NUM_ROWS / 2);1665 mySrc->model s->params->data.F32[3] = (psF32) (TST09_NUM_COLS / 2);1666 mySrc->model s->params->data.F32[4] = 2.0;1667 mySrc->model s->params->data.F32[5] = 2.0;1668 mySrc->model s->params->data.F32[6] = 2.0;1662 mySrc->modelPSF->params->data.F32[0] = TST09_SKY; 1663 mySrc->modelPSF->params->data.F32[1] = 15.0; 1664 mySrc->modelPSF->params->data.F32[2] = (psF32) (TST09_NUM_ROWS / 2); 1665 mySrc->modelPSF->params->data.F32[3] = (psF32) (TST09_NUM_COLS / 2); 1666 mySrc->modelPSF->params->data.F32[4] = 2.0; 1667 mySrc->modelPSF->params->data.F32[5] = 2.0; 1668 mySrc->modelPSF->params->data.F32[6] = 2.0; 1669 1669 rc = pmSourceContour(mySrc, imgData, LEVEL, PS_CONTOUR_CRUDE); 1670 1670 if (rc == NULL) { … … 1703 1703 } 1704 1704 } 1705 p sSource *mySrc = NULL;1705 pmSource *mySrc = NULL; 1706 1706 psBool rc = false; 1707 1707 1708 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST15_NUM_ROWS / 2),1708 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST15_NUM_ROWS / 2), 1709 1709 (psF32) (TST15_NUM_COLS / 2), 1710 1710 200.0, … … 1721 1721 1722 1722 if (mySrc == NULL) { 1723 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1724 testStatus = false; 1725 } 1726 1727 mySrc->model s= pmModelAlloc(PS_MODEL_GAUSS);1728 mySrc->model s->params->data.F32[0] = 5.0;1729 mySrc->model s->params->data.F32[1] = 70.0;1730 mySrc->model s->params->data.F32[2] = (psF32) (TST15_NUM_ROWS / 2);1731 mySrc->model s->params->data.F32[3] = (psF32) (TST15_NUM_COLS / 2);1732 mySrc->model s->params->data.F32[4] = 1.0;1733 mySrc->model s->params->data.F32[5] = 1.0;1734 mySrc->model s->params->data.F32[6] = 2.0;1723 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1724 testStatus = false; 1725 } 1726 1727 mySrc->modelPSF = pmModelAlloc(PS_MODEL_GAUSS); 1728 mySrc->modelPSF->params->data.F32[0] = 5.0; 1729 mySrc->modelPSF->params->data.F32[1] = 70.0; 1730 mySrc->modelPSF->params->data.F32[2] = (psF32) (TST15_NUM_ROWS / 2); 1731 mySrc->modelPSF->params->data.F32[3] = (psF32) (TST15_NUM_COLS / 2); 1732 mySrc->modelPSF->params->data.F32[4] = 1.0; 1733 mySrc->modelPSF->params->data.F32[5] = 1.0; 1734 mySrc->modelPSF->params->data.F32[6] = 2.0; 1735 1735 1736 1736 printf("----------------------------------------------------------------------------------\n"); … … 1783 1783 } 1784 1784 } 1785 p sSource *mySrc = NULL;1785 pmSource *mySrc = NULL; 1786 1786 psBool rc = false; 1787 1787 1788 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST16_NUM_ROWS / 2),1788 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST16_NUM_ROWS / 2), 1789 1789 (psF32) (TST16_NUM_COLS / 2), 1790 1790 200.0, … … 1801 1801 1802 1802 if (mySrc == NULL) { 1803 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1804 testStatus = false; 1805 } 1806 1807 mySrc->model s= pmModelAlloc(PS_MODEL_GAUSS);1808 mySrc->model s->params->data.F32[0] = 5.0;1809 mySrc->model s->params->data.F32[1] = 70.0;1810 mySrc->model s->params->data.F32[2] = (psF32) (TST16_NUM_ROWS / 2);1811 mySrc->model s->params->data.F32[3] = (psF32) (TST16_NUM_COLS / 2);1812 mySrc->model s->params->data.F32[4] = 1.0;1813 mySrc->model s->params->data.F32[5] = 1.0;1814 mySrc->model s->params->data.F32[6] = 2.0;1803 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1804 testStatus = false; 1805 } 1806 1807 mySrc->modelPSF = pmModelAlloc(PS_MODEL_GAUSS); 1808 mySrc->modelPSF->params->data.F32[0] = 5.0; 1809 mySrc->modelPSF->params->data.F32[1] = 70.0; 1810 mySrc->modelPSF->params->data.F32[2] = (psF32) (TST16_NUM_ROWS / 2); 1811 mySrc->modelPSF->params->data.F32[3] = (psF32) (TST16_NUM_COLS / 2); 1812 mySrc->modelPSF->params->data.F32[4] = 1.0; 1813 mySrc->modelPSF->params->data.F32[5] = 1.0; 1814 mySrc->modelPSF->params->data.F32[6] = 2.0; 1815 1815 1816 1816 printf("----------------------------------------------------------------------------------\n"); … … 1863 1863 } 1864 1864 } 1865 p sSource *mySrc = NULL;1865 pmSource *mySrc = NULL; 1866 1866 psBool rc = false; 1867 1867 1868 p sPeak *tmpPeak = pmPeakAlloc((psF32) (TST20_NUM_ROWS / 2),1868 pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST20_NUM_ROWS / 2), 1869 1869 (psF32) (TST20_NUM_COLS / 2), 1870 1870 200.0, … … 1881 1881 1882 1882 if (mySrc == NULL) { 1883 printf("TEST ERROR: pmSourceLocalSky() returned a NULL p sSource.\n");1884 testStatus = false; 1885 } 1886 1887 mySrc->model s= pmModelAlloc(PS_MODEL_GAUSS);1888 1889 1890 mySrc->model s->params->data.F32[0] = 5.0;1891 mySrc->model s->params->data.F32[1] = 70.0;1892 mySrc->model s->params->data.F32[2] = (psF32) (TST20_NUM_ROWS / 2);1893 mySrc->model s->params->data.F32[3] = (psF32) (TST20_NUM_COLS / 2);1894 mySrc->model s->params->data.F32[4] = 1.0;1895 mySrc->model s->params->data.F32[5] = 1.0;1896 mySrc->model s->params->data.F32[6] = 2.0;1883 printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n"); 1884 testStatus = false; 1885 } 1886 1887 mySrc->modelPSF = pmModelAlloc(PS_MODEL_GAUSS); 1888 1889 1890 mySrc->modelPSF->params->data.F32[0] = 5.0; 1891 mySrc->modelPSF->params->data.F32[1] = 70.0; 1892 mySrc->modelPSF->params->data.F32[2] = (psF32) (TST20_NUM_ROWS / 2); 1893 mySrc->modelPSF->params->data.F32[3] = (psF32) (TST20_NUM_COLS / 2); 1894 mySrc->modelPSF->params->data.F32[4] = 1.0; 1895 mySrc->modelPSF->params->data.F32[5] = 1.0; 1896 mySrc->modelPSF->params->data.F32[6] = 2.0; 1897 1897 1898 1898 printf("----------------------------------------------------------------------------------\n"); … … 1905 1905 1906 1906 printf("----------------------------------------------------------------------------------\n"); 1907 printf("Calling pmSourceFitModel with NULL p sSource. Should generate error, return FALSE.\n");1907 printf("Calling pmSourceFitModel with NULL pmSource. Should generate error, return FALSE.\n"); 1908 1908 rc = pmSourceFitModel(NULL, imgData); 1909 1909 if (rc == true) { -
trunk/psModules/test/tst_pmReadoutCombine.c
r2945 r4770 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-0 1-10 22:22:52$7 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-08-16 01:10:36 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 56 56 int main(int argc, char* argv[]) 57 57 { 58 psLogSetFormat("HLNM"); 58 59 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 59 60 } … … 118 119 *(int *) (& (tmpImage->col0)) = baseCols[r]; 119 120 /* 120 p sReadout *tmpReadout = psReadoutAlloc(baseColsReadout[r],121 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r], 121 122 baseRowsReadout[r], 122 123 tmpImage); 123 124 */ 124 p sReadout *tmpReadout = psReadoutAlloc();125 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 125 126 tmpReadout->image = tmpImage; 126 127 … … 154 155 psListElem *tmpInput = (psListElem *) list->head; 155 156 while (NULL != tmpInput) { 156 p sReadout *tmpReadout = (psReadout *) tmpInput->data;157 pmReadout *tmpReadout = (pmReadout *) tmpInput->data; 157 158 psFree(tmpReadout); 158 159 tmpInput = tmpInput->next; … … 236 237 *(int *) (& (tmpImage->col0)) = baseCols[r]; 237 238 /* 238 p sReadout *tmpReadout = psReadoutAlloc(baseColsReadout[r],239 pmReadout *tmpReadout = pmReadoutAlloc(baseColsReadout[r], 239 240 baseRowsReadout[r], 240 241 tmpImage); 241 242 */ 242 p sReadout *tmpReadout = psReadoutAlloc();243 pmReadout *tmpReadout = pmReadoutAlloc(NULL); 243 244 tmpReadout->image = tmpImage; 244 245 minOutRow = PS_MIN(minOutRow, (baseRowsReadout[r] + baseRows[r])); … … 441 442 psListElem *tmpInput = (psListElem *) list->head; 442 443 while (NULL != tmpInput) { 443 p sReadout *tmpReadout = (psReadout *) tmpInput->data;444 pmReadout *tmpReadout = (pmReadout *) tmpInput->data; 444 445 psFree(tmpReadout); 445 446 tmpInput = tmpInput->next; -
trunk/psModules/test/tst_pmSubtractBias.c
r3582 r4770 14 14 * @author GLG, MHPCC 15 15 * 16 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-0 3-31 02:01:57$16 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-08-16 01:10:36 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 42 42 int main(int argc, char* argv[]) 43 43 { 44 psLogSetFormat("HLNM"); 44 45 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 45 46 } … … 48 49 #define NUM_COLS 8 49 50 /****************************************************************************** 50 doSubtractBiasFullFrame(): a sample p sReadout as well as a bias image are51 created and the bias image is subtracted from the p sReadout.51 doSubtractBiasFullFrame(): a sample pmReadout as well as a bias image are 52 created and the bias image is subtracted from the pmReadout. 52 53 *****************************************************************************/ 53 54 int doSubtractBiasFullFrame(int numCols, int numRows) … … 60 61 psImage *tmpImage1 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 61 62 psImage *tmpImage2 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 62 // p sReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImage1);63 // p sReadout *myBias = psReadoutAlloc(numCols, numRows, tmpImage2);64 p sReadout *myReadout = psReadoutAlloc();65 p sReadout *myBias = psReadoutAlloc();63 // pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImage1); 64 // pmReadout *myBias = pmReadoutAlloc(numCols, numRows, tmpImage2); 65 pmReadout *myReadout = pmReadoutAlloc(NULL); 66 pmReadout *myBias = pmReadoutAlloc(NULL); 66 67 myReadout->image = tmpImage1; 67 68 myBias->image = tmpImage2; … … 110 111 111 112 /****************************************************************************** 112 doSubtractFullOverscans(): a sample p sReadout as well as several overscan113 doSubtractFullOverscans(): a sample pmReadout as well as several overscan 113 114 images of the same size are created. The overscan images are then subtracted 114 from the p sReadout.115 from the pmReadout. 115 116 *****************************************************************************/ 116 117 int doSubtractFullOverscans(int numCols, int numRows) … … 125 126 psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 126 127 psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 127 // p sReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImage1);128 p sReadout *myReadout = psReadoutAlloc();128 // pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImage1); 129 pmReadout *myReadout = pmReadoutAlloc(NULL); 129 130 myReadout->image = tmpImage1; 130 131 … … 185 186 186 187 /****************************************************************************** 187 doSubtractFullOverscans(): a sample p sReadout as well as several overscan188 doSubtractFullOverscans(): a sample pmReadout as well as several overscan 188 189 images of the same size are created. The overscan images are collected 189 pixel-by-pixel then subtracted column-wise from the p sReadout.190 pixel-by-pixel then subtracted column-wise from the pmReadout. 190 191 *****************************************************************************/ 191 192 int doSubtractFullOverscanColumns(int numCols, int numRows) … … 200 201 psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 201 202 psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 202 p sReadout *myReadout = psReadoutAlloc();203 pmReadout *myReadout = pmReadoutAlloc(NULL); 203 204 myReadout->image = tmpImage1; 204 205 psList *list; … … 245 246 } 246 247 /****************************************************************************** 247 doSubtractFullOverscans(): a sample p sReadout as well as several overscan248 doSubtractFullOverscans(): a sample pmReadout as well as several overscan 248 249 images of the same size are created. The overscan images are collected 249 pixel-by-pixel then subtracted column-wise from the p sReadout.250 pixel-by-pixel then subtracted column-wise from the pmReadout. 250 251 *****************************************************************************/ 251 252 int doSubtractFullOverscanColumnsPoly(int numCols, int numRows) … … 260 261 psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 261 262 psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 262 p sReadout *myReadout = psReadoutAlloc();263 pmReadout *myReadout = pmReadoutAlloc(NULL); 263 264 myReadout->image = tmpImage1; 264 265 psList *list; … … 307 308 } 308 309 /****************************************************************************** 309 doSubtractFullOverscansSmall(): a sample p sReadout as well as several overscan310 doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan 310 311 images of smaller size are created. The overscan images are collected 311 pixel-by-pixel then subtracted column-wise from the p sReadout.312 pixel-by-pixel then subtracted column-wise from the pmReadout. 312 313 *****************************************************************************/ 313 314 int doSubtractFullOverscanColumnsSmall(int numCols, int numRows) … … 319 320 int testStatus = 0; 320 321 psImage *tmpImage1 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 321 p sReadout *myReadout = psReadoutAlloc();322 pmReadout *myReadout = pmReadoutAlloc(NULL); 322 323 myReadout->image = tmpImage1; 323 324 psImage *tmpImage2 = psImageAlloc(numCols/2, numRows/2, PS_TYPE_F32); … … 390 391 391 392 /****************************************************************************** 392 doSubtractFullOverscans(): a sample p sReadout as well as several overscan393 doSubtractFullOverscans(): a sample pmReadout as well as several overscan 393 394 images of the same size are created. The overscan images are collected 394 pixel-by-pixel then subtracted row-wise from the p sReadout.395 pixel-by-pixel then subtracted row-wise from the pmReadout. 395 396 *****************************************************************************/ 396 397 int doSubtractFullOverscanRows(int numCols, int numRows) … … 405 406 psImage *tmpImage3 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 406 407 psImage *tmpImage4 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 407 p sReadout *myReadout = psReadoutAlloc();408 pmReadout *myReadout = pmReadoutAlloc(NULL); 408 409 myReadout->image = tmpImage1; 409 410 psList *list; … … 451 452 452 453 /****************************************************************************** 453 doSubtractFullOverscansSmall(): a sample p sReadout as well as several overscan454 doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan 454 455 images of smaller size are created. The overscan images are collected 455 pixel-by-pixel then subtracted row-wise from the p sReadout.456 pixel-by-pixel then subtracted row-wise from the pmReadout. 456 457 *****************************************************************************/ 457 458 int doSubtractFullOverscanRowsSmall(int numCols, int numRows) … … 474 475 psImage *tmpImage3 = psImageAlloc(OSnumCols, OSnumRows, PS_TYPE_F32); 475 476 psImage *tmpImage4 = psImageAlloc(OSnumCols, OSnumRows, PS_TYPE_F32); 476 p sReadout *myReadout = psReadoutAlloc();477 pmReadout *myReadout = pmReadoutAlloc(NULL); 477 478 myReadout->image = tmpImage1; 478 479 psList *list; … … 554 555 psImage *tmpImage3Short = psImageAlloc(numCols-1, numRows-1, PS_TYPE_F32); 555 556 psImage *tmpImage4Short = psImageAlloc(numCols-1, numRows-1, PS_TYPE_F32); 556 p sReadout *myReadout = psReadoutAlloc();557 pmReadout *myReadout = pmReadoutAlloc(NULL); 557 558 myReadout->image = tmpImage1; 558 p sReadout *rc = NULL;559 pmReadout *rc = NULL; 559 560 psList *list; 560 561 psList *listShort; 561 562 psStats *stat = psStatsAlloc(PS_STAT_SAMPLE_MEAN); 562 563 psImage *tmpImage5 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 563 p sReadout *myBias = psReadoutAlloc();564 pmReadout *myBias = pmReadoutAlloc(NULL); 564 565 myBias->image = tmpImage5; 565 566 printPositiveTestHeader(stdout, "pmSubtractBias", "Testing input parameter error conditions"); 566 567 567 568 psImage *tmpImage5ShortRows = psImageAlloc(numCols, numRows-1, PS_TYPE_F32); 568 p sReadout *myBiasShortRows = psReadoutAlloc();569 pmReadout *myBiasShortRows = pmReadoutAlloc(NULL); 569 570 myBiasShortRows->image = tmpImage5ShortRows; 570 571 psImage *tmpImage5ShortCols = psImageAlloc(numCols-1, numRows, PS_TYPE_F32); 571 p sReadout *myBiasShortCols = psReadoutAlloc();572 pmReadout *myBiasShortCols = pmReadoutAlloc(NULL); 572 573 myBiasShortCols->image = tmpImage5ShortCols; 573 574 … … 611 612 rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ALL, stat, 0, PM_FIT_NONE, NULL); 612 613 if (rc != myReadout) { 613 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");614 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 614 615 testStatus = false; 615 616 } … … 619 620 rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ROWS, stat, 0, PM_FIT_NONE, NULL); 620 621 if (rc != myReadout) { 621 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");622 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 622 623 testStatus = false; 623 624 psFree(rc); … … 628 629 rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_COLUMNS, stat, 0, PM_FIT_NONE, NULL); 629 630 if (rc != myReadout) { 630 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");631 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 631 632 testStatus = false; 632 633 psFree(rc); … … 694 695 rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat, 0, PM_FIT_SPLINE, myBias); 695 696 if (rc != myReadout) { 696 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");697 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 697 698 testStatus = false; 698 699 psFree(rc); … … 770 771 0, PM_FIT_NONE, myBiasShortRows); 771 772 if (rc != myReadout) { 772 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");773 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 773 774 testStatus = false; 774 775 psFree(rc); … … 781 782 0, PM_FIT_NONE, myBiasShortCols); 782 783 if (rc != myReadout) { 783 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");784 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 784 785 testStatus = false; 785 786 psFree(rc); … … 791 792 0, 54321, NULL); 792 793 if (rc != myReadout) { 793 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");794 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 794 795 testStatus = false; 795 796 psFree(rc); … … 801 802 0, PM_FIT_NONE, NULL); 802 803 if (rc != myReadout) { 803 printf("TEST ERROR: pmSubtractBias() did not return input p sReadout.\n");804 printf("TEST ERROR: pmSubtractBias() did not return input pmReadout.\n"); 804 805 testStatus = false; 805 806 psFree(rc); … … 847 848 848 849 /****************************************************************************** 849 doSubtractFullOverscansSmall(): a sample p sReadout as well as several overscan850 doSubtractFullOverscansSmall(): a sample pmReadout as well as several overscan 850 851 images of smaller size are created. The overscan images are collected 851 pixel-by-pixel then subtracted column-wise from the p sReadout.852 pixel-by-pixel then subtracted column-wise from the pmReadout. 852 853 *****************************************************************************/ 853 854 int doSubtractFullOverscanColumnsGeneric(int imageNumCols, … … 866 867 867 868 psImage *tmpImage1 = psImageAlloc(imageNumCols, imageNumRows, PS_TYPE_F32); 868 // p sReadout *myReadout = psReadoutAlloc(imageNumCols, imageNumRows, tmpImage1);869 p sReadout *myReadout = psReadoutAlloc();869 // pmReadout *myReadout = pmReadoutAlloc(imageNumCols, imageNumRows, tmpImage1); 870 pmReadout *myReadout = pmReadoutAlloc(NULL); 870 871 myReadout->image = tmpImage1; 871 872 for (i=0;i<imageNumRows;i++) { -
trunk/psModules/test/tst_pmSubtractSky.c
r3595 r4770 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 3-31 20:41:35$9 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-08-16 01:10:36 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 int main(int argc, char* argv[]) 40 40 { 41 psLogSetFormat("HLNM"); 41 42 return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv); 42 43 // test00(); … … 51 52 int testStatus = 0; 52 53 psImage *tmpImageF32 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 53 // p sReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImageF32);54 p sReadout *myReadout = psReadoutAlloc();54 // pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImageF32); 55 pmReadout *myReadout = pmReadoutAlloc(NULL); 55 56 myReadout->image = tmpImageF32; 56 57 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); … … 89 90 int testStatus = 0; 90 91 psImage *tmpImageF32 = psImageAlloc(numCols, numRows, PS_TYPE_F32); 91 // p sReadout *myReadout = psReadoutAlloc(numCols, numRows, tmpImageF32);92 p sReadout *myReadout = psReadoutAlloc();92 // pmReadout *myReadout = pmReadoutAlloc(numCols, numRows, tmpImageF32); 93 pmReadout *myReadout = pmReadoutAlloc(NULL); 93 94 myReadout->image = tmpImageF32; 94 95 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); … … 193 194 psImage *tmpImageF32 = psImageAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, PS_TYPE_F32); 194 195 psImage *tmpImageF64 = psImageAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, PS_TYPE_F64); 195 // p sReadout *myReadout = psReadoutAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, tmpImageF32);196 p sReadout *myReadout = psReadoutAlloc();197 myReadout->image = tmpImageF32; 198 p sReadout *rc = NULL;196 // pmReadout *myReadout = pmReadoutAlloc(NUM_COLS_SMALL, NUM_ROWS_SMALL, tmpImageF32); 197 pmReadout *myReadout = pmReadoutAlloc(NULL); 198 myReadout->image = tmpImageF32; 199 pmReadout *rc = NULL; 199 200 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); 200 201 psPolynomial2D *myPoly = psPolynomial2DAlloc(POLY_X_ORDER, POLY_Y_ORDER, PS_POLYNOMIAL_ORD); … … 208 209 209 210 printf("----------------------------------------------------------------\n"); 210 printf("Calling pmSubtractSky() with NULL p sReadout. Should error.\n\n");211 printf("Calling pmSubtractSky() with NULL pmReadout. Should error.\n\n"); 211 212 rc = pmSubtractSky(NULL, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0); 212 213 if (rc != NULL) { 213 printf("TEST ERROR: pmSubtractSky() returned a non-NULL p sReadout\n");214 testStatus = false; 215 } 216 217 printf("----------------------------------------------------------------\n"); 218 printf("Calling pmSubtractSky() with NULL p sReadout->image. Should error.\n\n");214 printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n"); 215 testStatus = false; 216 } 217 218 printf("----------------------------------------------------------------\n"); 219 printf("Calling pmSubtractSky() with NULL pmReadout->image. Should error.\n\n"); 219 220 myReadout->image = NULL; 220 221 rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0); 221 222 if (rc != NULL) { 222 printf("TEST ERROR: pmSubtractSky() returned a non-NULL p sReadout\n");223 testStatus = false; 224 } 225 myReadout->image = tmpImageF32; 226 227 printf("----------------------------------------------------------------\n"); 228 printf("Calling pmSubtractSky() with PS_TYPE_F64 p sReadout->image. Should error.\n\n");223 printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n"); 224 testStatus = false; 225 } 226 myReadout->image = tmpImageF32; 227 228 printf("----------------------------------------------------------------\n"); 229 printf("Calling pmSubtractSky() with PS_TYPE_F64 pmReadout->image. Should error.\n\n"); 229 230 myReadout->image = tmpImageF64; 230 231 rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0); 231 232 if (rc != NULL) { 232 printf("TEST ERROR: pmSubtractSky() returned a non-NULL p sReadout\n");233 printf("TEST ERROR: pmSubtractSky() returned a non-NULL pmReadout\n"); 233 234 testStatus = false; 234 235 } … … 239 240 rc = pmSubtractSky(myReadout, NULL, PM_FIT_POLYNOMIAL, 1, myStats, 2.0); 240 241 if (rc != myReadout) { 241 printf("TEST ERROR: pmSubtractSky() returned something other than p sReadout\n");242 printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n"); 242 243 testStatus = false; 243 244 } … … 247 248 rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_NONE, 1, myStats, 2.0); 248 249 if (rc != myReadout) { 249 printf("TEST ERROR: pmSubtractSky() returned something other than p sReadout\n");250 printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n"); 250 251 testStatus = false; 251 252 } … … 255 256 rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_SPLINE, 1, myStats, 2.0); 256 257 if (rc != myReadout) { 257 printf("TEST ERROR: pmSubtractSky() returned something other than p sReadout\n");258 printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n"); 258 259 testStatus = false; 259 260 } … … 347 348 rc = pmSubtractSky(myReadout, (void *) myPoly, 54321, 1, myStats, -1.0); 348 349 if (rc != myReadout) { 349 printf("TEST ERROR: pmSubtractSky() returned something other than p sReadout\n");350 printf("TEST ERROR: pmSubtractSky() returned something other than pmReadout\n"); 350 351 testStatus = false; 351 352 } -
trunk/psModules/test/verified/tst_pmImageCombine.stderr
r4579 r4770 5 5 \**********************************************************************************/ 6 6 7 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)7 <HOST>|E|pmCombineImages (FILE:LINENO) 8 8 Unallowable operation: images is NULL. 9 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)9 <HOST>|E|pmCombineImages (FILE:LINENO) 10 10 images and errors args must have same length (6 != 5) 11 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)11 <HOST>|E|pmCombineImages (FILE:LINENO) 12 12 Unallowable operation: psImage tmpDataImg has incorrect type. 13 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)13 <HOST>|E|pmCombineImages (FILE:LINENO) 14 14 images and errors args must have same length (5 != 6) 15 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)15 <HOST>|E|pmCombineImages (FILE:LINENO) 16 16 Unallowable operation: psImage tmpErrorImg has incorrect type. 17 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)17 <HOST>|E|pmCombineImages (FILE:LINENO) 18 18 images and masks args must have same length (5 != 6) 19 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)19 <HOST>|E|pmCombineImages (FILE:LINENO) 20 20 Unallowable operation: psImage tmpMaskImg has incorrect type. 21 < DATE><TIME>|<HOST>|E|pmCombineImages (FILE:LINENO)21 <HOST>|E|pmCombineImages (FILE:LINENO) 22 22 Unallowable operation: stats is NULL. 23 23 -
trunk/psModules/test/verified/tst_pmImageSubtract.stdout
r4579 r4770 30 30 Calling pmSubtractionSolveEquation() with acceptable input parameters. Should return non-NULL. 31 31 The solution vector is: 32 ( 1.37) (-0.00) (0.10) (0.08) (0.14) (0.10) (0.01) (0.02) (0.00) (-0.02) (-0.01) (-0.00) (0.00) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.02) (-0.01) (-0.01) (0.00) (0.00) (0.00) (-0.02) (0.01) (0.00) (-0.01) (0.00) (-0.00) (0.01) (-0.00) (-0.01) (0.00) (0.01) (0.01) (0.01) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.00) (0.00) (0.01) (-0.00) (-0.00) (-0.01) (0.02) (-0.00) (0.00) (-0.00) (-0.00) (-0.01) (-0.01) (0.02) (0.01) (-0.01) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (-0.00) (0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.00) (-0.01) (-0.03) (-0.00) (0.04) (0.01) (-0.00) (-0.03) (0.02) (0.02) (0.01) (-0.03) (-0.03) (-0.02) (0.01) (-0.01) (-0.01) (0.00) (0.00) (0.01) (0.02) (-0.02) (-0.02) (0.02) (0.02) (0.02) (0.03) (-0.03) (-0.03) (0.02) (0.02) (0.02) (0.00) (0.01) (-0.02) (-0.01) (-0.01) (0.02) (-0.03) (0.02) (0.03) (-0.02) (-0.03) (-0.02) (-0.01) (-0.01) (0.00) (0.01) (-0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.01) (-0.01) (-0.02) (0.02) (0.01) (-0.02) (-0.02) (-0.00) (0.02) (-0.01) (-0.02) (0.01) (0.00) (0.01) (-0.02) (0.01) (0.00) (-0.00) (-0.01) (0.00) (0.00) (-0.01) (-0.01) (0.01) (0.01) (0.01) (0.51)32 (-64611.38) (9775.94) (-39812.77) (9051.88) (0.14) (-36863.67) (0.01) (0.02) (0.00) (-0.02) (-0.01) (-0.00) (0.00) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.02) (-0.01) (-0.01) (0.00) (0.00) (0.00) (-0.02) (0.01) (0.00) (-0.01) (0.00) (-0.00) (0.01) (-0.00) (-0.01) (0.00) (0.01) (0.01) (0.01) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.00) (0.00) (0.01) (-0.00) (-0.00) (-0.01) (0.02) (-0.00) (0.00) (-0.00) (-0.00) (-0.01) (-0.01) (0.02) (0.01) (-0.01) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (-0.00) (0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.00) (-0.01) (-0.03) (-0.00) (0.04) (0.01) (-0.00) (-0.03) (0.02) (0.02) (0.01) (-0.03) (-0.03) (-0.02) (0.01) (-0.01) (-0.01) (0.00) (0.00) (0.01) (0.02) (-0.02) (-0.02) (0.02) (0.02) (0.02) (0.03) (-0.03) (-0.03) (0.02) (0.02) (0.02) (0.00) (0.01) (-0.02) (-0.01) (-0.01) (0.02) (-0.03) (0.02) (0.03) (-0.02) (-0.03) (-0.02) (-0.01) (-0.01) (0.00) (0.01) (-0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.01) (-0.01) (-0.02) (0.02) (0.01) (-0.02) (-0.02) (-0.00) (0.02) (-0.01) (-0.02) (0.01) (0.00) (0.01) (-0.02) (0.01) (0.00) (-0.00) (-0.01) (0.00) (0.00) (-0.01) (-0.01) (0.01) (0.01) (0.01) (0.51) 33 33 Calling pmSubtractionRejectStamps() with acceptable input parameters. Should return TRUE. 34 34 Calling pmSubtractionKernelImage() with NULL solution. Should generate error, return NULL. … … 39 39 Calling pmSubtractionKernelImage() unallowable y value. Should generate error, return NULL. 40 40 Calling pmSubtractionKernelImage() with acceptable input parameters. Should return a psImage. 41 -0.0007 74 -0.013938 0.010689 -0.013394 -0.01550742 -0.0092 41 -0.020300 -0.002732 0.016843 0.01074343 0.0088 20 0.015628 1.495404 -0.021095 -0.00978844 0.0033 71 -0.001256 0.017835 0.003308 0.00817545 0.0098 77 -0.010686 0.014775 0.003368 0.00620441 -0.000791 -0.014015 0.010665 -0.013466 -0.015527 42 -0.009282 -0.020460 -0.002556 0.016698 0.010701 43 0.008812 0.015715 -86582.703125 -0.020967 -0.009787 44 0.003316 -0.001408 0.018001 0.003171 0.008132 45 0.009856 -0.010723 0.014779 0.003320 0.006181 46 46 Testing pmSubtractionCalculateEquation(): 47 47 image size is (25, 25) … … 58 58 Calling pmSubtractionSolveEquation() with acceptable input parameters. Should return non-NULL. 59 59 The solution vector is: 60 (0.09) (-0.01) (-0.01) (0.00) (-0.00) (-0.00) (0.00) (0.00) ( 0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.55)60 (0.09) (-0.01) (-0.01) (0.00) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (0.00) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (0.00) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (0.00) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (0.00) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (0.00) (-0.00) (-0.00) (0.55) 61 61 Calling pmSubtractionRejectStamps() with acceptable input parameters. Should return TRUE. 62 62 Calling pmSubtractionKernelImage() with NULL solution. Should generate error, return NULL. -
trunk/psModules/test/verified/tst_pmNonLinear.stderr
r3623 r4770 23 23 \**********************************************************************************/ 24 24 25 < DATE><TIME>|<HOST>|E|pmNonLinearityPolynomial (FILE:LINENO)25 <HOST>|E|pmNonLinearityPolynomial (FILE:LINENO) 26 26 Unallowable operation: inputReadout is NULL. 27 < DATE><TIME>|<HOST>|E|pmNonLinearityPolynomial (FILE:LINENO)27 <HOST>|E|pmNonLinearityPolynomial (FILE:LINENO) 28 28 Unallowable operation: inputReadout->image is NULL. 29 < DATE><TIME>|<HOST>|E|pmNonLinearityPolynomial (FILE:LINENO)29 <HOST>|E|pmNonLinearityPolynomial (FILE:LINENO) 30 30 Unallowable operation: input1DPoly is NULL. 31 31 … … 38 38 \**********************************************************************************/ 39 39 40 < DATE><TIME>|<HOST>|E|pmNonLinearityLookup (FILE:LINENO)40 <HOST>|E|pmNonLinearityLookup (FILE:LINENO) 41 41 Unallowable operation: inputReadout is NULL. 42 < DATE><TIME>|<HOST>|E|pmNonLinearityLookup (FILE:LINENO)42 <HOST>|E|pmNonLinearityLookup (FILE:LINENO) 43 43 Unallowable operation: inputReadout->image is NULL. 44 < DATE><TIME>|<HOST>|E|pmNonLinearityLookup (FILE:LINENO)44 <HOST>|E|pmNonLinearityLookup (FILE:LINENO) 45 45 Unallowable operation: inFlux is NULL. 46 < DATE><TIME>|<HOST>|E|pmNonLinearityLookup (FILE:LINENO)46 <HOST>|E|pmNonLinearityLookup (FILE:LINENO) 47 47 Unallowable operation: outFlux is NULL. 48 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup48 <HOST>|W|pmNonLinearityLookup 49 49 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (24, 25) 50 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup50 <HOST>|W|pmNonLinearityLookup 51 51 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (24, 23) 52 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup52 <HOST>|W|pmNonLinearityLookup 53 53 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (23, 24) 54 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup54 <HOST>|W|pmNonLinearityLookup 55 55 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (25, 24) 56 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup56 <HOST>|W|pmNonLinearityLookup 57 57 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (23, 25) 58 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup58 <HOST>|W|pmNonLinearityLookup 59 59 WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (25, 23) 60 < DATE><TIME>|<HOST>|E|pmNonLinearityLookup (FILE:LINENO)60 <HOST>|E|pmNonLinearityLookup (FILE:LINENO) 61 61 pmNonLinearityLookup(): input vector less than 2 elements. Returning inputReadout image. 62 < DATE><TIME>|<HOST>|W|vectorBinDisectF3262 <HOST>|W|vectorBinDisectF32 63 63 vectorBinDisectF32(): ordinate -1.000000 is outside vector range (0.000000 - 23.000000). 64 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup64 <HOST>|W|pmNonLinearityLookup 65 65 WARNING: pmNonLinear.c: pmNonLinearityLookup(): 1 pixels outside table. 66 < DATE><TIME>|<HOST>|W|vectorBinDisectF3266 <HOST>|W|vectorBinDisectF32 67 67 vectorBinDisectF32(): ordinate 100.000000 is outside vector range (0.000000 - 23.000000). 68 < DATE><TIME>|<HOST>|W|pmNonLinearityLookup68 <HOST>|W|pmNonLinearityLookup 69 69 WARNING: pmNonLinear.c: pmNonLinearityLookup(): 1 pixels outside table. 70 70 -
trunk/psModules/test/verified/tst_pmNonLinear.stdout
r2961 r4770 84 84 Calling pmNonLinearityPolynomial() with NULL polynomial. Should generate error, return NULL. 85 85 ------------------------------------------------------------ 86 Calling pmNonLinearityLookup() with NULL input p sReadout. Should generate error, return NULL.86 Calling pmNonLinearityLookup() with NULL input pmReadout. Should generate error, return NULL. 87 87 ------------------------------------------------------------ 88 Calling pmNonLinearityLookup() with NULL input p sReadout->image. Should generate error, return NULL.88 Calling pmNonLinearityLookup() with NULL input pmReadout->image. Should generate error, return NULL. 89 89 ------------------------------------------------------------ 90 90 Calling pmNonLinearityLookup() with NULL inFlux psVector. Should generate error, return NULL. … … 104 104 Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors. Should generate warning. 105 105 ------------------------------------------------------------ 106 Calling pmNonLinearityLookup() with inFlux psVector size 1. Should generate error, return original p sReadout.106 Calling pmNonLinearityLookup() with inFlux psVector size 1. Should generate error, return original pmReadout. 107 107 ------------------------------------------------------------ 108 108 Calling pmNonLinearityLookup() with one pixels outside inFlux range. Should generate warnings. -
trunk/psModules/test/verified/tst_pmObjects01.stderr
r4228 r4770 14 14 \**********************************************************************************/ 15 15 16 < DATE><TIME>|<HOST>|E|pmFindVectorPeaks (FILE:LINENO)16 <HOST>|E|pmFindVectorPeaks (FILE:LINENO) 17 17 Unallowable operation: psVector vector or its data is NULL. 18 < DATE><TIME>|<HOST>|E|pmFindVectorPeaks (FILE:LINENO)18 <HOST>|E|pmFindVectorPeaks (FILE:LINENO) 19 19 Unallowable operation: psVector vector has no elements. 20 < DATE><TIME>|<HOST>|E|pmFindVectorPeaks (FILE:LINENO)20 <HOST>|E|pmFindVectorPeaks (FILE:LINENO) 21 21 Unallowable operation: psVector vector has incorrect type. 22 22 … … 29 29 \**********************************************************************************/ 30 30 31 < DATE><TIME>|<HOST>|E|psImageAlloc (FILE:LINENO)31 <HOST>|E|psImageAlloc (FILE:LINENO) 32 32 Specified number of rows (0) or columns (0) is invalid. 33 < DATE><TIME>|<HOST>|E|pmFindImagePeaks (FILE:LINENO)34 Unallowable operation: psImage image or its data is NULL. 35 < DATE><TIME>|<HOST>|E|pmFindImagePeaks (FILE:LINENO)36 Unallowable operation: psImage image or its data is NULL. 37 < DATE><TIME>|<HOST>|E|pmFindImagePeaks (FILE:LINENO)33 <HOST>|E|pmFindImagePeaks (FILE:LINENO) 34 Unallowable operation: psImage image or its data is NULL. 35 <HOST>|E|pmFindImagePeaks (FILE:LINENO) 36 Unallowable operation: psImage image or its data is NULL. 37 <HOST>|E|pmFindImagePeaks (FILE:LINENO) 38 38 Unallowable operation: psImage image has incorrect type. 39 39 … … 55 55 \**********************************************************************************/ 56 56 57 < DATE><TIME>|<HOST>|E|pmSourceLocalSky (FILE:LINENO)58 Unallowable operation: psImage image or its data is NULL. 59 < DATE><TIME>|<HOST>|E|pmSourceLocalSky (FILE:LINENO)57 <HOST>|E|pmSourceLocalSky (FILE:LINENO) 58 Unallowable operation: psImage image or its data is NULL. 59 <HOST>|E|pmSourceLocalSky (FILE:LINENO) 60 60 Unallowable operation: psImage image has incorrect type. 61 < DATE><TIME>|<HOST>|E|pmSourceLocalSky (FILE:LINENO)61 <HOST>|E|pmSourceLocalSky (FILE:LINENO) 62 62 Unallowable operation: peak is NULL. 63 < DATE><TIME>|<HOST>|E|pmSourceLocalSky (FILE:LINENO)63 <HOST>|E|pmSourceLocalSky (FILE:LINENO) 64 64 Error: (0.0 > innerRadius) (0.000000 -10.000000) 65 < DATE><TIME>|<HOST>|E|pmSourceLocalSky (FILE:LINENO)65 <HOST>|E|pmSourceLocalSky (FILE:LINENO) 66 66 Error: (innerRadius > outerRadius) (10.000000 5.000000) 67 67 … … 74 74 \**********************************************************************************/ 75 75 76 < DATE><TIME>|<HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO)77 Unallowable operation: source is NULL. 78 < DATE><TIME>|<HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO)79 Unallowable operation: psImage image or its data is NULL. 80 < DATE><TIME>|<HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO)76 <HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO) 77 Unallowable operation: source is NULL. 78 <HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO) 79 Unallowable operation: psImage image or its data is NULL. 80 <HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO) 81 81 Unallowable operation: psImage image has incorrect type. 82 < DATE><TIME>|<HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO)82 <HOST>|E|pmSourceSetPixelsCircle (FILE:LINENO) 83 83 Error: (0.0 > radius) (0.000000 -10.000000) 84 84 … … 91 91 \**********************************************************************************/ 92 92 93 < DATE><TIME>|<HOST>|E|pmSourceMoments (FILE:LINENO)94 Unallowable operation: source is NULL. 95 < DATE><TIME>|<HOST>|E|pmSourceMoments (FILE:LINENO)93 <HOST>|E|pmSourceMoments (FILE:LINENO) 94 Unallowable operation: source is NULL. 95 <HOST>|E|pmSourceMoments (FILE:LINENO) 96 96 Error: (0.0 > radius) (0.000000 -10.000000) 97 97 … … 104 104 \**********************************************************************************/ 105 105 106 < DATE><TIME>|<HOST>|E|pmMinLM_Gauss2D (FILE:LINENO)107 Unallowable operation: psVector params or its data is NULL. 108 < DATE><TIME>|<HOST>|E|pmMinLM_Gauss2D (FILE:LINENO)109 Unallowable operation: psVector x or its data is NULL. 110 < DATE><TIME>|<HOST>|E|pmMinLM_PsuedoGauss2D (FILE:LINENO)111 Unallowable operation: psVector params or its data is NULL. 112 < DATE><TIME>|<HOST>|E|pmMinLM_PsuedoGauss2D (FILE:LINENO)113 Unallowable operation: psVector x or its data is NULL. 114 < DATE><TIME>|<HOST>|E|pmMinLM_Wauss2D (FILE:LINENO)115 Unallowable operation: psVector params or its data is NULL. 116 < DATE><TIME>|<HOST>|E|pmMinLM_Wauss2D (FILE:LINENO)117 Unallowable operation: psVector x or its data is NULL. 118 < DATE><TIME>|<HOST>|E|pmMinLM_TwistGauss2D (FILE:LINENO)119 Unallowable operation: psVector params or its data is NULL. 120 < DATE><TIME>|<HOST>|E|pmMinLM_TwistGauss2D (FILE:LINENO)121 Unallowable operation: psVector x or its data is NULL. 122 < DATE><TIME>|<HOST>|E|pmMinLM_Sersic (FILE:LINENO)106 <HOST>|E|pmMinLM_Gauss2D (FILE:LINENO) 107 Unallowable operation: psVector params or its data is NULL. 108 <HOST>|E|pmMinLM_Gauss2D (FILE:LINENO) 109 Unallowable operation: psVector x or its data is NULL. 110 <HOST>|E|pmMinLM_PsuedoGauss2D (FILE:LINENO) 111 Unallowable operation: psVector params or its data is NULL. 112 <HOST>|E|pmMinLM_PsuedoGauss2D (FILE:LINENO) 113 Unallowable operation: psVector x or its data is NULL. 114 <HOST>|E|pmMinLM_Wauss2D (FILE:LINENO) 115 Unallowable operation: psVector params or its data is NULL. 116 <HOST>|E|pmMinLM_Wauss2D (FILE:LINENO) 117 Unallowable operation: psVector x or its data is NULL. 118 <HOST>|E|pmMinLM_TwistGauss2D (FILE:LINENO) 119 Unallowable operation: psVector params or its data is NULL. 120 <HOST>|E|pmMinLM_TwistGauss2D (FILE:LINENO) 121 Unallowable operation: psVector x or its data is NULL. 122 <HOST>|E|pmMinLM_Sersic (FILE:LINENO) 123 123 This function is not implemented yet. 124 < DATE><TIME>|<HOST>|E|pmMinLM_Sersic (FILE:LINENO)125 Unallowable operation: psVector params or its data is NULL. 126 < DATE><TIME>|<HOST>|E|pmMinLM_Sersic (FILE:LINENO)127 Unallowable operation: psVector x or its data is NULL. 128 < DATE><TIME>|<HOST>|E|pmMinLM_SersicCore (FILE:LINENO)124 <HOST>|E|pmMinLM_Sersic (FILE:LINENO) 125 Unallowable operation: psVector params or its data is NULL. 126 <HOST>|E|pmMinLM_Sersic (FILE:LINENO) 127 Unallowable operation: psVector x or its data is NULL. 128 <HOST>|E|pmMinLM_SersicCore (FILE:LINENO) 129 129 This function is not implemented yet. 130 < DATE><TIME>|<HOST>|E|pmMinLM_SersicCore (FILE:LINENO)131 Unallowable operation: psVector params or its data is NULL. 132 < DATE><TIME>|<HOST>|E|pmMinLM_SersicCore (FILE:LINENO)130 <HOST>|E|pmMinLM_SersicCore (FILE:LINENO) 131 Unallowable operation: psVector params or its data is NULL. 132 <HOST>|E|pmMinLM_SersicCore (FILE:LINENO) 133 133 Unallowable operation: psVector x or its data is NULL. 134 134 … … 141 141 \**********************************************************************************/ 142 142 143 < DATE><TIME>|<HOST>|E|pmSourceModelGuess (FILE:LINENO)144 Unallowable operation: source is NULL. 145 < DATE><TIME>|<HOST>|E|pmSourceModelGuess (FILE:LINENO)146 Unallowable operation: psImage image or its data is NULL. 147 < DATE><TIME>|<HOST>|E|pmSourceModelGuess (FILE:LINENO)143 <HOST>|E|pmSourceModelGuess (FILE:LINENO) 144 Unallowable operation: source is NULL. 145 <HOST>|E|pmSourceModelGuess (FILE:LINENO) 146 Unallowable operation: psImage image or its data is NULL. 147 <HOST>|E|pmSourceModelGuess (FILE:LINENO) 148 148 Undefined psModelType 149 < DATE><TIME>|<HOST>|W|pmSourceModelGuess150 WARNING: source->model s was non-NULL; calling psFree(source->models).151 < DATE><TIME>|<HOST>|W|pmSourceModelGuess152 WARNING: source->model s was non-NULL; calling psFree(source->models).153 < DATE><TIME>|<HOST>|W|pmSourceModelGuess154 WARNING: source->model s was non-NULL; calling psFree(source->models).155 < DATE><TIME>|<HOST>|W|pmSourceModelGuess156 WARNING: source->model s was non-NULL; calling psFree(source->models).157 < DATE><TIME>|<HOST>|W|pmSourceModelGuess158 WARNING: source->model s was non-NULL; calling psFree(source->models).149 <HOST>|W|pmSourceModelGuess 150 WARNING: source->modelPSF was non-NULL; calling psFree(source->modelPSF). 151 <HOST>|W|pmSourceModelGuess 152 WARNING: source->modelPSF was non-NULL; calling psFree(source->modelPSF). 153 <HOST>|W|pmSourceModelGuess 154 WARNING: source->modelPSF was non-NULL; calling psFree(source->modelPSF). 155 <HOST>|W|pmSourceModelGuess 156 WARNING: source->modelPSF was non-NULL; calling psFree(source->modelPSF). 157 <HOST>|W|pmSourceModelGuess 158 WARNING: source->modelPSF was non-NULL; calling psFree(source->modelPSF). 159 159 160 160 ---> TESTPOINT PASSED (Test Point Driver{pmObjects: pmSourceModelGuess()} | tst_pmObjects01.c) … … 166 166 \**********************************************************************************/ 167 167 168 < DATE><TIME>|<HOST>|E|pmSourceContour (FILE:LINENO)169 Unallowable operation: source is NULL. 170 < DATE><TIME>|<HOST>|E|pmSourceContour (FILE:LINENO)168 <HOST>|E|pmSourceContour (FILE:LINENO) 169 Unallowable operation: source is NULL. 170 <HOST>|E|pmSourceContour (FILE:LINENO) 171 171 Unallowable operation: image is NULL. 172 172 … … 179 179 \**********************************************************************************/ 180 180 181 < DATE><TIME>|<HOST>|E|sourceAddOrSubModel (FILE:LINENO)182 Unallowable operation: psImage image or its data is NULL. 183 < DATE><TIME>|<HOST>|E|sourceAddOrSubModel (FILE:LINENO)181 <HOST>|E|sourceAddOrSubModel (FILE:LINENO) 182 Unallowable operation: psImage image or its data is NULL. 183 <HOST>|E|sourceAddOrSubModel (FILE:LINENO) 184 184 Unallowable operation: src is NULL. 185 185 … … 192 192 \**********************************************************************************/ 193 193 194 < DATE><TIME>|<HOST>|E|sourceAddOrSubModel (FILE:LINENO)195 Unallowable operation: psImage image or its data is NULL. 196 < DATE><TIME>|<HOST>|E|sourceAddOrSubModel (FILE:LINENO)194 <HOST>|E|sourceAddOrSubModel (FILE:LINENO) 195 Unallowable operation: psImage image or its data is NULL. 196 <HOST>|E|sourceAddOrSubModel (FILE:LINENO) 197 197 Unallowable operation: src is NULL. 198 198 … … 205 205 \**********************************************************************************/ 206 206 207 < DATE><TIME>|<HOST>|E|pmSourceFitModel (FILE:LINENO)208 Unallowable operation: psImage image or its data is NULL. 209 < DATE><TIME>|<HOST>|E|pmSourceFitModel (FILE:LINENO)207 <HOST>|E|pmSourceFitModel (FILE:LINENO) 208 Unallowable operation: psImage image or its data is NULL. 209 <HOST>|E|pmSourceFitModel (FILE:LINENO) 210 210 Unallowable operation: source is NULL. 211 211 -
trunk/psModules/test/verified/tst_pmObjects01.stdout
r4228 r4770 81 81 Calling pmSourceLocalSky with wrong-type psImage. Should generate error and return NULL. 82 82 ---------------------------------------------------------------------------------- 83 Calling pmSourceLocalSky with NULL p sPeak. Should generate error and return NULL.83 Calling pmSourceLocalSky with NULL pmPeak. Should generate error and return NULL. 84 84 ---------------------------------------------------------------------------------- 85 85 Calling pmSourceLocalSky with innerRadius<0.0. Should generate error and return NULL. … … 90 90 ---------------------------------------------------------------------------------- 91 91 ---------------------------------------------------------------------------------- 92 Calling pmSourceSetPixelsCircle with NULL p sSource. Should generate error and return NULL.92 Calling pmSourceSetPixelsCircle with NULL pmSource. Should generate error and return NULL. 93 93 ---------------------------------------------------------------------------------- 94 94 Calling pmSourceSetPixelsCircle with NULL psImage. Should generate error and return NULL. … … 101 101 ---------------------------------------------------------------------------------- 102 102 ---------------------------------------------------------------------------------- 103 Calling pmSourceMoments with NULL p sSource. Should generate error and return NULL.103 Calling pmSourceMoments with NULL pmSource. Should generate error and return NULL. 104 104 ---------------------------------------------------------------------------------- 105 105 Calling pmSourceMoments with radius < 0.0. Should generate error and return NULL. … … 143 143 Calling pmSourceLocalSky with valid data. 144 144 ---------------------------------------------------------------------------------- 145 Calling pmSourceModelGuess with NULL p sSource. Should generate error, return FALSE.145 Calling pmSourceModelGuess with NULL pmSource. Should generate error, return FALSE. 146 146 ---------------------------------------------------------------------------------- 147 147 Calling pmSourceModelGuess with NULL psImage. Should generate error, return FALSE. … … 162 162 Calling pmSourceLocalSky with valid data. 163 163 ---------------------------------------------------------------------------------- 164 Calling pmSourceContour with NULL p sSource . Should generate error, return NULL.164 Calling pmSourceContour with NULL pmSource . Should generate error, return NULL. 165 165 ---------------------------------------------------------------------------------- 166 166 Calling pmSourceContour with NULL psImage . Should generate error, return NULL. … … 183 183 Calling pmSourceFitModel with NULL psImage. Should generate error, return FALSE. 184 184 ---------------------------------------------------------------------------------- 185 Calling pmSourceFitModel with NULL p sSource. Should generate error, return FALSE.185 Calling pmSourceFitModel with NULL pmSource. Should generate error, return FALSE. 186 186 ---------------------------------------------------------------------------------- 187 187 Calling pmSourceFitModel with acceptable data. -
trunk/psModules/test/verified/tst_pmSubtractSky.stderr
r3623 r4770 5 5 \**********************************************************************************/ 6 6 7 < DATE><TIME>|<HOST>|W|p_psVectorSampleStdev7 <HOST>|W|p_psVectorSampleStdev 8 8 WARNING: p_psVectorSampleStdev(): only one valid psVector elements (1). Setting stats->sampleStdev = 0.0. 9 < DATE><TIME>|<HOST>|W|ImageFitPolynomial9 <HOST>|W|ImageFitPolynomial 10 10 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension. 11 < DATE><TIME>|<HOST>|W|ImageFitPolynomial11 <HOST>|W|ImageFitPolynomial 12 12 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension. 13 < DATE><TIME>|<HOST>|W|ImageFitPolynomial13 <HOST>|W|ImageFitPolynomial 14 14 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension. 15 < DATE><TIME>|<HOST>|W|ImageFitPolynomial15 <HOST>|W|ImageFitPolynomial 16 16 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension. 17 < DATE><TIME>|<HOST>|W|p_psVectorSampleStdev17 <HOST>|W|p_psVectorSampleStdev 18 18 WARNING: p_psVectorSampleStdev(): only one valid psVector elements (1). Setting stats->sampleStdev = 0.0. 19 < DATE><TIME>|<HOST>|W|ImageFitPolynomial19 <HOST>|W|ImageFitPolynomial 20 20 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension. 21 < DATE><TIME>|<HOST>|W|ImageFitPolynomial21 <HOST>|W|ImageFitPolynomial 22 22 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension. 23 < DATE><TIME>|<HOST>|W|ImageFitPolynomial23 <HOST>|W|ImageFitPolynomial 24 24 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension. 25 < DATE><TIME>|<HOST>|W|ImageFitPolynomial25 <HOST>|W|ImageFitPolynomial 26 26 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension. 27 < DATE><TIME>|<HOST>|W|ImageFitPolynomial27 <HOST>|W|ImageFitPolynomial 28 28 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension. 29 < DATE><TIME>|<HOST>|W|ImageFitPolynomial29 <HOST>|W|ImageFitPolynomial 30 30 WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension. 31 31 … … 38 38 \**********************************************************************************/ 39 39 40 < DATE><TIME>|<HOST>|E|pmSubtractSky (FILE:LINENO)40 <HOST>|E|pmSubtractSky (FILE:LINENO) 41 41 Unallowable operation: psReadout in or its data is NULL. 42 < DATE><TIME>|<HOST>|E|pmSubtractSky (FILE:LINENO)42 <HOST>|E|pmSubtractSky (FILE:LINENO) 43 43 Unallowable operation: psReadout in or its data is NULL. 44 < DATE><TIME>|<HOST>|E|pmSubtractSky (FILE:LINENO)44 <HOST>|E|pmSubtractSky (FILE:LINENO) 45 45 Unallowable operation: psImage in has incorrect type. 46 < DATE><TIME>|<HOST>|W|pmSubtractSky46 <HOST>|W|pmSubtractSky 47 47 WARNING: pmSubtractSky(): input parameter stats is NULL 48 < DATE><TIME>|<HOST>|W|pmSubtractSky48 <HOST>|W|pmSubtractSky 49 49 WARNING: pmSubtractSky(): no stats->options was requested 50 < DATE><TIME>|<HOST>|W|pmSubtractSky50 <HOST>|W|pmSubtractSky 51 51 WARNING: Multiple statistical options have been requested. 52 < DATE><TIME>|<HOST>|W|pmSubtractSky52 <HOST>|W|pmSubtractSky 53 53 WARNING: pmSubtractSky(): binFactor is 0 54 < DATE><TIME>|<HOST>|W|pmSubtractSky54 <HOST>|W|pmSubtractSky 55 55 WARNING: pmSubtractSky(): binFactor is -1 56 < DATE><TIME>|<HOST>|W|pmSubtractSky56 <HOST>|W|pmSubtractSky 57 57 WARNING: pmSubtractSky(): clipSD is -1.000000 58 < DATE><TIME>|<HOST>|E|pmSubtractSky (FILE:LINENO)58 <HOST>|E|pmSubtractSky (FILE:LINENO) 59 59 psFit is unallowable (54321). Returning in image. 60 60 -
trunk/psModules/test/verified/tst_pmSubtractSky.stdout
r2945 r4770 176 176 177 177 ---------------------------------------------------------------- 178 Calling pmSubtractSky() with NULL p sReadout. Should error.179 180 ---------------------------------------------------------------- 181 Calling pmSubtractSky() with NULL p sReadout->image. Should error.182 183 ---------------------------------------------------------------- 184 Calling pmSubtractSky() with PS_TYPE_F64 p sReadout->image. Should error.178 Calling pmSubtractSky() with NULL pmReadout. Should error. 179 180 ---------------------------------------------------------------- 181 Calling pmSubtractSky() with NULL pmReadout->image. Should error. 182 183 ---------------------------------------------------------------- 184 Calling pmSubtractSky() with PS_TYPE_F64 pmReadout->image. Should error. 185 185 186 186 ----------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.
