IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Inspection and rejection masks are now written by ppStackLoop

File:
1 edited

Legend:

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

    r19208 r19267  
    1010#include "ppStack.h"
    1111
    12 //#define REJECTION_FILES                 // Write rejection mask?
    13 //#define INSPECTION_FILES                // Write inspection mask?
    14 //#define COMBINED_FILES                  // Write combined images?
     12//#define TESTING                  // Write debugging output?
    1513
    1614
     
    7876    }
    7977
    80 #ifdef COMBINED_FILES
     78#ifdef TESTING
    8179    {
    8280        psString name = NULL;           // Name of image
     
    8583        psFree(name);
    8684        psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
    87         psFitsClose(fits);
    88     }
    89 #endif
    90 #ifdef INSPECTION_FILES
    91     for (int i = 0; i < stack->n; i++) {
    92         pmStackData *data = stack->data[i]; // Data for this image
    93         if (!data || !data->inspect) {
    94             continue;
    95         }
    96         psImage *inspected = psPixelsToMask(NULL, data->inspect,
    97                                             psRegionSet(0, outRO->image->numCols - 1,
    98                                                         0, outRO->image->numRows - 1),
    99                                             maskBad);
    100         psString name = NULL;           // Name of image
    101         psStringAppend(&name, "inspect_%03d_%03d.fits", sectionNum, i);
    102         psFits *fits = psFitsOpen(name, "w");
    103         psFree(name);
    104         psFitsWriteImage(fits, NULL, inspected, 0, NULL);
    105         psFree(inspected);
    10685        psFitsClose(fits);
    10786    }
     
    208187    }
    209188
    210 #ifdef REJECTION_FILES
    211     if (sectionNum == 0) {
    212         for (int i = 0; i < stack->n; i++) {
    213             pmStackData *data = stack->data[i]; // Data for this image
    214             if (!data || !data->reject) {
    215                 continue;
    216             }
    217             psImage *reject = psPixelsToMask(NULL, data->reject,
    218                                              psRegionSet(0, outRO->image->numCols - 1,
    219                                                          0, outRO->image->numRows - 1),
    220                                              maskBad);
    221             psString name = NULL;           // Name of image
    222             psStringAppend(&name, "reject_%03d.fits", i);
    223             psFits *fits = psFitsOpen(name, "w");
    224             psFree(name);
    225             psFitsWriteImage(fits, NULL, reject, 0, NULL);
    226             psFree(reject);
    227             psFitsClose(fits);
    228         }
    229     }
    230 #endif
    231 
    232189    if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0, 0, NAN,
    233190                        numGood != num, useVariance, false)) {
     
    239196    }
    240197
    241 #ifdef COMBINED_FILES
     198#ifdef TESTING
    242199    {
    243200        psString name = NULL;           // Name of image
Note: See TracChangeset for help on using the changeset viewer.