IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31435 for trunk/ppStack


Ignore:
Timestamp:
May 4, 2011, 3:59:42 PM (15 years ago)
Author:
watersc1
Message:

LAP code, quick stacking code, and unconvolved diff code.

Location:
trunk/ppStack/src
Files:
4 edited

Legend:

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

    r31158 r31435  
    11#include "ppStack.h"
    22
    3 //#define TESTING                         // Enable test output
     3// This is the doomsday switch.
     4// #define TESTING                         // Enable test output
    45
    56bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options,
     
    2930            reject->data[i] = pmStackRejectGrow(options->rejected->data[i], numCols, numRows, poorFrac,
    3031                                                options->regions->data[i], options->kernels->data[i]);
    31             if (!reject->data[i]) {
    32                 psError(psErrorCodeLast(), false, "Unable to grow rejected pixels for image %d", i);
    33                 psFree(reject);
    34                 return false;
    35             }
    3632        } else {
    3733            reject->data[i] = psMemIncrRefCounter(options->rejected->data[i]);
  • trunk/ppStack/src/ppStackCombineInitial.c

    r31203 r31435  
    11#include "ppStack.h"
    22
    3 //#define TESTING                         // Enable test output
     3// This is the doomsday switch.
     4// #define TESTING                         // Enable test output
    45
    56bool ppStackCombineInitial(ppStackThreadData *stack, ppStackOptions *options, pmConfig *config)
  • trunk/ppStack/src/ppStackLoop.c

    r31414 r31435  
    123123    }
    124124    else {
    125       // Since we haven't convolved, I believe we do need to normalize here. We also cannot grow.
    126       if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, false)) {
     125      // Since we haven't convolved, I believe we do need to normalize here.
     126      if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true)) {
    127127        psError(psErrorCodeLast(), false, "Unable to perform final combination.");
    128128        psFree(stack);
  • trunk/ppStack/src/ppStackReject.c

    r31203 r31435  
    11#include "ppStack.h"
    22
     3// This is the doomsday switch.
    34// #define TESTING
    45
     
    1314/*     } */
    1415
     16   
    1517    int num = options->num;             // Number of inputs
     18
     19    // Construct a small convolution kernel to aid in rejection
     20    if (!options->convolve) {
     21      for (int i = 0; i < num; i++) {
     22        psArray *regions = psArrayAllocEmpty(1);
     23        psRegion *region = psRegionAlloc(0,options->numCols - 1, 0, options->numRows - 1);
     24        regions = psArrayAdd(regions,1, region);
     25       
     26        psArray *kernels = psArrayAllocEmpty(1);
     27        psVector *fwhms = psVectorAllocEmpty(1, PS_TYPE_F32);
     28        psVectorAppend(fwhms,5.0); // Should be a parameter
     29        psVector *orders = psVectorAllocEmpty(1, PS_TYPE_S32);
     30        psVectorAppend(orders,0);
     31        pmSubtractionKernels *kernel = pmSubtractionKernelsISIS(15,0,fwhms,orders,0,*region,PM_SUBTRACTION_MODE_2);
     32        kernels = psArrayAdd(kernels, 1, kernel);
     33       
     34        kernel->solution1 = psVectorAlloc(3, PS_TYPE_F64);
     35        psVectorSet(kernel->solution1, 1, 1.0);
     36        psVectorSet(kernel->solution1, 2, 1.0);
     37        psVectorSet(kernel->solution1, 3, 1.0);
     38        kernel->solution2 = psVectorAlloc(3, PS_TYPE_F64);
     39        psVectorSet(kernel->solution2, 1, 1.0);
     40        psVectorSet(kernel->solution1, 2, 1.0);
     41        psVectorSet(kernel->solution1, 3, 1.0);
     42       
     43        options->kernels->data[i] = kernels;
     44        options->regions->data[i] = regions;
     45      }
     46    }
     47       
    1648
    1749    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSTACK_RECIPE); // ppStack recipe
Note: See TracChangeset for help on using the changeset viewer.