Changeset 17447 for trunk/psLib/src/fits
- Timestamp:
- Apr 17, 2008, 1:43:03 PM (18 years ago)
- Location:
- trunk/psLib/src/fits
- Files:
-
- 4 edited
-
psFitsFloat.c (modified) (1 diff)
-
psFitsHeader.c (modified) (4 diffs)
-
psFitsImage.c (modified) (5 diffs)
-
psFitsScale.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFitsFloat.c
r16549 r17447 153 153 return NULL; 154 154 } 155 assert(out->type.type == PS_TYPE_F32);155 psAssert(out->type.type == PS_TYPE_F32, "impossible"); 156 156 for (int y = 0; y < numRows; y++) { 157 157 for (int x = 0; x < numCols; x++) { -
trunk/psLib/src/fits/psFitsHeader.c
r17053 r17447 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.4 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2008-0 3-19 20:23:06$9 * @version $Revision: 1.44 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2008-04-17 23:43:02 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include <strings.h> 22 22 23 #include "psAbort.h" 23 24 #include "psAssert.h" 24 25 #include "psFits.h" … … 230 231 ) 231 232 { 232 assert(fits);233 psAssert(fits, "impossible"); 233 234 234 235 psMetadata *header = psMetadataAlloc(); // Header, to return … … 414 415 // Need to look for MULTI, which won't be picked up using the iterator. 415 416 psMetadataItem *multiCheckItem = psMetadataLookup(header, item->name); 416 assert(multiCheckItem);417 psAssert(multiCheckItem, "impossible"); 417 418 unsigned int flag = 0; // Flag to indicate MULTI; otherwise default action 418 419 if (multiCheckItem->type == PS_DATA_METADATA_MULTI) { -
trunk/psLib/src/fits/psFitsImage.c
r16934 r17447 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2008-0 3-11 19:57:41$9 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2008-04-17 23:43:02 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 253 253 ) 254 254 { 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"); 260 260 261 261 *bscale = 1.0; … … 358 358 { 359 359 // 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 size365 assert(!output->parent); // No parents means the buffer is contiguous360 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 366 366 367 367 int anynull = 0; // Are there any NULLs in the data? … … 516 516 if (cfitsioBzero != 0.0) { 517 517 // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash! 518 assert(bzero == 0.0 && bscale == 1.0);518 psAssert(bzero == 0.0 && bscale == 1.0, "impossible"); 519 519 bscale = 1.0; 520 520 bzero = cfitsioBzero; 521 521 } 522 522 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"); 524 524 525 525 int naxis = 3; // Number of axes … … 647 647 if (cfitsioBzero != 0.0) { 648 648 // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash! 649 assert(bzero == 0.0 && bscale == 1.0);649 psAssert(bzero == 0.0 && bscale == 1.0, "impossible"); 650 650 bscale = 1.0; 651 651 bzero = cfitsioBzero; 652 652 } 653 653 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"); 655 655 656 656 //check to see if the HDU has the same datatype -
trunk/psLib/src/fits/psFitsScale.c
r17048 r17447 41 41 ) 42 42 { 43 assert(bscale);44 assert(bzero);45 assert(image);46 assert(options);43 psAssert(bscale, "impossible"); 44 psAssert(bzero, "impossible"); 45 psAssert(image, "impossible"); 46 psAssert(options, "impossible"); 47 47 48 48 double range = pow(2.0, options->bitpix); // Range of values for target BITPIX … … 101 101 ) 102 102 { 103 assert(bscale);104 assert(bzero);105 assert(image);106 assert(options);103 psAssert(bscale, "impossible"); 104 psAssert(bzero, "impossible"); 105 psAssert(image, "impossible"); 106 psAssert(options, "impossible"); 107 107 108 108 // Measure the mean and stdev
Note:
See TracChangeset
for help on using the changeset viewer.
