Changeset 4191 for trunk/psLib/test/dataIO/tst_psFits.c
- Timestamp:
- Jun 9, 2005, 9:40:51 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/dataIO/tst_psFits.c (modified) (8 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;
Note:
See TracChangeset
for help on using the changeset viewer.
