IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34860


Ignore:
Timestamp:
Dec 19, 2012, 2:07:18 PM (14 years ago)
Author:
bills
Message:

added recipe value to turn off background stacking. set it to false because
the current implementation is not ready for input warps that don't have a background
model.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/recipes/ppStack.config

    r34849 r34860  
    3232TARGET.FRAC     F32     0.1             # Minimum flux fraction for target PSF
    3333TARGET.MINMAG   F32     3.0             # Minimum magnitude difference to tolerate in stamp
     34
     35BACKGROUND.MODEL    BOOL   FALSE        # Construct a stacked version of the warp stage background
    3436
    3537RENORM          BOOL    TRUE            # Renormalise weight maps?
  • trunk/ppStack/src

    • Property svn:ignore
      •  

        old new  
        66*.la
        77ppStack
         8ppStackMedian
        89config.h
        910config.h.in
         
        1213ppStackErrorCodes.c
        1314ppStackErrorCodes.h
         15
  • trunk/ppStack/src/ppStackLoop.c

    r34800 r34860  
    4141    if (options->quality) return true; // Can't do anything else
    4242
     43    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
     44
    4345    // Ensure sufficient inputs
    4446    {
    4547        int numGood = stackSummary(options, "initial combination");
    46         psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
    4748        bool safe = psMetadataLookupBool(NULL, recipe, "SAFE"); // Be safe when combining
    4849        if (safe && numGood <= 1) {
     
    6263    }
    6364
     65    bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
     66
    6467    // Prepare for combination
    65     if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", "PPSTACK.OUTPUT.BKGMODEL", PPSTACK_FILES_STACK, stack, options, config)) {
     68    if (!ppStackCombinePrepare("PPSTACK.OUTPUT", "PPSTACK.OUTPUT.EXP", doBackground ? "PPSTACK.OUTPUT.BKGMODEL" : NULL, PPSTACK_FILES_STACK, stack, options, config)) {
    6669        psError(psErrorCodeLast(), false, "Unable to prepare for combination.");
    6770        psFree(stack);
     
    143146
    144147    // Generate median background stack here.
    145     if (!ppStackCombineBackground(stack, options, config)) {
     148    if (doBackground && !ppStackCombineBackground(stack, options, config)) {
    146149      psError(psErrorCodeLast(), false, "Unable to generate median of background images.");
    147150      psFree(stack);
Note: See TracChangeset for help on using the changeset viewer.