IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18653


Ignore:
Timestamp:
Jul 21, 2008, 4:01:59 PM (18 years ago)
Author:
Paul Price
Message:

Need to check to see if photometry is turned on both before AND after defining the camera --- because it can be turned on on the command line or in a top-level recipe, or in a camera-dependent recipe.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackArguments.c

    r18650 r18653  
    194194    valueArgStr(arguments, "-stats", "STATS", config->arguments);
    195195
     196    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
     197        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0,
     198                          "Do photometry on stacked image?", true);
     199    }
     200
    196201    return true;
    197202}
  • trunk/ppStack/src/ppStackCamera.c

    r18346 r18653  
    350350    }
    351351
     352    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // Recipe for ppSim
     353    if (!recipe) {
     354        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSTACK_RECIPE);
     355        return false;
     356    }
    352357
    353358    // For photometry, we operate on the chip-mosaicked image
    354359    // we create a copy of the mosaicked image for psphot so we can write out a clean image
    355360    bool mdok = false;
    356     bool doPhotom = psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY"); // perform photometry
     361    bool doPhotom = psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY") ||
     362        psMetadataLookupBool(&mdok, config->arguments, "PHOTOMETRY"); // perform photometry
    357363    if (doPhotom) {
    358364        // This file, PSPHOT.INPUT, is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by
  • trunk/ppSub/src/ppSubArguments.c

    r18649 r18653  
    240240    }
    241241
     242    if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) {
     243        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
     244    }
     245
    242246    return true;
    243247}
  • trunk/ppSub/src/ppSubCamera.c

    r18289 r18653  
    136136    }
    137137
     138    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     139    if (!recipe) {
     140        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
     141        return false;
     142    }
     143
    138144    // psPhot input
    139     if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
     145    if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY") ||
     146        psMetadataLookupBool(NULL, recipe, "PHOTOMETRY") ) {
     147        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
    140148        psphotModelClassInit ();        // load implementation-specific models
    141149        pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
Note: See TracChangeset for help on using the changeset viewer.