IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 11, 2012, 2:04:31 PM (13 years ago)
Author:
watersc1
Message:

Merge from my branch including background restoration and stack stage projection cell binned images.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ppStack/src/ppStackSetup.c

    r31158 r34800  
    8989    options->origMasks = psArrayAlloc(num);
    9090    options->origVariances = psArrayAlloc(num);
     91    options->bkgImages = psArrayAlloc(num);
    9192    pmFPAview *view = pmFPAviewAlloc(0);
     93    int nullMasks = 0;
     94    int nullVariances = 0;
    9295    for (int i = 0; i < num; i++) {
    9396        {
     
    97100        {
    98101            // We want the convolved mask, since that defines the area that has been tested for outliers
     102          if (options->convolve) {
    99103            options->origMasks->data[i] = psMemIncrRefCounter(options->convMasks->data[i]);
     104          }
     105          else {
     106            pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.MASK", i);
     107            options->origMasks->data[i] = pmFPAfileName(file, view, config);
     108          }
     109          if (!(options->origMasks->data[i])) {
     110            nullMasks++;
     111          }
    100112        }
    101113        {
    102114            pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.VARIANCE", i);
    103115            options->origVariances->data[i] = pmFPAfileName(file, view, config);
     116            if (!(options->origVariances->data[i])) {
     117              nullVariances++;
     118            }
    104119        }
     120/*      { */
     121/*        pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT.BKGMODEL", i); */
     122/*        options->bkgImages->data[i] = pmFPAfileName(file, view, config); */
     123/*      } */
    105124    }
     125    if (nullMasks == num) {
     126      psFree(options->origMasks);
     127    }
     128    if (nullVariances == num) {
     129      psFree(options->origVariances);
     130    }
     131   
    106132    psFree(view);
    107133
Note: See TracChangeset for help on using the changeset viewer.