IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19268


Ignore:
Timestamp:
Aug 28, 2008, 2:48:22 PM (18 years ago)
Author:
Paul Price
Message:

Moving the inspect/reject debugging mask output to here, so that the
entire image can be written instead of just chunks (as was done by
having it in ppStackReadout). Also ensure masked regions really look
masked, via pmReadoutMaskApply.

File:
1 edited

Legend:

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

    r19214 r19268  
    1212#include "ppStack.h"
    1313
    14 //#define TESTING
     14#define TESTING
    1515
    1616#define WCS_TOLERANCE 0.001             // Tolerance for WCS
     
    619619            psLogMsg("ppStack", PS_LOG_INFO, "%ld total pixels to inspect from image %d", inspect->n, i);
    620620
     621#ifdef TESTING
     622            {
     623                psImage *pix = psPixelsToMask(NULL, inspect, psRegionSet(0, outRO->image->numCols - 1,
     624                                                                         0, outRO->image->numRows - 1), 0xff);
     625                psString name = NULL;           // Name of image
     626                psStringAppend(&name, "inspect_%03d.fits", i);
     627                psFits *fits = psFitsOpen(name, "w");
     628                psFree(name);
     629                psFitsWriteImage(fits, NULL, pix, 0, NULL);
     630                psFree(pix);
     631                psFitsClose(fits);
     632            }
     633#endif
     634
    621635            psPixels *reject = pmStackReject(inspect, NULL, threshold, subRegions->data[i],
    622636                                             subKernels->data[i]); // Pixels to reject
     637
     638#ifdef TESTING
     639            {
     640                psImage *pix = psPixelsToMask(NULL, reject, psRegionSet(0, outRO->image->numCols - 1,
     641                                                                        0, outRO->image->numRows - 1), 0xff);
     642                psString name = NULL;           // Name of image
     643                psStringAppend(&name, "reject_%03d.fits", i);
     644                psFits *fits = psFitsOpen(name, "w");
     645                psFree(name);
     646                psFitsWriteImage(fits, NULL, pix, 0, NULL);
     647                psFree(pix);
     648                psFitsClose(fits);
     649            }
     650#endif
     651
    623652            psFree(inspect);
    624653            if (!reject) {
     
    727756        }
    728757        psFree(readouts);
     758
     759        // Ensure masked regions really look masked
     760        if (!pmReadoutMaskApply(outRO, maskBad)) {
     761            psWarning("Unable to apply mask");
     762        }
    729763
    730764        // Close up
Note: See TracChangeset for help on using the changeset viewer.