IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2008, 2:22:46 PM (18 years ago)
Author:
eugene
Message:

for files loaded from the detrend database, re-construct the fpa when the first header is loaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r20254 r20400  
    781781          // determine camera if not specified already
    782782          // XXX can I actually reach this with camera not specified??
    783           file->format = pmConfigCameraFormatFromHeader (NULL, NULL, config, phu, true);
     783          psMetadata *camera = NULL;
     784          psString formatName = NULL;
     785          file->format = pmConfigCameraFormatFromHeader (&camera, &formatName, config, phu, true);
    784786          if (!file->format) {
    785787            psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", file->filename);
     
    788790          }
    789791          psFree(phu);
     792
     793          pmFPA *newFPA = pmFPAConstruct (camera, formatName);
     794          if (!newFPA) {
     795              psError(PS_ERR_IO, false, "Failed to construct FPA from %s for %s", file->filename, formatName);
     796              psFree(camera);
     797              psFree(formatName);
     798              return NULL;
     799          }
     800          psFree(camera);
     801          psFree(formatName);
     802
     803          // XXX this is really dangerous...
     804          psFree (file->fpa);
     805          file->fpa = newFPA;
    790806        }
    791807
Note: See TracChangeset for help on using the changeset viewer.