IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21525


Ignore:
Timestamp:
Feb 17, 2009, 3:38:42 PM (17 years ago)
Author:
Paul Price
Message:

Removing normalisation of the variance maps --- the covariance matrix provides the correct answer.

Location:
trunk/ppStack/src
Files:
3 edited

Legend:

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

    r21477 r21525  
    176176    psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-limit", 0, "Limit on star rejection fraction for successful iteration", NAN);
    177177    psMetadataAddF32(arguments, PS_LIST_TAIL, "-zp-star-sys", 0, "Estimated systematic error", NAN);
    178     psMetadataAddBool(arguments, PS_LIST_TAIL, "-renorm", 0, "Renormalise variance maps?", false);
    179     psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0,
    180                      "Statistic for mean in renormalisation", NULL);
    181     psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0,
    182                      "Statistic for stdev in renormalisation", NULL);
    183     psMetadataAddF32(arguments, PS_LIST_TAIL, "-renorm-width", 0, "Gaussian width for renormalisation", NAN);
    184     psMetadataAddS32(arguments, PS_LIST_TAIL, "-renorm-num", 0, "Number of samples for renormalisation", 0);
    185178    psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL);
    186179    psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL);
     
    280273    }
    281274
    282     if (psMetadataLookupBool(NULL, arguments, "-renorm") ||
    283         psMetadataLookupBool(NULL, recipe, "RENORM")) {
    284         psMetadataAddBool(arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true);
    285     }
    286     VALUE_ARG_RECIPE_INT("-renorm-num", "RENORM.NUM", S32, 0);
    287     VALUE_ARG_RECIPE_FLOAT("-renorm-width", "RENORM.WIDTH", F32);
    288     valueArgRecipeStr(arguments, recipe, "-renorm-mean",  "RENORM.MEAN", recipe);
    289     valueArgRecipeStr(arguments, recipe, "-renorm-stdev", "RENORM.STDEV", recipe);
    290 
    291275    valueArgRecipeStr(arguments, recipe, "-temp-image",    "TEMP.IMAGE",  recipe);
    292276    valueArgRecipeStr(arguments, recipe, "-temp-mask",     "TEMP.MASK",   recipe);
  • trunk/ppStack/src/ppStackLoop.c

    r21477 r21525  
    11511151    psLogMsg("ppStack", PS_LOG_INFO, "Stage 7 : WCS & JPEGS : %f sec", psTimerClear("PPSTACK_STEPS"));
    11521152
    1153     if (psMetadataLookupBool(&mdok, recipe, "RENORM")) {
    1154         // Statistics for renormalisation
    1155         psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    1156                                                                                 "RENORM.MEAN"));
    1157         psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    1158                                                                                  "RENORM.STDEV"));
    1159         int renormNum = psMetadataLookupS32(&mdok, recipe, "RENORM.NUM"); // Number of samples
    1160         float renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width of Gaussian phot
    1161         psImageMaskType maskValue = pmConfigMaskGet("BLANK", config); // Bits to mask
    1162         if (!pmReadoutVarianceRenormPhot(outRO, maskValue, renormNum, renormWidth,
    1163                                          renormMean, renormStdev, NULL)) {
    1164             psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");
    1165             psFree(outRO);
    1166             return false;
    1167         }
    1168     }
    1169 
    1170     psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Renormalization : %f sec", psTimerClear("PPSTACK_STEPS"));
    1171 
    11721153    if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) {
    11731154        psTrace("ppStack", 1, "Photometering stacked image....\n");
     
    11991180    }
    12001181
    1201     psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));
     1182    psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));
    12021183
    12031184    psThreadPoolFinalize();
     
    12541235    }
    12551236
    1256     psLogMsg("ppStack", PS_LOG_INFO, "Stage 10 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));
     1237    psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));
    12571238
    12581239    memDump("finish");
  • trunk/ppStack/src/ppStackMatch.c

    r21477 r21525  
    189189
    190190    bool mdok;                          // Status of MD lookup
    191     bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise variances?
    192191    float penalty = psMetadataLookupF32(NULL, ppsub, "PENALTY"); // Penalty for wideness
    193192    int threads = psMetadataLookupS32(NULL, config->arguments, "-threads"); // Number of threads
     
    374373            }
    375374#endif
    376 
    377             // Renormalise the variances if desired
    378             if (renorm) {
    379                 // Statistics for renormalisation
    380                 psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    381                                                                                         "RENORM.MEAN"));
    382                 psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    383                                                                                          "RENORM.STDEV"));
    384 
    385                 if (!pmReadoutVarianceRenormPixels(readout, maskBad, renormMean, renormStdev, rng)) {
    386                     psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");
    387                     psFree(output);
    388                     return false;
    389                 }
    390             }
    391375
    392376            if (threads > 0) {
     
    562546    }
    563547
    564     // Renormalise the variances if desired
    565     if (renorm) {
    566         // Statistics for renormalisation
    567         psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    568                                                                                 "RENORM.MEAN"));
    569         psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(&mdok, recipe,
    570                                                                                  "RENORM.STDEV"));
    571 
    572         if (!pmReadoutVarianceRenormPixels(readout, maskBad, renormMean, renormStdev, rng)) {
    573             psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");
    574             psFree(output);
    575             return false;
    576         }
    577     }
    578 
    579548    // Ensure the background value is zero
    580549    psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background
Note: See TracChangeset for help on using the changeset viewer.