IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2009, 2:57:04 PM (17 years ago)
Author:
Paul Price
Message:

Write unconvolved stack to separate (and new) file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppStack/src/ppStackCamera.c

    r25787 r25825  
    233233
    234234    // Output image
    235     pmFPA *fpa = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output
    236     if (!fpa) {
     235    pmFPA *outFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain the output
     236    if (!outFPA) {
    237237        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");
    238238        return false;
    239239    }
    240     pmFPAfile *output = pmFPAfileDefineOutput(config, fpa, "PPSTACK.OUTPUT");
    241     psFree(fpa);                        // Drop reference
     240    pmFPAfile *output = pmFPAfileDefineOutput(config, outFPA, "PPSTACK.OUTPUT");
     241    psFree(outFPA);                        // Drop reference
    242242    if (!output) {
    243243        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.OUTPUT"));
     
    250250    output->save = true;
    251251
    252     if (!pmFPAAddSourceFromFormat(fpa, "Stack", output->format)) {
     252    if (!pmFPAAddSourceFromFormat(outFPA, "Stack", output->format)) {
    253253        psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA.");
    254         psFree(fpa);
    255254        return false;
    256255    }
     
    295294    }
    296295
    297 #if 0
     296#if 1
    298297    // Unconvolved stack
    299     pmFPAfile *unConv = pmFPAfileDefineOutput(config, fpa, "PPSTACK.OUTPUT.UNCONV");
    300     psFree(fpa);                        // Drop reference
     298    pmFPA *unconvFPA = pmFPAConstruct(config->camera, config->cameraName); // FPA to contain unconvolved output
     299    if (!unconvFPA) {
     300        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to construct an FPA from camera configuration.");
     301        return false;
     302    }
     303    pmFPAfile *unConv = pmFPAfileDefineOutput(config, unconvFPA, "PPSTACK.UNCONV");
     304    psFree(unconvFPA);                  // Drop reference
    301305    if (!unConv) {
    302         psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.OUTPUT.UNCONV"));
     306        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.UNCONV"));
    303307        return false;
    304308    }
    305309    if (unConv->type != PM_FPA_FILE_IMAGE) {
    306         psError(PS_ERR_IO, true, "PPSTACK.OUTPUT.UNCONV is not of type IMAGE");
     310        psError(PS_ERR_IO, true, "PPSTACK.UNCONV is not of type IMAGE");
    307311        return false;
    308312    }
    309313    unConv->save = true;
    310314
    311     if (!pmFPAAddSourceFromFormat(fpa, "Stack", unConv->format)) {
     315    if (!pmFPAAddSourceFromFormat(unconvFPA, "Stack", unConv->format)) {
    312316        psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA.");
    313         psFree(fpa);
    314317        return false;
    315318    }
Note: See TracChangeset for help on using the changeset viewer.