Changeset 6663 for branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c
- Timestamp:
- Mar 21, 2006, 1:52:54 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c
r6618 r6663 115 115 return false; 116 116 } 117 ps String result = psMetadataLookupStr(&mdok,header, keyword);118 if (! mdok || strlen(result) == 0) {117 psMetadataItem *resultItem = psMetadataLookup(header, keyword); 118 if (! resultItem) { 119 119 psError(PS_ERR_IO, false, "Unable to find %s in primary header to identify %s.\n", keyword, name); 120 120 return NULL; 121 121 } 122 123 return result; 122 return psMetadataItemParseString(resultItem); 124 123 } 125 124 … … 190 189 } 191 190 psMetadataItem *fpaNameItem = psMetadataLookup(phu, nameKeyword); // Name of the FPA 191 if (!fpaNameItem) { 192 psError(PS_ERR_IO, false, "Unable to find keyword %s with the name of the FPA.\n", nameKeyword); 193 return NULL; 194 } 192 195 const char *newFPAname = psMetadataItemParseString(fpaNameItem); // FPA.NAME for new source 193 196 fpaNameItem = psMetadataLookup(fpa->concepts, "FPA.NAME"); // Current name of FPA … … 421 424 psString chipName = NULL; // Name of chip under consideration 422 425 pmChip *chip = NULL; // The chip we're looking for 423 if (! fpa->hdu->phu) { 426 #if 1 427 // Think I'm doing this at the start now 428 if (!fpa->hdu || !fpa->hdu->phu) { 424 429 // Need to look up the name of the chip 425 430 chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); … … 431 436 chip = fpa->chips->data[chipNum]; 432 437 } 438 #endif 433 439 for (int i = 0; i < names->n; i++) { 434 440 psString cellType = values->data[i]; // The type of the cell 435 441 psString cellName = NULL; // The name of the cell 436 if (fpa->hdu ->phu) {442 if (fpa->hdu && fpa->hdu->phu) { 437 443 // We've got chipName:cellType with cellType == cellName 438 444 chipName = names->data[i];
Note:
See TracChangeset
for help on using the changeset viewer.
