IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2008, 5:36:56 PM (18 years ago)
Author:
Paul Price
Message:

First attempt to switch over to new mask setup.

File:
1 edited

Legend:

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

    r18559 r18591  
    3030    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
    3131    int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
    32     psMaskType maskBad = pmConfigMaskGet(psMetadataLookupStr(NULL, recipe, "MASK.BAD"), config); // Value to mask
     32
     33    psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch
     34    psMaskType maskOut = pmConfigMaskGet("BLANK", config); // Bits to mask after pmSubtractionMatch
     35
    3336    bool mdok;                          // Status of MD lookup
    3437    bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise variances?
     
    4144    float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness
    4245
    43     if (!pmReadoutMaskNonfinite(readout, maskBad)) {
     46    if (!pmReadoutMaskNonfinite(readout, maskIn)) {
    4447        psError(PS_ERR_UNKNOWN, false, "Unable to mask non-finite pixels in readout.");
    4548        return false;
     
    6467        int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order
    6568        int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel
    66         psMaskType maskBlank = pmConfigMaskGet(psMetadataLookupStr(NULL, recipe, "MASK.BLANK"),
    67                                             config); // Mask for blank reg.
    6869        float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction
    6970        bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters?
     
    114115                                sources, stampsName, type, size, order, widths, orders, inner, ringsOrder,
    115116                                binning, penalty, optimum, optWidths, optOrder, optThresh, iter, rej,
    116                                 maskBad, maskBlank, badFrac, PM_SUBTRACTION_MODE_1)) {
     117                                maskIn, maskOut, badFrac, PM_SUBTRACTION_MODE_1)) {
    117118            psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
    118119            psFree(fake);
     
    200201    if (renorm) {
    201202        psLogMsg("ppStack", PS_LOG_INFO, "Renormalising variance map.");
    202         if (!pmReadoutWeightRenorm(readout, maskBad, renormMean, renormStdev, renormWidth, rng)) {
     203        if (!pmReadoutWeightRenorm(readout, maskOut, renormMean, renormStdev, renormWidth, rng)) {
    203204            psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");
    204205            psFree(output);
     
    209210    // Ensure the background value is zero
    210211    psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); // Statistics for background
    211     if (!psImageBackground(bg, NULL, readout->image, readout->mask, maskBad, rng)) {
     212    if (!psImageBackground(bg, NULL, readout->image, readout->mask, maskOut, rng)) {
    212213        psWarning("Can't measure background for image.");
    213214        psErrorClear();
Note: See TracChangeset for help on using the changeset viewer.