IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 19, 2009, 7:59:50 AM (17 years ago)
Author:
beaumont
Message:

Added visualizations to ppSub. Set up a single variable in pmVisual to control when plots are drawn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branch_20090215/ppStack/src/ppStackLoop.c

    r21477 r21536  
    480480            psMetadataAddF32(stats, PS_LIST_TAIL, "STAMP.NUM", PS_META_DUPLICATE_OK,
    481481                             "Number of stamps", kernels->numStamps);
     482            float deconv = psMetadataLookupF32(NULL, readout->analysis,
     483                                               PM_SUBTRACTION_ANALYSIS_DECONV_MAX); // Deconvolution fraction
     484            psMetadataAddF32(stats, PS_LIST_TAIL, "KERNEL.DECONV", PS_META_DUPLICATE_OK,
     485                             "Deconvolution fraction for kernel", deconv);
    482486            psMetadataAddF32(stats, PS_LIST_TAIL, "PPSTACK.WEIGHTING", PS_META_DUPLICATE_OK,
    483487                             "Weighting for image", weightings->data.F32[i]);
     
    503507            psStringAppend(&name, "covariance_%d.fits", i);
    504508            writeImage(name, hdu->header, readout->covariance->image, config);
     509            pmStackVisualPlotTestImage(readout->covariance->image, name);
    505510            psFree(name);
    506511        }
     
    801806#ifdef TESTING
    802807    writeImage("combined_initial.fits", NULL, outRO->image, config);
     808    pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits");
    803809#endif
    804810
     
    884890                psString name = NULL;           // Name of image
    885891                psStringAppend(&name, "inspect_%03d.fits", i);
     892                pmStackVisualPlotTestImage(mask, name);
    886893                psFits *fits = psFitsOpen(name, "w");
    887894                psFree(name);
     
    901908                psString name = NULL;           // Name of image
    902909                psStringAppend(&name, "reject_%03d.fits", i);
     910                pmStackVisualPlotTestImage(mask, name);
    903911                psFits *fits = psFitsOpen(name, "w");
    904912                psFree(name);
     
    10341042
    10351043#ifdef TESTING
     1044    pmStackVisualPlotTestImage(outRO->image, "combined_initial.fits");
    10361045    writeImage("combined_final.fits", NULL, outRO->image, config);
    10371046#endif
     
    11511160    psLogMsg("ppStack", PS_LOG_INFO, "Stage 7 : WCS & JPEGS : %f sec", psTimerClear("PPSTACK_STEPS"));
    11521161
    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 
    11721162    if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) {
    11731163        psTrace("ppStack", 1, "Photometering stacked image....\n");
     
    11991189    }
    12001190
    1201     psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));
     1191    psLogMsg("ppStack", PS_LOG_INFO, "Stage 8 : Photometry Analysis : %f sec", psTimerClear("PPSTACK_STEPS"));
    12021192
    12031193    psThreadPoolFinalize();
     
    12541244    }
    12551245
    1256     psLogMsg("ppStack", PS_LOG_INFO, "Stage 10 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));
     1246    psLogMsg("ppStack", PS_LOG_INFO, "Stage 9 : Final Output : %f sec", psTimerClear("PPSTACK_STEPS"));
    12571247
    12581248    memDump("finish");
Note: See TracChangeset for help on using the changeset viewer.