Changeset 15908
- Timestamp:
- Dec 24, 2007, 11:00:07 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFits.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFits.c
r15625 r15908 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.7 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2007-1 1-16 00:14:49$9 * @version $Revision: 1.75 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-12-24 21:00:07 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 570 570 } 571 571 572 // if we are setting a trivial compression (NONE), don't bother with the other parameters 573 if (type == PS_FITS_COMPRESS_NONE) return true; 574 572 575 // convert a psVector into the (long *) array that cfitsio requires 573 576 psVector *dim = NULL; … … 592 595 } 593 596 594 if (fits_set_noise_bits(fits->fd, noisebits, &status)) { 595 fits_set_compression_type(fits->fd, 0x0, &status); 596 char fitsErr[MAX_STRING_LENGTH]; 597 fits_get_errstatus(status, fitsErr); 598 psError(PS_ERR_BAD_FITS, true, 599 "Error while configuring compression. CFITSIO error: %s", fitsErr); 600 return false; 597 // noise bits are irrelevant (not allowed) for PLIO. XXX actually, it is the data type 598 // that is the restriction; data must be 32 or 64 bit for noise bits to be valid. 599 if (type != PS_FITS_COMPRESS_PLIO) { 600 if (fits_set_noise_bits(fits->fd, noisebits, &status)) { 601 fits_set_compression_type(fits->fd, 0x0, &status); 602 char fitsErr[MAX_STRING_LENGTH]; 603 fits_get_errstatus(status, fitsErr); 604 psError(PS_ERR_BAD_FITS, true, 605 "Error while configuring compression. CFITSIO error: %s", fitsErr); 606 return false; 607 } 601 608 } 602 609 … … 776 783 case PS_TYPE_U8: 777 784 bitpix = BYTE_IMG; 785 bzero = -1.0 * INT8_MIN; 778 786 datatype = TBYTE; 779 787 break; … … 781 789 case PS_TYPE_S8: 782 790 bitpix = BYTE_IMG; 783 bzero = INT8_MIN;784 791 datatype = TSBYTE; 785 792 break;
Note:
See TracChangeset
for help on using the changeset viewer.
