IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35167


Ignore:
Timestamp:
Feb 13, 2013, 4:18:09 PM (13 years ago)
Author:
watersc1
Message:

Use the options to hold the doBackground boolean. Changes in ppStackCamera to reset the recipe value if no inputs are specified.

Location:
trunk/ppStack/src
Files:
6 edited

Legend:

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

    r35081 r35167  
    4848    bool convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images before stack?
    4949    bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
    50    
     50    //    fprintf(stderr,"ppSC: %d\n",doBackground);   
    5151    psArray *runImages = pmFPAfileDefineMultipleFromRun(&status, NULL, config,
    5252                                                        "PPSTACK.INPUT"); // Input images from previous run
     
    218218
    219219            // Grab bkgmodel information here
    220             if (doBackground) {
    221               if (!bkgmodel ||  strlen(bkgmodel) == 0) {
     220           
     221            //      if (doBackground) {
     222              if ((!bkgmodel) || (strlen(bkgmodel) == 0)) {
    222223                // We have no background models.
     224                //              fprintf(stderr,"No backgrounds specified, resettting recipe value.\n");
     225                doBackground = false;
     226                psMetadataAddBool(recipe, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE,
     227                                  "Do photometry on stacked image?", false);
     228
    223229              }
    224230              else {
     
    227233                if (!inputBKG) {
    228234                  // We failed to generate an pmFPAfile, so disable the background construction and continue.
     235                  //              fprintf(stderr,"No backgrounds specified, resettting recipe value.\n");
    229236                  doBackground = false;
    230237                  psMetadataAddBool(recipe, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE,
     
    238245                }
    239246              }// End bkgmodel
    240             }
     247              //            }
    241248
    242249
  • trunk/ppStack/src/ppStackCombineAlternate.c

    r35081 r35167  
    8888  }
    8989
     90  if (!ppStackLinearScale(inputs, config)) {
     91    psFree(inputs);
     92    return(false);
     93  }
    9094
    9195  // Do combination
  • trunk/ppStack/src/ppStackLoop.c

    r34860 r35167  
    6363    }
    6464
    65     bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
     65    //    bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
    6666
    6767    // Prepare for combination
    68     if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", doBackground ? "PPSTACK.OUTPUT.BKGMODEL" : NULL, PPSTACK_FILES_STACK, stack, options, config)) {
     68    if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", options->doBackground ? "PPSTACK.OUTPUT.BKGMODEL" : NULL, PPSTACK_FILES_STACK, stack, options, config)) {
    6969        psError(psErrorCodeLast(), false, "Unable to prepare for combination.");
    7070        psFree(stack);
     
    146146
    147147    // Generate median background stack here.
    148     if (doBackground && !ppStackCombineBackground(stack, options, config)) {
     148    if (options->doBackground && !ppStackCombineBackground(stack, options, config)) {
    149149      psError(psErrorCodeLast(), false, "Unable to generate median of background images.");
    150150      psFree(stack);
  • trunk/ppStack/src/ppStackOptions.c

    r34092 r35167  
    4343    options->matchZPs = true;
    4444    options->photometry = false;
     45    options->doBackground = false;
    4546    options->stats = NULL;
    4647    options->statsFile = NULL;
  • trunk/ppStack/src/ppStackOptions.h

    r34800 r35167  
    88    bool matchZPs;                      // Adjust relative fluxes based on transparency analysis?
    99    bool photometry;                    // Perform photometry?
     10    bool doBackground;                  // Do background model combination?
    1011    psMetadata *stats;                  // Statistics for output
    1112    FILE *statsFile;                    // File to which to write statistics
  • trunk/ppStack/src/ppStackSetup.c

    r34800 r35167  
    1717
    1818    options->convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images?
     19    options->doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
     20
    1921    if (!psMetadataLookupBool(NULL, config->arguments, "HAVE.PSF")) {
    2022        psWarning("No PSFs provided --- unable to convolve to common PSF.");
Note: See TracChangeset for help on using the changeset viewer.