IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16686


Ignore:
Timestamp:
Feb 27, 2008, 11:17:39 AM (18 years ago)
Author:
Paul Price
Message:

Adding additional debugging output. Correcting combination areas for the overlap.

Location:
trunk/ppStack/src
Files:
3 edited

Legend:

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

    r15451 r16686  
    2323        goto die;
    2424    }
     25
     26    psTraceSetLevel("ppStack", 5);
    2527
    2628    if (!ppStackArguments(argc, argv, config)) {
  • trunk/ppStack/src/ppStackLoop.c

    r16605 r16686  
    1010
    1111#include "ppStack.h"
     12
     13#define TESTING
    1214
    1315// Here follows lists of files for activation/deactivation at various stages.  Each must be NULL-terminated.
     
    344346    psFree(targetPSF);
    345347
     348
     349#ifdef TESTING
     350    psTraceSetLevel("psModules.imcombine", 7);
     351#endif
     352
     353
    346354    // Stack the convolved files
    347355    {
  • trunk/ppStack/src/ppStackReadout.c

    r16682 r16686  
    1414#define REJECTION_FILES                 // Write rejection mask?
    1515#define INSPECTION_FILES                // Write inspection mask?
     16#define COMBINED_FILES                  // Write combined images?
    1617
    1718static int sectionNum = 0;              // Section number; for debugging outputs
     
    3940    bool useVariance = psMetadataLookupBool(&mdok, config->arguments, "VARIANCE"); // Use variance for rejection?
    4041    bool safe = psMetadataLookupBool(&mdok, config->arguments, "SAFE"); // Play safe when combining small numbers of pixels?
     42    psMetadata *ppsub = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
     43    int kernelSize = psMetadataLookupS32(NULL, ppsub, "KERNEL.SIZE"); // Kernel half-size
     44
    4145
    4246    int num = readouts->n;              // Number of inputs
     
    109113    }
    110114
    111     if (!pmStackCombine(outRO, stack, maskBad, maskBlank, iter, combineRej, useVariance, safe)) {
     115    if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, iter, combineRej, useVariance, safe)) {
    112116        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts with rejection.");
    113117        psFree(fpaList);
     
    117121    }
    118122
     123#ifdef COMBINED_FILES
     124    {
     125        psString name = NULL;           // Name of image
     126        psStringAppend(&name, "combined1_%03d.fits", sectionNum);
     127        psFits *fits = psFitsOpen(name, "w");
     128        psFree(name);
     129        psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
     130        psFitsClose(fits);
     131    }
     132#endif
    119133#ifdef INSPECTION_FILES
    120     {
    121         psString name = NULL;           // Name of image
    122         psStringAppend(&name, "combined_%03d.fits", sectionNum);
    123         psFits *fits = psFitsOpen(name, "w");
    124         psFree(name);
    125         psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
    126         psFitsClose(fits);
    127     }
    128 
    129134    for (int i = 0; i < stack->n; i++) {
    130135        pmStackData *data = stack->data[i]; // Data for this image
     
    178183#endif
    179184
    180     if (!pmStackCombine(outRO, stack, maskBad, maskBlank, 0, combineRej, useVariance, false)) {
     185    if (!pmStackCombine(outRO, stack, maskBad, maskBlank, kernelSize, 0, combineRej, useVariance, false)) {
    181186        psError(PS_ERR_UNKNOWN, false, "Unable to combine input readouts.");
    182187        psFree(fpaList);
     
    186191    }
    187192
     193#ifdef COMBINED_FILES
     194    {
     195        psString name = NULL;           // Name of image
     196        psStringAppend(&name, "combined2_%03d.fits", sectionNum);
     197        psFits *fits = psFitsOpen(name, "w");
     198        psFree(name);
     199        psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
     200        psFitsClose(fits);
     201    }
     202#endif
     203
    188204    psMetadataAddF32(outCell->concepts, PS_LIST_TAIL, "CELL.EXPOSURE", PS_META_REPLACE,
    189205                     "Summed exposure time (sec)", totExposure);
Note: See TracChangeset for help on using the changeset viewer.