Changeset 12447
- Timestamp:
- Mar 15, 2007, 10:45:27 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceIO.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO.c
r12402 r12447 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.2 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-03-1 1 18:56:38$5 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-03-15 20:45:27 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 334 334 return false; 335 335 } 336 exttype = psMetadataLookupMetadata(&status, recipe, "OUTPUT.FORMAT"); 337 if (!status) { 338 psError(PS_ERR_UNKNOWN, true, "missing OUTPUT.FORMAT in PSPHOT recipe"); 339 return false; 340 } 336 exttype = psMemIncrRefCounter (psMetadataLookupStr(&status, recipe, "OUTPUT.FORMAT")); 337 if (!exttype) { 338 exttype = psStringCopy ("SMPDATA"); 339 } 341 340 342 341 psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTHEAD", PS_META_REPLACE, "name of image extension w/", headname); … … 345 344 346 345 // XXX these are case-sensitive since the EXTYPE is case-sensitive 347 348 346 status = false; 349 347 if (!strcmp (exttype, "SMPDATA")) { … … 517 515 } 518 516 519 XXX need to test for EXTNAME vs SMPDATA, PS1_DEV_0, etc520 521 517 // we need to find the corresponding table EXTNAME. 522 518 // first check the header … … 532 528 psAbort("cannot find data extension %s in %s", dataname, file->filename); 533 529 } 534 sources = pmSourcesReadCMF (file->fits, hdu->header); 530 531 psMetadata *tableHeader = psFitsReadHeader(NULL, file->fits); // The FITS header 532 if (!tableHeader) psAbort("cannot read table header"); 533 534 char *exttype = psMetadataLookupStr (NULL, tableHeader, "EXTTYPE"); 535 if (!exttype) psAbort("cannot read table type"); 536 537 // XXX these are case-sensitive since the EXTYPE is case-sensitive 538 if (!strcmp (exttype, "SMPDATA")) { 539 sources = pmSourcesRead_SMPDATA (file->fits, hdu->header); 540 } 541 if (!strcmp (exttype, "PS1_DEV_0")) { 542 sources = pmSourcesRead_PS1_DEV_0 (file->fits, hdu->header); 543 } 544 535 545 psFree (dataname); 536 546 break;
Note:
See TracChangeset
for help on using the changeset viewer.
