IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 5, 2005, 11:51:26 AM (21 years ago)
Author:
Paul Price
Message:

Removing stac-specific configuration out of functions so that I can use them in other programs. Program appears to work as it did before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/stacCombine.c

    r3610 r3666  
    6262                 int nReject,           // Number of rejection iterations
    6363                 psImage *region,       // Region to combine
    64                  stacConfig *config     // Configuration
     64                 psVector *saturated,   // Saturation limits for each image
     65                 psVector *bad,         // Bad pixel limits for each image
     66                 float reject           // Rejection (k-sigma)
    6567    )
    6668{
     
    6870    int numRows = ((psImage*)images->data[0])->numRows; // Image size
    6971    int numCols = ((psImage*)images->data[0])->numCols; // Image size
    70     psVector *saturated = config->saturated;// Saturation limits
    71     psVector *bad = config->bad;        // Bad pixel limits
    72     float reject = config->reject;      // Rejection (k-sigma)
    7372   
    7473    // Check dimensions for consistency
     
    188187
    189188#ifdef TESTING
    190     // Write rejection images out to check
    191     if (nReject > 0) {
    192         for (int i = 0; i < nImages; i++) {
    193             char rejName[MAXCHAR];      // Filename of rejection image
    194             sprintf(rejName,"%s.shiftrej",config->inputs->data[i]);
    195 
    196             psFits *rejFile = psFitsAlloc(rejName);
    197             if (!psFitsWriteImage(rejFile, NULL, (*rejected)->data[i], 0, NULL)) {
    198                 psErrorStackPrint(stderr, "Unable to write image: %s\n", rejName);
    199             }
    200             psTrace("stac", 1, "Rejection image written to %s\n", rejName);
    201             psFree(rejFile);
    202         }
    203     }
    204189    // Write chi^2 image
    205190    iteration++;
     
    210195        psErrorStackPrint(stderr, "Unable to write image: %s\n", chiName);
    211196    }
    212     psTrace("stac", 1, "Chi^2 image written to %s\n", chiName);
     197    psTrace("stac.combine", 1, "Chi^2 image written to %s\n", chiName);
    213198    psFree(chiFile);
    214199    psFree(chi2);
    215200#endif
    216 
    217201
    218202    // Clean up
Note: See TracChangeset for help on using the changeset viewer.