IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 5:27:46 PM (20 years ago)
Author:
Paul Price
Message:

Remove SIMPLE from the list of banned keywords, but ensure it's a boolean type.

File:
1 edited

Legend:

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

    r7266 r7289  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-06-01 21:56:59 $
     9 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-06-02 03:27:46 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737// List of FITS header keys not to write (handled by cfitsio); NULL-terminated
    38 static char *noWriteFitsKeys[] = {"SIMPLE", "XTENSION", "BITPIX", "NAXIS", "EXTNAME", "BSCALE", "BZERO",
     38static char *noWriteFitsKeys[] = {"XTENSION", "BITPIX", "NAXIS", "EXTNAME", "BSCALE", "BZERO",
    3939                                  "TFIELDS", NULL};
    4040// List of the start of FITS header keys not to write (handled by cfitsio); NULL-terminated
     
    282282        }
    283283
     284        // We allow the user to write SIMPLE, but it must be boolean
     285        if (strcmp(item->name, "SIMPLE") == 0 && item->type != PS_DATA_BOOL) {
     286            psError(PS_ERR_BAD_PARAMETER_TYPE, true, "SIMPLE in a FITS header must be of boolean type: not "
     287                    "%x --- ignored.\n", item->type);
     288            continue;
     289        }
     290
    284291        switch (item->type) {
    285292        case PS_DATA_BOOL: {
Note: See TracChangeset for help on using the changeset viewer.