IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 25, 2006, 5:24:49 PM (20 years ago)
Author:
Paul Price
Message:

psFitsWriteHeader checks that the HDU exists, and creates one if necessary. Added p_psFitsWriteHeader, which does not check. This allows psFitsInsertImage to call p_psFitsWriteHeader, since that already creates the HDU. Was getting into trouble by having psFitsInsertImage create a primary HDU for data, then calling psFitsWriteHeader, which created a primary HDU just for the header (dummy values for BITPIX, NAXIS, etc), then the data couldn't be written out. It would be much better if cfitsio treated data-less PHUs better --- if it recognised an HDU as extant once fits_create_img had been called.

File:
1 edited

Legend:

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

    r7162 r7227  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2006-05-22 22:39:07 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2006-05-26 03:24:49 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4242
    4343/** Writes the values of the metadata to the current HDU header.
     44 *  Doesn't check if the header has to be created, so not for general public use.
     45 *
     46 * @return bool         if TRUE, the write was successful, otherwise FALSE.
     47 */
     48bool p_psFitsWriteHeader(
     49    psMetadata* output,                 ///< the psMetadata data in which to write
     50    psFits* fits                        ///< the psFits object
     51);
     52
     53/** Writes the values of the metadata to an HDU header.
    4454 *
    4555 *  @return bool        if TRUE, the write was successful, otherwise FALSE.
Note: See TracChangeset for help on using the changeset viewer.