IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 11, 2008, 6:12:42 PM (18 years ago)
Author:
Paul Price
Message:

Correcting stack variances for the imperfect convolution. Changed (again) the way the deviations are calculated; they're now straight chi2, which allows us to estimate how the variance factor needs to be changed in order to correct for it. Moving additional values into pmSubtractionKernels so that this can be calculated from a kernel that has been read in (very useful for debugging, also nice to have a record of the quality of the fit).

File:
1 edited

Legend:

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

    r19475 r19532  
    2222    psArray *subRegions = args->data[3]; // Regions for PSF-matching
    2323    psArray *subKernels = args->data[4]; // Kernels for PSF-matching
    24 
    25     psArray *inspect = ppStackReadoutInitial(config, outRO, thread->readouts, subRegions, subKernels);
     24    psVector *addVariance = args->data[5]; // Additional variance when rejecting
     25
     26    psArray *inspect = ppStackReadoutInitial(config, outRO, thread->readouts,
     27                                             subRegions, subKernels, addVariance);
    2628
    2729    job->results = inspect;
     
    7577
    7678psArray *ppStackReadoutInitial(const pmConfig *config, pmReadout *outRO, const psArray *readouts,
    77                                const psArray *regions, const psArray *kernels)
     79                               const psArray *regions, const psArray *kernels, const psVector *addVariance)
    7880{
    7981    assert(config);
     
    8486    assert(readouts->n == regions->n);
    8587    assert(regions->n == kernels->n);
     88    assert(addVariance && addVariance->n == readouts->n && addVariance->type.type == PS_TYPE_F32);
    8689    static int sectionNum = 0;          // Section number; for debugging outputs
    8790
     
    127130        }
    128131
    129         stack->data[i] = pmStackDataAlloc(ro, weighting);
     132        stack->data[i] = pmStackDataAlloc(ro, weighting, addVariance->data.F32[i]);
    130133    }
    131134
     
    221224        }
    222225
    223         pmStackData *data = pmStackDataAlloc(ro, weighting);
     226        pmStackData *data = pmStackDataAlloc(ro, weighting, NAN);
    224227        data->reject = psMemIncrRefCounter(rejected->data[i]);
    225228        stack->data[i] = data;
Note: See TracChangeset for help on using the changeset viewer.