IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 4:36:52 PM (17 years ago)
Author:
Paul Price
Message:

Merging pap_branch_20090128. Resolved a small number of conflicts. Compiles, but not tested in detail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageParseCamera.c

    r20647 r21364  
    2020    }
    2121
    22     // if MASK or WEIGHT was supplied on command line, bind files to 'input'.
    23     // the mask and weight will be mosaicked with the image
     22    // if MASK or VARIANCE was supplied on command line, bind files to 'input'.
     23    // the mask and variance will be mosaicked with the image
    2424    pmFPAfile *inputMask = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.MASK", "PPIMAGE.INPUT.MASK");
    2525    if (!status) {
     
    3434    }
    3535
    36     pmFPAfile *inputWeight = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.WEIGHT", "PPIMAGE.INPUT.WEIGHT");
     36    pmFPAfile *inputVariance = pmFPAfileBindFromArgs(&status, input, config, "PPIMAGE.INPUT.VARIANCE", "PPIMAGE.INPUT.VARIANCE");
    3737    if (!status) {
    3838        psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
    3939        return NULL;
    4040    }
    41     if (inputWeight && inputWeight->type != PM_FPA_FILE_WEIGHT) {
    42         psError(PS_ERR_IO, true, "PPIMAGE.INPUT.WEIGHT is not of type WEIGHT");
     41    if (inputVariance && inputVariance->type != PM_FPA_FILE_VARIANCE) {
     42        psError(PS_ERR_IO, true, "PPIMAGE.INPUT.VARIANCE is not of type VARIANCE");
    4343        return NULL;
    4444    }
     
    195195        return NULL;
    196196    }
    197     pmFPAfile *outWeight = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT.WEIGHT");
    198     if (!outWeight) {
    199         psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.OUTPUT.WEIGHT"));
    200         psFree(options);
    201         return NULL;
    202     }
    203     if (outWeight->type != PM_FPA_FILE_WEIGHT) {
    204         psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT.WEIGHT is not of type WEIGHT");
     197    pmFPAfile *outVariance = pmFPAfileDefineOutput(config, input->fpa, "PPIMAGE.OUTPUT.VARIANCE");
     198    if (!outVariance) {
     199        psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.OUTPUT.VARIANCE"));
     200        psFree(options);
     201        return NULL;
     202    }
     203    if (outVariance->type != PM_FPA_FILE_VARIANCE) {
     204        psError(PS_ERR_IO, true, "PPIMAGE.OUTPUT.VARIANCE is not of type VARIANCE");
    205205        psFree(options);
    206206        return NULL;
     
    230230        return NULL;
    231231    }
    232     pmFPAfile *chipWeight = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.WEIGHT");
    233     if (!chipWeight) {
    234         psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP.WEIGHT"));
    235         psFree(options);
    236         return NULL;
    237     }
    238     if (chipWeight->type != PM_FPA_FILE_WEIGHT) {
    239         psError(PS_ERR_IO, true, "PPIMAGE.CHIP.WEIGHT is not of type WEIGHT");
     232    pmFPAfile *chipVariance = pmFPAfileDefineOutput(config, chipImage->fpa, "PPIMAGE.CHIP.VARIANCE");
     233    if (!chipVariance) {
     234        psError(PS_ERR_IO, false, _("Unable to generate output file from PPIMAGE.CHIP.VARIANCE"));
     235        psFree(options);
     236        return NULL;
     237    }
     238    if (chipVariance->type != PM_FPA_FILE_VARIANCE) {
     239        psError(PS_ERR_IO, true, "PPIMAGE.CHIP.VARIANCE is not of type VARIANCE");
    240240        psFree(options);
    241241        return NULL;
     
    315315    outImage->save   = options->BaseFITS;
    316316    outMask->save    = options->BaseMaskFITS;
    317     outWeight->save  = options->BaseWeightFITS;
     317    outVariance->save  = options->BaseVarianceFITS;
    318318
    319319    chipImage->save  = options->ChipFITS;
    320320    chipMask->save   = options->ChipMaskFITS;
    321     chipWeight->save = options->ChipWeightFITS;
     321    chipVariance->save = options->ChipVarianceFITS;
    322322
    323323    byFPA1->save     = options->FPA1FITS;
     
    329329    outImage->fileLevel = PS_MIN (outImage->fileLevel, outImage->dataLevel);
    330330
    331     // outMask and outWeight must be freed at the same level as outImage (all freed by pmFPAFreeData)
     331    // outMask and outVariance must be freed at the same level as outImage (all freed by pmFPAFreeData)
    332332    outMask->freeLevel   = outImage->freeLevel;
    333     outWeight->freeLevel = outImage->freeLevel;
     333    outVariance->freeLevel = outImage->freeLevel;
    334334    outMask->dataLevel   = outImage->dataLevel;
    335     outWeight->dataLevel = outImage->dataLevel;
     335    outVariance->dataLevel = outImage->dataLevel;
    336336
    337337    // Ditto for the chip-mosaicked version
    338338    chipMask->freeLevel   = chipImage->freeLevel;
    339     chipWeight->freeLevel = chipImage->freeLevel;
     339    chipVariance->freeLevel = chipImage->freeLevel;
    340340    chipMask->dataLevel   = chipImage->dataLevel;
    341     chipWeight->dataLevel = chipImage->dataLevel;
     341    chipVariance->dataLevel = chipImage->dataLevel;
    342342
    343343    // the input data is the same as the outImage data : force the free levels to match
     
    434434    }
    435435
    436     // Turn off mask and weight output if we're not doing anything interesting
     436    // Turn off mask and variance output if we're not doing anything interesting
    437437    if (!options->doMaskBuild && outMask->save) {
    438438        psWarning("output mask image (BASE.MASK.FITS) requested, but not generated: skipping.\n");
    439439        outMask->save = false;
    440440    }
    441     if (!options->doWeightBuild && outWeight->save) {
    442         psWarning("output weight image (BASE.WEIGHT.FITS) requested, but not generated: skipping.\n");
    443         outWeight->save = false;
     441    if (!options->doVarianceBuild && outVariance->save) {
     442        psWarning("output variance image (BASE.VARIANCE.FITS) requested, but not generated: skipping.\n");
     443        outVariance->save = false;
    444444    }
    445445    if (!options->doMaskBuild && chipMask->save) {
     
    447447        chipMask->save = false;
    448448    }
    449     if (!options->doWeightBuild && chipWeight->save) {
    450         psWarning("output weight image (CHIP.WEIGHT.FITS) requested, but not generated: skipping.\n");
    451         chipWeight->save = false;
     449    if (!options->doVarianceBuild && chipVariance->save) {
     450        psWarning("output variance image (CHIP.VARIANCE.FITS) requested, but not generated: skipping.\n");
     451        chipVariance->save = false;
    452452    }
    453453
Note: See TracChangeset for help on using the changeset viewer.