Changeset 2857
- Timestamp:
- Dec 30, 2004, 12:22:00 PM (22 years ago)
- Location:
- trunk/psModules
- Files:
-
- 5 edited
-
src/pmNonLinear.c (modified) (5 diffs)
-
src/pmReadoutCombine.c (modified) (9 diffs)
-
src/pmSubtractBias.c (modified) (19 diffs)
-
src/pmSubtractSky.c (modified) (10 diffs)
-
test/tst_pmNonLinear.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmNonLinear.c
r2481 r2857 3 3 * Provides polynomial or table lookup non-linearity corrections to readouts. 4 4 * 5 * @author G eorge Gusciora, MHPCC5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-1 1-25 02:54:45$7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-12-30 22:22:00 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 31 31 const psPolynomial1D *coeff) 32 32 { 33 int i;34 int j;35 36 33 PS_PTR_CHECK_NULL(in,NULL); 37 34 PS_PTR_CHECK_NULL(in->image, NULL); 38 35 PS_PTR_CHECK_NULL(coeff,NULL); 36 37 psS32 i; 38 psS32 j; 39 39 40 40 for (i=0;i<(in->image)->numRows;i++) { … … 63 63 PS_PTR_CHECK_NULL(outFlux,NULL); 64 64 65 inti;66 intj;67 inttableSize = inFlux->n;68 intbinNum;65 psS32 i; 66 psS32 j; 67 psS32 tableSize = inFlux->n; 68 psS32 binNum; 69 69 psScalar x; 70 intnumPixels = 0;71 floatslope;70 psS32 numPixels = 0; 71 psF32 slope; 72 72 73 73 x.type.type = PS_TYPE_F32; 74 74 if (inFlux->n != outFlux->n) { 75 // XXX: psWarning("pmNonLinearityLookup(): input vectors have different size");76 75 tableSize = PS_MIN(inFlux->n, outFlux->n); 76 psLogMsg(__func__, PS_LOG_WARN, 77 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (%d, %d)\n", inFlux->n, outFlux->n); 77 78 } 78 79 if (inFlux->n < 2) { 79 // XXX: psWarning("pmNonLinearityLookup(): input vector less than 2 elements");80 psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): input vector less than 2 elements. Returning in image."); 80 81 return(in); 81 82 } … … 96 97 97 98 numPixels++; 99 } else if (binNum < -2) { 100 // We get here if there was some other problem. 101 psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): Could not perform p_psVectorBinDisect(). Returning in image."); 102 return(in); 103 numPixels++; 98 104 } else { 99 105 // Perform linear interpolation. … … 106 112 } 107 113 if (numPixels > 0) { 108 // XXX: psWarning("Warning: pmNonLinearityLookup(): %d pixels outside table.", numPixels); 114 psLogMsg(__func__, PS_LOG_WARN, 115 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): %d pixels outside table.", numPixels); 109 116 } 110 117 return(in); -
trunk/psModules/src/pmReadoutCombine.c
r2832 r2857 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-12- 27 23:16:51$7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-12-30 22:22:00 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 82 82 if (1 < DetermineNumBits(params->stats->options)) { 83 83 psError(PS_ERR_UNKNOWN, true, 84 "Multiple statistical options have been requested. \n");84 "Multiple statistical options have been requested. Returning NULL.\n"); 85 85 return(NULL); 86 86 } … … 128 128 PS_VECTOR_CHECK_TYPE(zero, PS_TYPE_F32, NULL); 129 129 if (numInputs > zero->n) { 130 psError(PS_ERR_UNKNOWN, true, "zero vector has incorrect size (%d) \n", zero->n);130 psError(PS_ERR_UNKNOWN, true, "zero vector has incorrect size (%d). Returning NULL.\n", zero->n); 131 131 return(NULL); 132 132 } else if (numInputs < zero->n) { … … 140 140 PS_VECTOR_CHECK_TYPE(scale, PS_TYPE_F32, NULL); 141 141 if (numInputs > scale->n) { 142 psError(PS_ERR_UNKNOWN, true, "scale vector has incorrect size (%d) \n", scale->n);142 psError(PS_ERR_UNKNOWN, true, "scale vector has incorrect size (%d). Returning NULL.\n", scale->n); 143 143 return(NULL); 144 144 } else if (numInputs < scale->n) { … … 163 163 ((output->row0 + output->numRows) < maxInputRows)) { 164 164 psError(PS_ERR_UNKNOWN, true, 165 "Output image (%d, %d) is too small to hold combined images. \n",165 "Output image (%d, %d) is too small to hold combined images. Returning NULL.\n", 166 166 output->row0 + output->numRows, 167 167 output->col0 + output->numCols); … … 171 171 if ((output->col0 > minInputCols) || (output->row0 > minInputRows)) { 172 172 psError(PS_ERR_UNKNOWN, true, 173 "Output image offset is larger then input image offset. \n");173 "Output image offset is larger then input image offset. Returning NULL.\n"); 174 174 return(NULL); 175 175 } … … 313 313 } 314 314 // Calculate the specified statistic on the stack of pixels. 315 stats = psVectorStats(stats, 316 tmpPixels, 317 tmpPixelErrors, 318 tmpPixelMaskNKeep, 319 1); 315 psStats *rc = psVectorStats(stats, 316 tmpPixels, 317 tmpPixelErrors, 318 tmpPixelMaskNKeep, 319 1); 320 if (rc == NULL) { 321 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning NULL.\n"); 322 return(NULL); 323 } 320 324 } else { 321 325 if (scale != NULL) { … … 333 337 334 338 // Calculate the specified statistic on the stack of pixels. 335 stats = psVectorStats(stats, 336 tmpPixels, 337 NULL, 338 tmpPixelMaskNKeep, 339 1); 339 psStats *rc = psVectorStats(stats, 340 tmpPixels, 341 NULL, 342 tmpPixelMaskNKeep, 343 1); 344 if (rc == NULL) { 345 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning NULL.\n"); 346 return(NULL); 347 } 340 348 } 341 349 … … 344 352 double statValue; 345 353 if (!p_psGetStatValue(stats, &statValue)) { 346 psError(PS_ERR_UNKNOWN, true, "Could not determine stats value. \n");354 psError(PS_ERR_UNKNOWN, true, "Could not determine stats value. Returning NULL.\n"); 347 355 return(NULL); 348 356 } else { -
trunk/psModules/src/pmSubtractBias.c
r2856 r2857 6 6 * @author George Gusciora, MHPCC 7 7 * 8 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12-30 2 1:35:03$8 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-30 22:22:00 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 40 40 if (((in->image)->numRows + in->row0 - bias->row0) > (bias->image)->numRows) { 41 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough rows \n");41 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough rows. Returning in image\n"); 42 42 return(in); 43 43 } 44 44 if (((in->image)->numCols + in->row0 - bias->row0) > (bias->image)->numCols) { 45 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough columns \n");45 psError(PS_ERR_UNKNOWN,true, "bias image does not have enough columns. Returning in image\n"); 46 46 return(in); 47 47 } … … 129 129 130 130 if (numOptions == 0) { 131 psError(PS_ERR_UNKNOWN,true, "No statistics options have been specified \n");131 psError(PS_ERR_UNKNOWN,true, "No statistics options have been specified.\n"); 132 132 } 133 133 if (numOptions != 1) { … … 225 225 226 226 } else { 227 psError(PS_ERR_UNKNOWN, true, "unknown fit type\n"); 227 psError(PS_ERR_UNKNOWN, true, "unknown fit type. Returning NULL.\n"); 228 psFree(newVec); 229 return(NULL); 228 230 } 229 231 … … 251 253 PS_READOUT_CHECK_TYPE(in, PS_TYPE_F32, NULL); 252 254 if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) { 253 psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE) \n");255 psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE). Returning in image\n"); 254 256 return(in); 255 257 } … … 260 262 (fit != PM_OVERSCAN_COLUMNS) && 261 263 (fit != PM_OVERSCAN_ALL)) { 262 psError(PS_ERR_UNKNOWN, true, "fit is unallowable (%d) \n", fit);264 psError(PS_ERR_UNKNOWN, true, "fit is unallowable (%d). Returning in image.\n", fit); 263 265 return(in); 264 266 } … … 268 270 (overScanAxis != PM_OVERSCAN_COLUMNS) && 269 271 (overScanAxis != PM_OVERSCAN_ALL)) { 270 psError(PS_ERR_UNKNOWN, true, "overScanAxis is unallowable (%d) \n", overScanAxis);272 psError(PS_ERR_UNKNOWN, true, "overScanAxis is unallowable (%d). Returning in image.\n", overScanAxis); 271 273 return(in); 272 274 } … … 302 304 if (fit != PM_FIT_NONE) { 303 305 psLogMsg(__func__, PS_LOG_WARN, 304 "WARNING: pmSubtractBias.(): overScanAxis equals NONE, and fit does not equal NONE \n");306 "WARNING: pmSubtractBias.(): overScanAxis equals NONE, and fit does not equal NONE. Proceeding to full fram subtraction.\n"); 305 307 } 306 308 307 309 if (overscans != NULL) { 308 310 psLogMsg(__func__, PS_LOG_WARN, 309 "WARNING: pmSubtractBias.(): overScanAxis equals NONE and overscans does not equal NULL \n");311 "WARNING: pmSubtractBias.(): overScanAxis equals NONE and overscans does not equal NULL. Proceeding to full fram subtraction.\n"); 310 312 } 311 313 return(psSubtractFrame(in, bias)); … … 314 316 if ((overScanAxis == PM_OVERSCAN_ALL) && (fit != PM_FIT_NONE)) { 315 317 psLogMsg(__func__, PS_LOG_WARN, 316 "WARNING: pmSubtractBias.(): overScanAxis equals ALL, and fit does not equal NONE \n");318 "WARNING: pmSubtractBias.(): overScanAxis equals ALL, and fit does not equal NONE. Proceeding with the rest of the module.\n"); 317 319 } 318 320 … … 321 323 // We subtract each overscan region from the image data. 322 324 // 323 // XXX: Do we generate a single stat from all the overscan regions, and324 // subtract that from the input image? Or do we generate a single stat325 // from each overscan region, and subtract them from the input image?326 // The SDR is ambiguous.327 325 if (overScanAxis == PM_OVERSCAN_ALL) { 328 326 tmpOverscan = (psListElem *) overscans->head; 329 327 while (NULL != tmpOverscan) { 330 328 myOverscanImage = (psImage *) tmpOverscan->data; 331 psImageStats(myStats, myOverscanImage, NULL, 0xffffffff); 332 p_psGetStatValue(myStats, &statValue); 329 psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff); 330 if (rc == NULL) { 331 psError(PS_ERR_UNKNOWN, false, "psImageStats(): could not perform requested statistical operation. Returning in image.\n"); 332 return(in); 333 } 334 if (false == p_psGetStatValue(myStats, &statValue)) { 335 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine result from requested statistical operation. Returning in image.\n"); 336 return(in); 337 } 333 338 p_psImageSubtractScalar(in->image, statValue); 334 339 … … 340 345 // This check is redundant with above code. 341 346 if (!((overScanAxis == PM_OVERSCAN_ROWS) || (overScanAxis == PM_OVERSCAN_COLUMNS))) { 342 psError(PS_ERR_UNKNOWN, true, "overScanAxis is unallowable (%d) \n", overScanAxis);347 psError(PS_ERR_UNKNOWN, true, "overScanAxis is unallowable (%d).\nReturning in image.\n", overScanAxis); 343 348 return(in); 344 349 } … … 371 376 tmpRow->data.F32[j] = myOverscanImage->data.F32[j][i]; 372 377 } 373 myStats = psVectorStats(myStats, tmpRow, NULL, NULL, 0); 374 p_psGetStatValue(myStats, &statValue); 378 psStats *rc = psVectorStats(myStats, tmpRow, NULL, NULL, 0); 379 if (rc == NULL) { 380 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning in image.\n"); 381 return(in); 382 } 383 if (false == p_psGetStatValue(rc, &statValue)) { 384 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine result from requested statistical operation. Returning in image.\n"); 385 return(in); 386 } 375 387 overscanVector->data.F32[i] = statValue; 376 388 } … … 383 395 in->image->numCols, 384 396 fitSpec, fit); 397 if (newVec == NULL) { 398 psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector(): could not scale the overscan vector. Returning in image.\n"); 399 return(in); 400 } 385 401 psFree(overscanVector); 386 402 overscanVector = newVec; 387 403 } else { 388 psError(PS_ERR_UNKNOWN, true, "Don't know how to scale the overscan vector. Set fit to PM_FIT_SPLINE or PM_FIT_POLYNOMIAL. \n");404 psError(PS_ERR_UNKNOWN, true, "Don't know how to scale the overscan vector. Set fit to PM_FIT_SPLINE or PM_FIT_POLYNOMIAL. Returning in image.\n"); 389 405 psFree(overscanVector); 390 406 return(in); … … 414 430 tmpCol->data.F32[j] = myOverscanImage->data.F32[i][j]; 415 431 } 416 myStats = psVectorStats(myStats, tmpCol, NULL, NULL, 0); 417 p_psGetStatValue(myStats, &statValue); 432 psStats *rc = psVectorStats(myStats, tmpCol, NULL, NULL, 0); 433 if (rc == NULL) { 434 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning in image.\n"); 435 return(in); 436 } 437 if (false == p_psGetStatValue(rc, &statValue)) { 438 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine result from requested statistical operation. Returning in image.\n"); 439 return(in); 440 } 418 441 overscanVector->data.F32[i] = statValue; 419 442 } … … 426 449 in->image->numRows, 427 450 fitSpec, fit); 451 if (newVec == NULL) { 452 psError(PS_ERR_UNKNOWN, false, "ScaleOverscanVector(): could not scale the overscan vector. Returning in image.\n"); 453 return(in); 454 } 428 455 psFree(overscanVector); 429 456 overscanVector = newVec; 430 457 } else { 431 psError(PS_ERR_UNKNOWN, true, "Don't know how to scale the overscan vector. Set fit to PM_FIT_SPLINE or PM_FIT_POLYNOMIAL. \n");458 psError(PS_ERR_UNKNOWN, true, "Don't know how to scale the overscan vector. Set fit to PM_FIT_SPLINE or PM_FIT_POLYNOMIAL. Returning in image.\n"); 432 459 psFree(overscanVector); 433 460 return(in); … … 456 483 } 457 484 } 458 myStats = psVectorStats(myStats, binVec, NULL, NULL, 0); 459 p_psGetStatValue(myStats, &statValue); 485 psStats *rc = psVectorStats(myStats, binVec, NULL, NULL, 0); 486 if (rc == NULL) { 487 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning in image.\n"); 488 return(in); 489 } 490 if (false == p_psGetStatValue(rc, &statValue)) { 491 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine result from requested statistical operation. Returning in image.\n"); 492 return(in); 493 } 460 494 myBin->data.F32[i] = statValue; 461 495 } … … 486 520 myPoly = psVectorFitPolynomial1D(myPoly, NULL, overscanVector, NULL); 487 521 if (myPoly == NULL) { 488 psError(PS_ERR_UNKNOWN, false, "Could not fit a polynomial to overscan vector. \n");522 psError(PS_ERR_UNKNOWN, false, "Could not fit a polynomial to overscan vector. Returning in image.\n"); 489 523 psFree(overscanVector); 490 524 return(in); … … 494 528 mySpline = psVectorFitSpline1D(mySpline, NULL, overscanVector, NULL); 495 529 if (mySpline == NULL) { 496 psError(PS_ERR_UNKNOWN, false, "Could not fit a spline to overscan vector. \n");530 psError(PS_ERR_UNKNOWN, false, "Could not fit a spline to overscan vector. Returning in image.\n"); 497 531 psFree(overscanVector); 498 532 return(in); … … 535 569 } 536 570 } else { 571 // 537 572 // If we get here, then no polynomials were fit to the overscan 538 573 // vector. We simply subtract it, taking into account binning, 539 574 // from the image. 575 // 540 576 541 577 // -
trunk/psModules/src/pmSubtractSky.c
r2848 r2857 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-12- 29 22:44:33$8 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-12-30 22:22:00 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 106 106 } 107 107 } 108 myStats = psVectorStats(myStats, binVector, NULL, binMask, 1); 108 psStats *rc1 = psVectorStats(myStats, binVector, NULL, binMask, 1); 109 if (rc1 == NULL) { 110 psError(PS_ERR_UNKNOWN, false, "psVectorStats(): could not perform requested statistical operation. Returning in image.\n"); 111 return(origImage); 112 } 109 113 psF64 statValue; 110 psBool rc = p_psGetStatValue( myStats, &statValue);114 psBool rc = p_psGetStatValue(rc1, &statValue); 111 115 112 116 if (rc == true) { … … 427 431 (fit != PM_FIT_POLYNOMIAL) && 428 432 (fit != PM_FIT_SPLINE)) { 429 psError(PS_ERR_UNKNOWN, true, "psFit is unallowable (%d) \n", fit);433 psError(PS_ERR_UNKNOWN, true, "psFit is unallowable (%d). Returning in image.\n", fit); 430 434 return(in); 431 435 } … … 436 440 if ((fitSpec == NULL) || 437 441 ((fit == PM_FIT_NONE) || (fit == PM_FIT_SPLINE))) { 442 psLogMsg(__func__, PS_LOG_WARN, "Fit specs are poorly defined. Returning in image.\n"); 438 443 return(in); 439 444 } … … 452 457 psLogMsg(__func__, PS_LOG_WARN, "WARNING: Multiple statistical options have been requested.\n"); 453 458 statOptions = getHighestPriorityStatOption(statOptions); 454 459 if (statOptions == -1) { 460 psError(PS_ERR_UNKNOWN, true, "Not allowable stats->option was specified. Returning in image.\n"); 461 return(in); 462 } 455 463 // Save old input "stats" parameter. 456 464 oldStatOptions = stats->options; … … 483 491 // and a mask. 484 492 binnedImage = psImageCopy(binnedImage, origImage, PS_TYPE_F32); 493 if (binnedImage == NULL) { 494 psError(PS_ERR_UNKNOWN, false, "psImageCopy() returned NULL. Returning in image.\n"); 495 return(in); 496 } 497 485 498 if (in->mask != NULL) { 486 499 binnedMaskImage = psImageCopy(binnedMaskImage, in->mask, PS_TYPE_U8); 500 if (binnedMaskImage == NULL) { 501 psError(PS_ERR_UNKNOWN, false, "psImageCopy() returned NULL. Returning in image.\n"); 502 psFree(binnedImage); 503 return(in); 504 } 487 505 } else { 488 506 binnedMaskImage = psImageAlloc(binnedImage->numCols, … … 493 511 } else { 494 512 binnedImage = psImageRebin(NULL, origImage, in->mask, 0, binFactor, stats); 513 if (binnedImage == NULL) { 514 psError(PS_ERR_UNKNOWN, false, "psImageRebin() returned NULL. Returning in image.\n"); 515 return(in); 516 } 495 517 binnedMaskImage = psImageAlloc(binnedImage->numCols, 496 518 binnedImage->numRows, … … 512 534 psF64 binnedStdev; 513 535 psStats *myStats = psStatsAlloc(PS_STAT_SAMPLE_MEAN); 514 myStats = psImageStats(myStats, binnedImage, NULL, 0); 515 p_psGetStatValue(myStats, &binnedMean); 536 psStats *rc = psImageStats(myStats, binnedImage, NULL, 0); 537 if (rc == NULL) { 538 psError(PS_ERR_UNKNOWN, false, "psImageStats(): could not perform requested statistical operation. Returning in image.\n"); 539 return(in); 540 } 541 if (false == p_psGetStatValue(rc, &binnedMean)) { 542 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine requested statistical operation. Returning in image.\n"); 543 return(in); 544 } 516 545 psTrace(".psModule.pmSubtractSky", 6, 517 546 "binned Mean is %f\n", binnedMean); 518 547 519 548 myStats->options = PS_STAT_SAMPLE_STDEV; 520 myStats = psImageStats(myStats, binnedImage, NULL, 0); 521 p_psGetStatValue(myStats, &binnedStdev); 549 rc = psImageStats(myStats, binnedImage, NULL, 0); 550 if (rc == NULL) { 551 psError(PS_ERR_UNKNOWN, false, "psImageStats(): could not perform requested statistical operation. Returning in image.\n"); 552 return(in); 553 } 554 if (false == p_psGetStatValue(myStats, &binnedStdev)) { 555 psError(PS_ERR_UNKNOWN, false, "p_psGetStatValue(): could not determine requested statistical operation. Returning in image.\n"); 556 return(in); 557 } 522 558 psFree(myStats); 523 559 psTrace(".psModule.pmSubtractSky", 6, … … 551 587 // Set the pixels in the binned image to that of the polynomial. 552 588 binnedImage = psImageEvalPolynomial(binnedImage, myPoly); 589 if (binnedImage == NULL) { 590 psError(PS_ERR_UNKNOWN, false, "psImageEvalPolynomial() returned NULL. Returning in image.\n"); 591 psFree(binnedMaskImage); 592 if (!((binFactor <= 1) || (stats == NULL))) { 593 psFree(binnedImage); 594 } 595 if (oldStatOptions != 0) { 596 stats->options = statOptions; 597 } 598 return(in); 599 } 553 600 } else { 554 601 psLogMsg(__func__, PS_LOG_WARN, … … 565 612 } else { 566 613 // We shouldn't get here since we check this above. 567 psError(PS_ERR_UNKNOWN, true, "Unallowable fit type."); 614 psError(PS_ERR_UNKNOWN, true, "Unallowable fit type. Returning in image.\n"); 615 psFree(binnedMaskImage); 616 if (!((binFactor <= 1) || (stats == NULL))) { 617 psFree(binnedImage); 618 } 619 if (oldStatOptions != 0) { 620 stats->options = statOptions; 621 } 622 return(in); 568 623 } 569 624 -
trunk/psModules/test/tst_pmNonLinear.c
r2589 r2857 13 13 * @author GLG, MHPCC 14 14 * 15 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-12- 01 22:08:15$15 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-12-30 22:22:00 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 46 46 int testStatus = 0; 47 47 psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 48 psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage); 48 // psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage); 49 psReadout *myReadout = psReadoutAlloc(); 50 myReadout->image = myImage; 49 51 psPolynomial1D *myPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD); 50 52 myPoly->coeff[1] = 1.0; … … 95 97 int tableSize = PS_MAX(numCols, numRows)*2; 96 98 psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32); 97 psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage); 99 // psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage); 100 psReadout *myReadout = psReadoutAlloc(); 101 myReadout->image = myImage; 98 102 psVector *in = psVectorAlloc(tableSize, PS_TYPE_F32); 99 103 psVector *out = psVectorAlloc(tableSize, PS_TYPE_F32);
Note:
See TracChangeset
for help on using the changeset viewer.
