IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2007, 4:47:49 PM (19 years ago)
Author:
Paul Price
Message:

Bug fixes to get the output image and mask (and not the weight if not available) to be written out. Incorporating the new subtraction mask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubCamera.c

    r13737 r13738  
    8282
    8383    // Output image
    84     pmFPAfile *output = pmFPAfileDefineOutput(config, input->fpa, "PPSUB.OUTPUT");
     84    pmFPAfile *output = pmFPAfileDefineSkycell(config, NULL, "PPSUB.OUTPUT");
    8585    if (!output) {
    8686        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT"));
     
    9393
    9494    // Output mask
    95     pmFPAfile *outMask = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.MASK");
     95    pmFPAfile *outMask = pmFPAfileDefineSkycell(config, output->fpa, "PPSUB.OUTPUT.MASK");
    9696    if (!outMask) {
    9797        psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.MASK"));
     
    104104
    105105    // Output weight
    106     pmFPAfile *outWeight = pmFPAfileDefineOutput(config, output->fpa, "PPSUB.OUTPUT.WEIGHT");
    107     if (!outWeight) {
    108         psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.WEIGHT"));
     106    if (inputWeight && refWeight) {
     107        pmFPAfile *outWeight = pmFPAfileDefineSkycell(config, output->fpa, "PPSUB.OUTPUT.WEIGHT");
     108        if (!outWeight) {
     109            psError(PS_ERR_IO, false, _("Unable to generate output file from PPSUB.OUTPUT.WEIGHT"));
     110            return false;
     111        }
     112        if (outWeight->type != PM_FPA_FILE_WEIGHT) {
     113            psError(PS_ERR_IO, true, "PPSUB.OUTPUT.WEIGHT is not of type WEIGHT");
     114            return false;
     115        }
     116    }
     117
     118    pmFPAview *view = pmFPAviewAlloc(0);// View to PHU
     119    const char *name = psMetadataLookupStr(NULL, input->fpa->concepts, "FPA.NAME");
     120    if (!pmFPAAddSourceFromView(output->fpa, name, view, output->format)) {
     121        psError(PS_ERR_UNKNOWN, false, "Unable to add PHU to output.");
     122        psFree(view);
    109123        return false;
    110124    }
    111     if (outWeight->type != PM_FPA_FILE_WEIGHT) {
    112         psError(PS_ERR_IO, true, "PPSUB.OUTPUT.WEIGHT is not of type WEIGHT");
    113         return false;
    114     }
     125    psFree(view);
    115126
    116127    // psPhot input
Note: See TracChangeset for help on using the changeset viewer.