Changeset 4191 for trunk/psLib/test
- Timestamp:
- Jun 9, 2005, 9:40:51 AM (21 years ago)
- Location:
- trunk/psLib/test
- Files:
-
- 2 edited
-
dataIO/tst_psFits.c (modified) (8 diffs)
-
image/tst_psImageGeomManip.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/dataIO/tst_psFits.c
r4158 r4191 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-06-0 8 21:07:59$8 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-06-09 19:40:51 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 122 122 extname); 123 123 124 psMetadataAdd(header,PS_LIST_TAIL, "MYSTR", 125 PS_META_STR, 126 "Extension Name", 127 extname); 128 124 129 // set the pixels in the image 125 130 psBinaryOp(image,image,"=",psScalarAlloc(lcv,PS_TYPE_F32)); 126 if (! psFitsWriteImage(fitsFile,header,image,1 , extname) ) {131 if (! psFitsWriteImage(fitsFile,header,image,1) ) { 127 132 psError(PS_ERR_UNKNOWN, false, 128 133 "Could not write image."); … … 155 160 psImage* image = psImageAlloc(16,16,PS_TYPE_F32); 156 161 157 if (! psFitsWriteImage(fitsFile,NULL,image,1 ,"primary") ) {162 if (! psFitsWriteImage(fitsFile,NULL,image,1) ) { 158 163 psError(PS_ERR_UNKNOWN, false, 159 164 "Could not write PHU image."); … … 192 197 } 193 198 194 psFitsWriteTable(fitsFile, NULL, table , "table-1");199 psFitsWriteTable(fitsFile, NULL, table); 195 200 196 201 psFree(table); … … 1275 1280 psFits* fits = psFitsAlloc(filename); \ 1276 1281 psRegion region = {0,0,0,0}; \ 1277 if (! psFitsWriteImage(fits, NULL, img, 2 , "primary")) { \1282 if (! psFitsWriteImage(fits, NULL, img, 2)) { \ 1278 1283 psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \ 1279 1284 return 1; \ … … 1283 1288 return 2; \ 1284 1289 } \ 1285 if (! psFitsWriteImage(fits,NULL, img3, 2 , "extension")) { \1290 if (! psFitsWriteImage(fits,NULL, img3, 2)) { \ 1286 1291 psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \ 1287 1292 return 3; \ … … 1441 1446 psFits* fits = psFitsAlloc("tmpImages/writeTest.fits"); 1442 1447 1443 if (! psFitsWriteImage(fits, NULL, img,1 ,NULL)) {1448 if (! psFitsWriteImage(fits, NULL, img,1)) { 1444 1449 psError(PS_ERR_UNKNOWN, true,"Couldn't write writeTest.fits."); 1445 1450 return 14; … … 1478 1483 */ 1479 1484 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message because input image is null."); 1480 if ( psFitsWriteImage(fits,NULL,NULL, 1 , NULL) ) {1485 if ( psFitsWriteImage(fits,NULL,NULL, 1) ) { 1481 1486 psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image is NULL."); 1482 1487 return 20; -
trunk/psLib/test/image/tst_psImageGeomManip.c
r4128 r4191 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-06-0 7 02:29:44$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-06-09 19:40:51 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 559 559 } 560 560 561 char hduName[80];562 561 psRegion regionAll = psRegionSet(0,0,0,0); 563 562 for (psS32 rot=-180;rot<=180;rot+=45) { 564 563 psImage* oldOut = fOut; 565 564 psImage* oldBiOut = fBiOut; 566 snprintf(hduName, 80, "%+d", rot);567 565 if (rot == 90) { 568 566 radianRot = M_PI_2; … … 590 588 sBiOut = psImageRotate(sBiOut,sImg,radianRot,-1.0,PS_INTERPOLATE_BILINEAR); 591 589 592 if (! psFitsWriteImage(fOutFile, NULL, fOut, 1 , hduName) ) {590 if (! psFitsWriteImage(fOutFile, NULL, fOut, 1) ) { 593 591 psError(PS_ERR_UNKNOWN, true,"Can not write fOut."); 594 592 return 20; 595 593 } 596 if (! psFitsWriteImage(sOutFile, NULL, sOut, 1 , hduName) ) {594 if (! psFitsWriteImage(sOutFile, NULL, sOut, 1) ) { 597 595 psError(PS_ERR_UNKNOWN, true,"Can not write sOut."); 598 596 return 21; 599 597 } 600 if (! psFitsWriteImage(fBiOutFile, NULL, fBiOut, 1 , hduName) ) {598 if (! psFitsWriteImage(fBiOutFile, NULL, fBiOut, 1) ) { 601 599 psError(PS_ERR_UNKNOWN, true,"Can not write fBiOut.fits."); 602 600 return 40; 603 601 } 604 if (! psFitsWriteImage(sBiOutFile, NULL, sBiOut, 1 , hduName) ) {602 if (! psFitsWriteImage(sBiOutFile, NULL, sBiOut, 1) ) { 605 603 psError(PS_ERR_UNKNOWN, true,"Can not write sBiOut.fits."); 606 604 return 41;
Note:
See TracChangeset
for help on using the changeset viewer.
