IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19270


Ignore:
Timestamp:
Aug 28, 2008, 3:01:39 PM (18 years ago)
Author:
Paul Price
Message:

The bad pixels were coming through in ds9 as the maximum value. According to
http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/compress/compress_image.html,
the keyword is "BLANK" when BITPIX > 0, and "ZBLANK" when BITPIX < 0.
Since we always do our own quantisation, the correct keyword is always
"BLANK" instead of "ZBLANK".

File:
1 edited

Legend:

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

    r18869 r19270  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2008-08-02 02:50:41 $
     9 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2008-08-29 01:01:39 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    624624
    625625    if (blank != 0 && bitPix > 0) {
    626         // Some quantisation has taken place --- record the blank ("magic") pixel value
    627         char *keyword = (psFitsCompressionGetType(fits) != PS_FITS_COMPRESS_NONE &&
    628                          (!fits->options || fits->options->conventions.compression)) ?
    629             "ZBLANK" : "BLANK";         // Keyword for recording blank pixel value
    630         fits_write_key_lng(fits->fd, keyword, blank, "Value for undefined pixels", &status);
     626        // Some quantisation has taken place --- record the blank ("magic") pixel value.
     627        //
     628        // According to http://heasarc.gsfc.nasa.gov/docs/heasarc/fits/compress/compress_image.html,
     629        // the keyword is "BLANK" when BITPIX > 0, and "ZBLANK" when BITPIX < 0.  Since we do our
     630        // own quantisation, the correct keyword is always "BLANK" instead of "ZBLANK".
     631        fits_write_key_lng(fits->fd, "BLANK", blank, "Value for undefined pixels", &status);
    631632        fits_set_imgnull(fits->fd, blank, &status);
    632633        if (psFitsError(status, true, "Could not write BLANK header to file.")) {
Note: See TracChangeset for help on using the changeset viewer.