IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2009, 5:02:43 PM (17 years ago)
Author:
Paul Price
Message:

Don't care about variance factor any more --- covariance matrix takes care of this.

File:
1 edited

Legend:

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

    r24846 r25045  
    222222            }
    223223            psFitsClose(fits);
    224 
    225             // Add in variance factor
    226             pmSubtractionKernels *kernels = psMetadataLookupPtr(NULL, conv->analysis,
    227                                                                 PM_SUBTRACTION_ANALYSIS_KERNEL); // Kernels
    228             float vf = pmSubtractionVarianceFactor(kernels, 0.0, 0.0, false); // Variance factor
    229             psMetadataItem *vfItem = psMetadataLookup(readout->parent->concepts, "CELL.VARFACTOR");
    230             if (!isfinite(vf)) {
    231                 vf = 1.0;
    232             }
    233             if (isfinite(vfItem->data.F32)) {
    234                 vfItem->data.F32 *= vf;
    235             } else {
    236                 vfItem->data.F32 = vf;
    237             }
    238224
    239225            if (!readImage(&readout->image, options->imageNames->data[index], config) ||
     
    413399            }
    414400
    415             // Set the variance factor
    416             psMetadataItem *vfItem = psMetadataLookup(readout->parent->concepts, "CELL.VARFACTOR");
    417             float vf = psMetadataLookupF32(NULL, conv->analysis, PM_SUBTRACTION_ANALYSIS_VARFACTOR_1);
    418             if (!isfinite(vf)) {
    419                 vf = 1.0;
    420             }
    421             if (isfinite(vfItem->data.F32)) {
    422                 vfItem->data.F32 *= vf;
    423             } else {
    424                 vfItem->data.F32 = vf;
    425             }
    426 
    427401            // Replace original images with convolved
    428402            psFree(readout->image);
     
    512486        psBinaryOp(readout->variance, readout->variance, "*", psScalarAlloc(PS_SQR(norm), PS_TYPE_F32));
    513487    }
    514    
     488
    515489    // Ensure the background value is zero
    516490    psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background
     
    521495    } else {
    522496      if (!psMetadataLookupBool(NULL, config->arguments, "PPSTACK.SKIP.BG.SUB")) {
    523         psLogMsg("ppStack", PS_LOG_INFO, "Correcting convolved image background by %lf (+/- %lf)",
    524                 psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), psStatsGetValue(bg, PS_STAT_ROBUST_STDEV));
    525         (void)psBinaryOp(readout->image, readout->image, "-",
    526                         psScalarAlloc(psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32));
     497        psLogMsg("ppStack", PS_LOG_INFO, "Correcting convolved image background by %lf (+/- %lf)",
     498                psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), psStatsGetValue(bg, PS_STAT_ROBUST_STDEV));
     499        (void)psBinaryOp(readout->image, readout->image, "-",
     500                        psScalarAlloc(psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32));
    527501      }
    528502    }
    529    
     503
    530504
    531505    // Measure the variance level for the weighting
Note: See TracChangeset for help on using the changeset viewer.