Changeset 15218
- Timestamp:
- Oct 4, 2007, 11:47:30 AM (19 years ago)
- Location:
- trunk/psModules/src
- Files:
-
- 3 edited
-
camera/pmFPAConstruct.c (modified) (2 diffs)
-
camera/pmFPAfileIO.c (modified) (2 diffs)
-
config/pmConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAConstruct.c
r15099 r15218 1098 1098 const char *currentName = psMetadataLookupStr(&mdok, fpa->concepts, "FPA.NAME"); // Current name 1099 1099 if (mdok && currentName && strlen(currentName) > 0 && strcmp(currentName, fpaname) != 0) { 1100 ps LogMsg(__func__, PS_LOG_WARN,"FPA.NAME for new source (%s) doesn't match FPA.NAME for current "1100 psWarning("FPA.NAME for new source (%s) doesn't match FPA.NAME for current " 1101 1101 "fpa (%s).\n", fpaname, currentName); 1102 1102 } … … 1356 1356 psString fpaname = phuNameFromHeader("FPA.NAME", fileInfo, phu); // New name for the FPA 1357 1357 if (!fpaname || strlen(fpaname) == 0) { 1358 psError(PS_ERR_IO, true, "Unable to determine FPA.NAME: check for FPA.NAME in FILE in camera format"); 1359 return NULL; 1358 psWarning("Unable to determine FPA.NAME: check for FPA.NAME in FILE in camera format"); 1360 1359 } 1361 1360 -
trunk/psModules/src/camera/pmFPAfileIO.c
r15180 r15218 37 37 #include "pmSourcePlots.h" 38 38 #include "pmFPAConstruct.h" 39 #include "pmConcepts.h" 39 40 40 41 // attempt create, read, write, close, or free pmFPAfiles available in files files are … … 374 375 psError(PS_ERR_UNKNOWN, false, "Unable to set compression options for %s (%s) (%d:%d:%d)\n", 375 376 file->filename, file->name, view->chip, view->cell, view->readout); 377 return false; 378 } 379 } 380 381 382 // Ensure headers and all are updated 383 // This is here so that the individual write functions (e.g., images, PSFs, sources, etc) don't have to 384 // take care of all this themselves (because they generally don't). 385 { 386 pmHDU *hdu = pmFPAviewThisHDU(view, file->fpa); 387 if (hdu) { 388 pmConfigConformHeader(hdu->header, file->format); 389 } 390 391 pmFPA *fpa = file->fpa; // FPA of interest 392 pmChip *chip = pmFPAviewThisChip(view, file->fpa); // Chip of interest, or NULL 393 pmCell *cell = pmFPAviewThisCell(view, file->fpa); // Cell of interest, or NULL 394 pmFPAUpdateNames(fpa, chip, cell); 395 396 pmConceptSource sources = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS | 397 PM_CONCEPT_SOURCE_DEFAULTS; // Concept sources to write 398 if (cell) { 399 if (!pmConceptsWriteCell(cell, sources, true, NULL)) { 400 psError(PS_ERR_IO, false, "Unable to write concepts for cell.\n"); 401 return false; 402 } 403 } else if (chip) { 404 if (!pmConceptsWriteChip(chip, sources, true, true, NULL)) { 405 psError(PS_ERR_IO, false, "Unable to write concepts for chip.\n"); 406 return false; 407 } 408 } else if (!pmConceptsWriteFPA(fpa, sources, true, NULL)) { 409 psError(PS_ERR_IO, false, "Unable to write concepts for FPA.\n"); 376 410 return false; 377 411 } -
trunk/psModules/src/config/pmConfig.c
r15217 r15218 1166 1166 psFree(rulesIter); 1167 1167 1168 // XXX do we need to update the header based on elements of the FILE?1169 # if (0)1170 psMetadata *file = psMetadataLookupMetadata(&mdok, format, "FILE"); // How to identify this format1171 if (!mdok || !file) {1172 psError(PS_ERR_IO, true, "Unable to find FILE in camera format.\n");1173 return false;1174 }1175 psString fpaName = psMetadataLookupStr(&mdok, file, "FPA.NAME");1176 # endif1177 1178 1168 return true; 1179 1169 }
Note:
See TracChangeset
for help on using the changeset viewer.
