IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2009, 11:58:24 AM (17 years ago)
Author:
Paul Price
Message:

Committing changes in progress. Attempting to make ppSub spit out not just the regular subtracted image and sources, but the inverse with sources in the inverse (for the warp-warp difference). Does not compile yet.

File:
1 edited

Legend:

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

    r23688 r23704  
    161161
    162162
     163    // Now that the camera has been determined, we can read the recipe
     164    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     165    if (!recipe) {
     166        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
     167        return false;
     168    }
     169    data->invert = psMetadataLookupBool(NULL, recipe, "INVERSE");
     170    data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY");
     171
     172
    163173    // Output image
    164174    pmFPAfile *output = defineOutputFile(config, input, true, "PPSUB.OUTPUT", PM_FPA_FILE_IMAGE);
     
    170180    output->save = true;
    171181    outMask->save = true;
    172     pmFPAfile *outVar = NULL;
    173182    if (inVar && refVar) {
    174         outVar = defineOutputFile(config, output, false, "PPSUB.OUTPUT.VARIANCE", PM_FPA_FILE_VARIANCE);
     183        pmFPAfile *outVar = defineOutputFile(config, output, false, "PPSUB.OUTPUT.VARIANCE",
     184                                             PM_FPA_FILE_VARIANCE);
    175185        if (!outVar) {
    176186            psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     
    180190    }
    181191
     192    if (data->inverse) {
     193        // 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) {
     198            psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     199            return false;
     200        }
     201        outinv->save = true;
     202        outinvMask->save = true;
     203        if (inVar && refVar) {
     204            pmFPAfile *outinvVar = defineOutputFile(config, outinv, false, "PPSUB.OUTINV.VARIANCE",
     205                                                    PM_FPA_FILE_VARIANCE);
     206            if (!outinvVar) {
     207                psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
     208                return false;
     209            }
     210            outinvVar->save = true;
     211        }
     212    }
    182213
    183214    // Convolved input image
     
    252283
    253284    // psPhot input
    254     if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
     285    if (data->photometry) {
    255286        psphotModelClassInit();        // load implementation-specific models
    256287
Note: See TracChangeset for help on using the changeset viewer.