Changeset 12402 for trunk/psModules/src/objects/pmSourceIO.c
- Timestamp:
- Mar 11, 2007, 8:56:38 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSourceIO.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSourceIO.c
r12398 r12402 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-03-1 0 07:03:20$5 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-03-11 18:56:38 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 329 329 } 330 330 331 exttype = psStringCopy ("SMPDATA"); // XXX derive this from the recipes 331 psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, "PSPHOT"); 332 if (!status) { 333 psError(PS_ERR_UNKNOWN, true, "missing recipe PSPHOT in config data"); 334 return false; 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 } 341 332 342 psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTHEAD", PS_META_REPLACE, "name of image extension w/", headname); 333 343 psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTTYPE", PS_META_REPLACE, "extension type", exttype); 334 344 psFree (exttype); 335 345 336 if (!pmSourcesWriteCMF (file->fits, sources, outhead, dataname)) { 337 psError(PS_ERR_IO, false, "writing CMF data to %s\n", file->filename); 346 // XXX these are case-sensitive since the EXTYPE is case-sensitive 347 348 status = false; 349 if (!strcmp (exttype, "SMPDATA")) { 350 status = pmSourcesWrite_SMPDATA (file->fits, sources, outhead, dataname); 351 } 352 if (!strcmp (exttype, "PS1_DEV_0")) { 353 status = pmSourcesWrite_PS1_DEV_0 (file->fits, sources, outhead, dataname); 354 } 355 356 if (!status) { 357 psError(PS_ERR_IO, false, "writing CMF data to %s with format %s\n", file->filename, exttype); 338 358 psFree (headname); 339 359 psFree (dataname); … … 497 517 } 498 518 519 XXX need to test for EXTNAME vs SMPDATA, PS1_DEV_0, etc 520 499 521 // we need to find the corresponding table EXTNAME. 500 522 // first check the header
Note:
See TracChangeset
for help on using the changeset viewer.
