IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 22, 2008, 9:20:13 AM (18 years ago)
Author:
Paul Price
Message:

Fixing debugging outputs so that the full range is output (incremental
reads were overwriting each other).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080207/ppStack/src/ppStackReadout.c

    r16424 r16602  
    1010#include "ppStack.h"
    1111
    12 
    1312#define WCS_TOLERANCE 0.001             // Tolerance for WCS
    1413
    1514//#define REJECTION_FILES                 // Write rejection mask?
    1615//#define INSPECTION_FILES                // Write inspection mask?
     16
     17static int sectionNum = 0;              // Section number; for debugging outputs
     18
    1719
    1820bool ppStackReadout(const pmConfig *config, pmReadout *outRO, const psArray *readouts,
     
    2628    assert(readouts->n == regions->n);
    2729    assert(regions->n == kernels->n);
     30
    2831
    2932    // Get the recipe values
     
    113116#ifdef INSPECTION_FILES
    114117    {
    115         psFits *fits = psFitsOpen("combined.fits", "w");
     118        psString name = NULL;           // Name of image
     119        psStringAppend(&name, "combined_%03d.fits", sectionNum);
     120        psFits *fits = psFitsOpen(name, "w");
     121        psFree(name);
    116122        psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
    117123        psFitsClose(fits);
     
    121127        pmStackData *data = stack->data[i]; // Data for this image
    122128        psImage *inspected = psPixelsToMask(NULL, data->pixels,
    123                                             psRegionSet(0, data->readout->image->numCols,
    124                                                         0, data->readout->image->numRows),
     129                                            psRegionSet(0, data->readout->image->numCols - 1,
     130                                                        0, data->readout->image->numRows - 1),
    125131                                            maskBlank);
    126132        psString name = NULL;           // Name of image
    127         psStringAppend(&name, "inspect%03d.fits", i);
     133        psStringAppend(&name, "inspect_%03d_%03d.fits", sectionNum, i);
    128134        psFits *fits = psFitsOpen(name, "w");
    129135        psFree(name);
     
    156162        }
    157163        psImage *rejected = psPixelsToMask(NULL, data->pixels,
    158                                            psRegionSet(0, data->readout->image->numCols,
    159                                                        0, data->readout->image->numRows),
     164                                           psRegionSet(0, data->readout->image->numCols - 1,
     165                                                       0, data->readout->image->numRows - 1),
    160166                                           maskBlank);
    161167        psString name = NULL;           // Name of image
    162         psStringAppend(&name, "reject%03d.fits", i);
     168        psStringAppend(&name, "reject_%03d_%03d.fits", sectionNum, i);
    163169        psFits *fits = psFitsOpen(name, "w");
    164170        psFree(name);
     
    194200    psFree(stack);
    195201
     202    sectionNum++;
     203
    196204    return true;
    197205}
Note: See TracChangeset for help on using the changeset viewer.