IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 1, 2013, 5:01:08 PM (13 years ago)
Author:
watersc1
Message:

Merging changes that implement FPA level background continuity.

File:
1 edited

Legend:

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

    r34800 r35081  
    4747    }
    4848    bool convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images before stack?
    49 
     49    bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
     50   
    5051    psArray *runImages = pmFPAfileDefineMultipleFromRun(&status, NULL, config,
    5152                                                        "PPSTACK.INPUT"); // Input images from previous run
     
    217218
    218219            // Grab bkgmodel information here
    219             if (!bkgmodel ||  strlen(bkgmodel) == 0) {
    220               // We have no background models.
     220            if (doBackground) {
     221              if (!bkgmodel ||  strlen(bkgmodel) == 0) {
     222                // We have no background models.
     223              }
     224              else {
     225                pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel,
     226                                                 PM_FPA_FILE_IMAGE);
     227                if (!inputBKG) {
     228                  // We failed to generate an pmFPAfile, so disable the background construction and continue.
     229                  doBackground = false;
     230                  psMetadataAddBool(recipe, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE,
     231                                    "Do photometry on stacked image?", false);
     232
     233#if (0)
     234                  psError(psErrorCodeLast(), false,
     235                          "Unable to define file from bkgmodel %d (%s)",i,bkgmodel);
     236                  return(false);
     237#endif
     238                }
     239              }// End bkgmodel
    221240            }
    222             else {
    223               pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel,
    224                                                PM_FPA_FILE_IMAGE);
    225               if (!inputBKG) {
    226                 psError(psErrorCodeLast(), false,
    227                         "Unable to define file from bkgmodel %d (%s)",i,bkgmodel);
    228                 return(false);
    229               }
    230             }// End bkgmodel
    231241
    232242
Note: See TracChangeset for help on using the changeset viewer.