IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2009, 6:25:39 PM (17 years ago)
Author:
Paul Price
Message:

Still moving stuff around to support 'inverse' mode. Need to define separate output files for the sources. Still doesn't compile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppSub/src/ppSubCamera.c

    r23704 r23711  
    167167        return false;
    168168    }
    169     data->invert = psMetadataLookupBool(NULL, recipe, "INVERSE");
     169    data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE");
    170170    data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY");
    171171
     
    192192    if (data->inverse) {
    193193        // Inverse output image
    194         pmFPAfile *outinv = defineOutputFile(config, input, true, "PPSUB.OUTINV", PM_FPA_FILE_IMAGE);
    195         pmFPAfile *outinvMask = defineOutputFile(config, outinv, false, "PPSUB.OUTINV.MASK",
    196                                                  PM_FPA_FILE_MASK);
    197         if (!outinv || !outinvMask) {
     194        pmFPAfile *inverse = defineOutputFile(config, input, true, "PPSUB.INV", PM_FPA_FILE_IMAGE);
     195        pmFPAfile *invMask = defineOutputFile(config, inverse, false, "PPSUB.INVERSE.MASK",
     196                                              PM_FPA_FILE_MASK);
     197        if (!inv || !invMask) {
    198198            psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
    199199            return false;
    200200        }
    201         outinv->save = true;
    202         outinvMask->save = true;
     201        inverse->save = true;
     202        invMask->save = true;
    203203        if (inVar && refVar) {
    204             pmFPAfile *outinvVar = defineOutputFile(config, outinv, false, "PPSUB.OUTINV.VARIANCE",
    205                                                     PM_FPA_FILE_VARIANCE);
    206             if (!outinvVar) {
     204            pmFPAfile *invVar = defineOutputFile(config, inverse, false, "PPSUB.INVERSE.VARIANCE",
     205                                                 PM_FPA_FILE_VARIANCE);
     206            if (!invVar) {
    207207                psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
    208208                return false;
    209209            }
    210             outinvVar->save = true;
     210            invVar->save = true;
    211211        }
    212212    }
     
    312312            return false;
    313313        }
     314
     315        // Deactivate psphot output sources --- we want to define output source files of our own
     316        pmFPAfile *psphotOutput = pmFPAfileSelectSingle(config->files, "PSPHOT.OUTPUT", 0);
     317        psphotOutput->save = false;
     318
     319        pmFPAfile *outSources = defineOutputFile(config, output, false, "PPSUB.OUTPUT.SOURCES",
     320                                                 PM_FPA_FILE_CMF);
     321        if (!outSources) {
     322            psError(PS_ERR_UNKNOWN, false, "Unable to set up output source file.");
     323            return false;
     324        }
     325        outSources->save = true;
     326
     327        if (data->inverse) {
     328            pmFPAfile *invSources = defineOutputFile(config, inverse, false, "PPSUB.OUTPUT.SOURCES",
     329                                                     PM_FPA_FILE_CMF);
     330            if (!invSources) {
     331                psError(PS_ERR_UNKNOWN, false, "Unable to set up inverse source file.");
     332                return false;
     333            }
     334        }
     335        invSources->save = true;
    314336    }
    315337
Note: See TracChangeset for help on using the changeset viewer.