IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2009, 2:53:12 PM (17 years ago)
Author:
Paul Price
Message:

Merging branches/pap (unconvolved stacks, reworked combinePixels function into clearer roles, only throw out most variant pixel on each iteration, throw suspect pixels out as first rejection step) stack development. I think I've got everything, but not entirely sure, since I've already merged this branch once before (for dual convolution).

Location:
trunk/ppStack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack

  • trunk/ppStack/src/ppStackCamera.c

    r25519 r26076  
    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    }
     
    294293        targetPSF->save = true;
    295294    }
     295
     296#if 1
     297    // Unconvolved stack
     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
     305    if (!unConv) {
     306        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.UNCONV"));
     307        return false;
     308    }
     309    if (unConv->type != PM_FPA_FILE_IMAGE) {
     310        psError(PS_ERR_IO, true, "PPSTACK.UNCONV is not of type IMAGE");
     311        return false;
     312    }
     313    unConv->save = true;
     314
     315    if (!pmFPAAddSourceFromFormat(unconvFPA, "Stack", unConv->format)) {
     316        psError(PS_ERR_UNKNOWN, false, "Unable to generate output FPA.");
     317        return false;
     318    }
     319
     320    // Unconvolved mask
     321    pmFPAfile *unconvMask = pmFPAfileDefineOutput(config, unconvFPA, "PPSTACK.UNCONV.MASK");
     322    if (!unconvMask) {
     323        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.UNCONV.MASK"));
     324        return false;
     325    }
     326    if (unconvMask->type != PM_FPA_FILE_MASK) {
     327        psError(PS_ERR_IO, true, "PPSTACK.UNCONV.MASK is not of type MASK");
     328        return false;
     329    }
     330    unconvMask->save = true;
     331
     332    // Unconvolved variance
     333    if (haveVariances) {
     334        pmFPAfile *unconvVariance = pmFPAfileDefineOutput(config, unconvFPA, "PPSTACK.UNCONV.VARIANCE");
     335        if (!unconvVariance) {
     336            psError(PS_ERR_IO, false, _("Unable to generate output file from PPSTACK.UNCONV.VARIANCE"));
     337            return false;
     338        }
     339        if (unconvVariance->type != PM_FPA_FILE_VARIANCE) {
     340            psError(PS_ERR_IO, true, "PPSTACK.UNCONV.VARIANCE is not of type VARIANCE");
     341            return false;
     342        }
     343        unconvVariance->save = true;
     344    }
     345#endif
    296346
    297347    // Output JPEGs
Note: See TracChangeset for help on using the changeset viewer.