IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 17, 2008, 1:43:03 PM (18 years ago)
Author:
jhoblitt
Message:

convert assert() to psAssert()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFitsImage.c

    r16934 r17447  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-03-11 19:57:41 $
     9 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-04-17 23:43:02 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    253253                                          )
    254254{
    255     assert(bscale);
    256     assert(bzero);
    257     assert(floatType);
    258     assert(fits);
    259     assert(image);
     255    psAssert(bscale, "impossible");
     256    psAssert(bzero, "impossible");
     257    psAssert(floatType, "impossible");
     258    psAssert(fits, "impossible");
     259    psAssert(image, "impossible");
    260260
    261261    *bscale = 1.0;
     
    358358{
    359359    // n.b., this assumes contiguous image buffer
    360     assert(output);
    361     assert(fits);
    362     assert(info);
    363     assert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1);
    364     assert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1); // Right size
    365     assert(!output->parent);            // No parents means the buffer is contiguous
     360    psAssert(output, "impossible");
     361    psAssert(fits, "impossible");
     362    psAssert(info, "impossible");
     363    psAssert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1, "impossible");
     364    psAssert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1, "impossible"); // Right size
     365    psAssert(!output->parent, "impossible");            // No parents means the buffer is contiguous
    366366
    367367    int anynull = 0;                    // Are there any NULLs in the data?
     
    516516    if (cfitsioBzero != 0.0) {
    517517        // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
    518         assert(bzero == 0.0 && bscale == 1.0);
     518        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
    519519        bscale = 1.0;
    520520        bzero = cfitsioBzero;
    521521    }
    522522    psFitsOptions *options = fits->options; // FITS I/O options
    523     assert(!options || bitPix == options->bitpix || options->bitpix == 0);
     523    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
    524524
    525525    int naxis = 3;                      // Number of axes
     
    647647    if (cfitsioBzero != 0.0) {
    648648        // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
    649         assert(bzero == 0.0 && bscale == 1.0);
     649        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
    650650        bscale = 1.0;
    651651        bzero = cfitsioBzero;
    652652    }
    653653    psFitsOptions *options = fits->options; // FITS I/O options
    654     assert(!options || bitPix == options->bitpix || options->bitpix == 0);
     654    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
    655655
    656656    //check to see if the HDU has the same datatype
Note: See TracChangeset for help on using the changeset viewer.