Changeset 13136 for trunk/psModules/src/objects/pmSourceIO.c
- Timestamp:
- May 2, 2007, 2:12:03 PM (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
r13034 r13136 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-0 4-26 01:20:29$5 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-05-03 00:12:03 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 41 41 42 42 // translations between psphot object types and dophot object types 43 int pmSource DophotType (pmSource *source)43 int pmSourceGetDophotType (pmSource *source) 44 44 { 45 45 switch (source->type) { … … 65 65 } 66 66 return (0); 67 } 68 69 // translations between psphot object types and dophot object types 70 bool pmSourceSetDophotType (pmSource *source, int type) 71 { 72 if (type == 4) { 73 source->mode |= PM_SOURCE_MODE_FAIL; 74 } 75 if (type == 7) { 76 source->mode |= PM_SOURCE_MODE_POOR; 77 } 78 if (type == 10) { 79 source->mode |= PM_SOURCE_MODE_SATSTAR; 80 } 81 82 switch (type) { 83 case 1: 84 case 4: 85 case 7: 86 case 10: 87 source->type = PM_SOURCE_TYPE_STAR; 88 return true; 89 case 2: 90 source->type = PM_SOURCE_TYPE_EXTENDED; 91 return true; 92 case 8: 93 source->type = PM_SOURCE_TYPE_DEFECT; 94 return true; 95 default: 96 return false; 97 } 98 return false; 67 99 } 68 100 … … 323 355 // this header block is new, write it to disk 324 356 if (hdu->header != file->header) { 325 outhead = psMetadataCopy (NULL, hdu->header); 357 // XXX I was building a new copy, why? supplement the output header 358 // outhead = psMetadataCopy (NULL, hdu->header); 326 359 327 360 // add EXTNAME, EXTHEAD, EXTTYPE to header 328 361 // psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTNAME", PS_META_REPLACE, "extension name", headname); 329 psMetadataAddStr ( outhead, PS_LIST_TAIL, "EXTDATA", PS_META_REPLACE, "name of table extension", dataname);330 psMetadataAddStr ( outhead, PS_LIST_TAIL, "EXTTYPE", PS_META_REPLACE, "extension type", "IMAGE");362 psMetadataAddStr (hdu->header, PS_LIST_TAIL, "EXTDATA", PS_META_REPLACE, "name of table extension", dataname); 363 psMetadataAddStr (hdu->header, PS_LIST_TAIL, "EXTTYPE", PS_META_REPLACE, "extension type", "IMAGE"); 331 364 if (!file->phu) { 332 365 // this hdu->header acts as the PHU: set EXTEND to be true 333 psMetadataAddBool ( outhead, PS_LIST_TAIL, "EXTEND", PS_META_REPLACE, "this file has extensions", true);366 psMetadataAddBool (hdu->header, PS_LIST_TAIL, "EXTEND", PS_META_REPLACE, "this file has extensions", true); 334 367 } 335 368 … … 337 370 updates = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER"); 338 371 if (updates) { 339 psMetadataCopy ( outhead, updates);372 psMetadataCopy (hdu->header, updates); 340 373 } 341 374 updates = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.HEADER"); 342 375 if (updates) { 343 psMetadataCopy ( outhead, updates);376 psMetadataCopy (hdu->header, updates); 344 377 } 345 378 346 psFitsWriteBlank (file->fits, outhead, headname);379 psFitsWriteBlank (file->fits, hdu->header, headname); 347 380 psTrace ("pmFPAfile", 5, "wrote ext head %s (type: %d)\n", file->filename, file->type); 348 381 file->header = hdu->header; 349 psFree (outhead);350 382 } 351 383
Note:
See TracChangeset
for help on using the changeset viewer.
