Changeset 11229 for trunk/psModules/src/objects/pmSourceIO.c
- Timestamp:
- Jan 21, 2007, 3:13:00 PM (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
r10920 r11229 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-01- 05 20:19:23$5 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-01-22 01:13:00 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 396 396 bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config) 397 397 { 398 // determine the number of readouts: 399 switch (file->type) { 400 case PM_FPA_FILE_CMP: { 401 pmReadout *readout; 402 readout = pmReadoutAlloc (cell); 403 psFree (readout); 404 break; 405 } 406 default: 407 psAbort ("pmSourceIO", "n readouts is not yet defined\n"); 408 } 398 // multiple readout mode is not yet defined for CMP or CMF files 399 // if they have not been allocated, allocate a single readout 400 if (!cell->readouts || !cell->readouts->n) { 401 pmReadout *readout = pmReadoutAlloc (cell); 402 psFree (readout); 403 } 404 409 405 for (int i = 0; i < cell->readouts->n; i++) { 410 406 pmReadout *readout = cell->readouts->data[i]; … … 477 473 } 478 474 479 char *dataname = pmFPAfileNameFromRule (file->extrule, file, view); 480 psFitsMoveExtName (file->fits, dataname); 475 // we need to find the corresponding table EXTNAME. 476 // first check the header 477 char *dataname = psMetadataLookupStr (NULL, hdu->header, "EXTDATA"); 478 psMemIncrRefCounter (dataname); // so free below is safe 479 if (!dataname) { 480 // if it is not defined in the header, try the value in the filerule 481 dataname = pmFPAfileNameFromRule (file->extrule, file, view); 482 if (!dataname) 483 psAbort ("pmSourceIO", "cannot determine data EXTNAME"); 484 } 485 if (!psFitsMoveExtName (file->fits, dataname)) { 486 psAbort ("pmSourceIO", "cannot find data extension %s in %s", dataname, file->filename); 487 } 481 488 sources = pmSourcesReadCMF (file->fits, hdu->header); 482 489 psFree (dataname);
Note:
See TracChangeset
for help on using the changeset viewer.
