Changeset 14876 for trunk/psLib/src/fits/psFits.c
- Timestamp:
- Sep 17, 2007, 4:33:48 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFits.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFits.c
r14872 r14876 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.6 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2007-09-1 7 23:01:00$9 * @version $Revision: 1.69 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-09-18 02:33:48 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 594 594 } 595 595 596 int status = false; 597 fits_set_compression_type(fits->fd, comptype, &status); 598 if (!status) { 599 goto ERROR; 596 int status = 0; 597 if (fits_set_compression_type(fits->fd, comptype, &status)) { 598 char fitsErr[MAX_STRING_LENGTH]; 599 fits_get_errstatus(status, fitsErr); 600 psError(PS_ERR_BAD_FITS, true, 601 "Error while configuring compression. CFITSIO error: %s", fitsErr); 602 return false; 600 603 } 601 604 … … 612 615 } 613 616 // status check belongs to fits_set_tile_dim() call 614 if (!status) { 615 goto ERROR; 616 } 617 618 fits_set_noise_bits(fits->fd, noisebits, &status); 619 if (!status) { 620 goto ERROR; 621 } 617 if (status) { 618 fits_set_compression_type(fits->fd, 0x0, &status); 619 char fitsErr[MAX_STRING_LENGTH]; 620 fits_get_errstatus(status, fitsErr); 621 psError(PS_ERR_BAD_FITS, true, 622 "Error while configuring compression. CFITSIO error: %s", fitsErr); 623 return false; 624 } 625 626 if (fits_set_noise_bits(fits->fd, noisebits, &status)) { 627 fits_set_compression_type(fits->fd, 0x0, &status); 628 char fitsErr[MAX_STRING_LENGTH]; 629 fits_get_errstatus(status, fitsErr); 630 psError(PS_ERR_BAD_FITS, true, 631 "Error while configuring compression. CFITSIO error: %s", fitsErr); 632 return false; 633 } 634 622 635 #if FITS_HCOMP 623 fits_set_hcomp_scale(fits->fd, scale, &status); 624 if (!status) { 625 goto ERROR; 626 } 627 fits_set_hcomp_smooth(fits->fd, smooth, &status); 628 if (!status) { 629 goto ERROR; 636 if (fits_set_hcomp_scale(fits->fd, scale, &status)) { 637 fits_set_compression_type(fits->fd, 0x0, &status); 638 char fitsErr[MAX_STRING_LENGTH]; 639 fits_get_errstatus(status, fitsErr); 640 psError(PS_ERR_BAD_FITS, true, 641 "Error while configuring compression. CFITSIO error: %s", fitsErr); 642 return false; 643 } 644 if (fits_set_hcomp_smooth(fits->fd, smooth, &status)) { 645 fits_set_compression_type(fits->fd, 0x0, &status); 646 char fitsErr[MAX_STRING_LENGTH]; 647 fits_get_errstatus(status, fitsErr); 648 psError(PS_ERR_BAD_FITS, true, 649 "Error while configuring compression. CFITSIO error: %s", fitsErr); 650 return false; 630 651 } 631 652 #endif // FITS_HCOMP 632 653 633 ERROR: 634 fits_set_compression_type(fits->fd, 0x0, &status); 635 char fitsErr[MAX_STRING_LENGTH]; 636 fits_get_errstatus(status, fitsErr); 637 psError(PS_ERR_BAD_FITS, true, 638 "Error while configuring compression. CFITSIO error: %s", fitsErr); 639 return false; 654 return true; 640 655 } 641 656
Note:
See TracChangeset
for help on using the changeset viewer.
