IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2005, 9:40:51 AM (21 years ago)
Author:
desonia
Message:

removed extname from psFitsWrite* functions (Bug #412).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataIO/tst_psFits.c

    r4158 r4191  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-06-08 21:07:59 $
     8*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-06-09 19:40:51 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    122122                      extname);
    123123
     124        psMetadataAdd(header,PS_LIST_TAIL, "MYSTR",
     125                      PS_META_STR,
     126                      "Extension Name",
     127                      extname);
     128
    124129        // set the pixels in the image
    125130        psBinaryOp(image,image,"=",psScalarAlloc(lcv,PS_TYPE_F32));
    126         if (! psFitsWriteImage(fitsFile,header,image,1, extname) ) {
     131        if (! psFitsWriteImage(fitsFile,header,image,1) ) {
    127132            psError(PS_ERR_UNKNOWN, false,
    128133                    "Could not write image.");
     
    155160    psImage* image = psImageAlloc(16,16,PS_TYPE_F32);
    156161
    157     if (! psFitsWriteImage(fitsFile,NULL,image,1,"primary") ) {
     162    if (! psFitsWriteImage(fitsFile,NULL,image,1) ) {
    158163        psError(PS_ERR_UNKNOWN, false,
    159164                "Could not write PHU image.");
     
    192197    }
    193198
    194     psFitsWriteTable(fitsFile, NULL, table, "table-1");
     199    psFitsWriteTable(fitsFile, NULL, table);
    195200
    196201    psFree(table);
     
    12751280        psFits* fits = psFitsAlloc(filename); \
    12761281        psRegion region = {0,0,0,0}; \
    1277         if (! psFitsWriteImage(fits, NULL, img, 2, "primary")) { \
     1282        if (! psFitsWriteImage(fits, NULL, img, 2)) { \
    12781283            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    12791284            return 1; \
     
    12831288            return 2; \
    12841289        } \
    1285         if (! psFitsWriteImage(fits,NULL, img3, 2, "extension")) { \
     1290        if (! psFitsWriteImage(fits,NULL, img3, 2)) { \
    12861291            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
    12871292            return 3; \
     
    14411446    psFits* fits = psFitsAlloc("tmpImages/writeTest.fits");
    14421447
    1443     if (! psFitsWriteImage(fits, NULL, img,1,NULL)) {
     1448    if (! psFitsWriteImage(fits, NULL, img,1)) {
    14441449        psError(PS_ERR_UNKNOWN, true,"Couldn't write writeTest.fits.");
    14451450        return 14;
     
    14781483    */
    14791484    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) ) {
    14811486        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image is NULL.");
    14821487        return 20;
Note: See TracChangeset for help on using the changeset viewer.