Changeset 7229 for trunk/psLib/src/fits/psFitsHeader.c
- Timestamp:
- May 26, 2006, 3:49:22 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFitsHeader.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFitsHeader.c
r7227 r7229 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2006-05-2 6 03:24:49$9 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2006-05-27 01:49:22 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 219 219 220 220 221 // Do the work of writing out the header. 222 // Doesn't check to see if a new HDU needs to be created 223 bool p_psFitsWriteHeader(psMetadata *output, // Metadata that is to be output into the FITS file 224 psFits *fits // The FITS file handle 225 ) 221 bool psFitsWriteHeader(psMetadata *output, // Metadata that is to be output into the FITS file 222 psFits *fits // The FITS file handle 223 ) 226 224 { 227 225 if (!fits) { … … 314 312 } 315 313 316 bool psFitsWrite Header(psMetadata* output,317 psFits* fits)314 bool psFitsWriteBlank(psMetadata* output, 315 psFits* fits) 318 316 { 319 317 if (!fits) { … … 327 325 } 328 326 329 // Check to see if there are any extant HDUs 330 int hdus = psFitsGetSize(fits); // Number of HDUs 331 if (hdus == 0) { 332 // Need to create a dummy image HDU for the primary HDU 333 int status = 0; // Status of cfitsio 334 fits_create_img(fits->fd, 16, 0, NULL, &status); 335 if (status) { 336 char fitsErr[MAX_STRING_LENGTH]; 337 (void)fits_get_errstatus(status, fitsErr); 338 psError(PS_ERR_IO, true, "Unable to create primary header.\n%s\n", fitsErr); 339 return false; 340 } 341 } 342 343 return p_psFitsWriteHeader(output, fits); 327 // Create a dummy image HDU for the primary HDU 328 int status = 0; // Status of cfitsio 329 fits_create_img(fits->fd, 16, 0, NULL, &status); 330 if (status) { 331 char fitsErr[MAX_STRING_LENGTH]; 332 (void)fits_get_errstatus(status, fitsErr); 333 psError(PS_ERR_IO, true, "Unable to create primary header.\n%s\n", fitsErr); 334 return false; 335 } 336 337 return psFitsWriteHeader(output, fits); 344 338 } 345 339
Note:
See TracChangeset
for help on using the changeset viewer.
