IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28121


Ignore:
Timestamp:
May 26, 2010, 3:53:34 PM (16 years ago)
Author:
Paul Price
Message:

Failure to have a reasonable variance renormalisation factor is now a data quality issue.

Location:
trunk/ppSub/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSub.h

    r28043 r28121  
    111111
    112112/// Perform Variance correction (rescale within a modest range)
    113 bool ppSubVarianceRescale(pmConfig *config   ///< Configuration
     113bool ppSubVarianceRescale(pmConfig *config,   ///< Configuration
     114                          ppSubData *data     ///< Processing data
    114115    );
    115116
  • trunk/ppSub/src/ppSubErrorCodes.dat

    r26982 r28121  
    1111NO_OVERLAP              No overlap between input and skycell
    1212PROG                    Programming error
     13VARIANCE                Variance renormalisation out of bounds
  • trunk/ppSub/src/ppSubLoop.c

    r28043 r28121  
    119119
    120120    // Perform Variance correction (rescale within a modest range)
    121     if (!ppSubVarianceRescale(config)) {
     121    if (!ppSubVarianceRescale(config, data)) {
    122122        psError(psErrorCodeLast(), false, "Unable to rescale variance.");
    123123        return false;
     124    }
     125
     126    if (data->quality) {
     127        // Done all we can do up to this point
     128        return true;
    124129    }
    125130
  • trunk/ppSub/src/ppSubVarianceRescale.c

    r27317 r28121  
    2222#include "ppSub.h"
    2323
    24 bool ppSubVarianceRescale(pmConfig *config)
     24bool ppSubVarianceRescale(pmConfig *config, ppSubData *data)
    2525{
    2626    psAssert(config, "Require configuration");
     
    6060    }
    6161
    62     return pmReadoutVarianceRenormalise(readout, maskBad, num, minValid, maxValid);
     62    if (!pmReadoutVarianceRenormalise(readout, maskBad, num, minValid, maxValid)) {
     63        psErrorStackPrint(stderr, "Unable to renormalise variances");
     64        psWarning("Unable to renormalise variances --- suspect bad data quality.");
     65        // Allow the convolved and subtracted images to be written
     66        ppSubDataQuality(data, PPSUB_ERR_VARIANCE,
     67                         PPSUB_FILES_INPUT | PPSUB_FILES_PHOT_SUB | PPSUB_FILES_PHOT_INV |
     68                         PPSUB_FILES_PSF | PPSUB_FILES_PHOT);
     69    }
     70
     71    return true;
    6372}
Note: See TracChangeset for help on using the changeset viewer.