Changeset 4770 for trunk/psModules/test/tst_pmSubtractBias.c
- Timestamp:
- Aug 15, 2005, 3:10:36 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmSubtractBias.c (modified) (27 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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++) {
Note:
See TracChangeset
for help on using the changeset viewer.
