IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2010, 10:58:13 AM (16 years ago)
Author:
Paul Price
Message:

Ensure files are closed when exiting with an error. Moved target PSF to its own file so that it can be closed independently of the images (they share data_exists, which need to have multiple states if they're on the same file).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r27004 r27075  
    284284
    285285    if (havePSFs) {
    286         pmFPAfile *targetPSF = pmFPAfileDefineOutput(config, output->fpa, "PPSTACK.TARGET.PSF");
     286        pmFPA *psfFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain PSF
     287        if (!psfFPA) {
     288            psError(psErrorCodeLast(), false, "Unable to construct an FPA from camera configuration.");
     289            return false;
     290        }
     291        pmFPAfile *targetPSF = pmFPAfileDefineOutput(config, psfFPA, "PPSTACK.TARGET.PSF");
    287292        if (!targetPSF) {
    288293            psError(psErrorCodeLast(), false, _("Unable to generate output file from PPSTACK.TARGET.PSF"));
    289294            return false;
    290295        }
     296        psFree(psfFPA);
    291297        if (targetPSF->type != PM_FPA_FILE_PSF) {
    292298            psError(PPSTACK_ERR_CONFIG, true, "PPSTACK.TARGET.PSF is not of type PSF");
Note: See TracChangeset for help on using the changeset viewer.