IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35868


Ignore:
Timestamp:
Jul 31, 2013, 12:53:02 PM (13 years ago)
Author:
watersc1
Message:

Fix SCL_ values to now have scale = 0.0 when an image is rejected. Fix covariance factor that was causing over-rejection on simple 1DG kernels.

Location:
trunk/ppStack/src
Files:
2 edited

Legend:

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

    r35455 r35868  
    467467                sum += kernels->rms;
    468468                num++;
    469                 //              psLogMsg("ppStack", PS_LOG_INFO, "KERNMATCHDUMP %d %d %g %g %g\n",
    470                 //                       index,num,kernels->mean,kernels->rms,sum);
     469                //                              psLogMsg("ppStack", PS_LOG_INFO, "KERNMATCHDUMP %d %d %g %g %g %g\n",
     470                //                                       index,num,kernels->mean,kernels->rms,sum,psImageCovarianceFactor(readout->covariance));
    471471            }
    472472            psFree(iter);
    473             options->matchChi2->data.F32[index] = sum / (psImageCovarianceFactor(readout->covariance) * num);
     473
     474            // Apply the covariance factor to the chi^2 value
     475            double covar_factor = 1.0;
     476            if (type != PM_SUBTRACTION_KERNEL_SIMPLE) { // Except if we're using simple kernels.
     477              covar_factor = psImageCovarianceFactor(readout->covariance);
     478            }
     479            options->matchChi2->data.F32[index] = sum / (covar_factor * num);
    474480
    475481        }
  • trunk/ppStack/src/ppStackUpdateHeader.c

    r34800 r35868  
    9898
    9999        float value = options->norm ? pow(10.0, -0.4*options->norm->data.F32[i]) : NAN;
     100        if ((options->inputMask)&&(options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i])) {
     101          value = 0.0; // If this is NAN, then it's recorded in the header as a character string instead of a float.
     102        }
    100103        snprintf (field, 64, "SCL_%04d", i);
    101104        psMetadataAddF32(hdu->header, PS_LIST_TAIL, field, PS_META_REPLACE, "input image scale factor", value);
     
    132135        expROhdu->header = psMetadataAlloc();
    133136      }
     137
    134138      expRO->parent->parent->parent->hdu->header = psMetadataCopy(expRO->parent->parent->parent->hdu->header,
    135139                                                                  outRO->parent->parent->parent->hdu->header);
Note: See TracChangeset for help on using the changeset viewer.