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/stacErrorImages.c

    r3375 r3666  
    44
    55psArray *stacErrorImages(psArray *inputs, // Array of input images
    6                          stacConfig *config // Configuration details
     6                         float gain,    // Gain, in e/ADU
     7                         float rn       // Read noise, in e
    78    )
    89{
    9     float invGain = 1.0/config->gain;   // Inverse square root of gain
    10     float rn = config->readnoise/config->gain; // Read noise in ADU
     10    float invGain = 1.0/gain;           // Inverse square root of gain
     11    rn /= gain;                         // Read noise in ADU
    1112    psArray *errors = psArrayAlloc(inputs->n);
    1213
     
    3233        // Put image onto the array
    3334        errors->data[i] = error;
    34  
    35 #ifdef TESTING
    36         // Write error image out to check
    37         char errName[MAXCHAR];          // Filename of error image
    38         sprintf(errName,"%s.err",config->inputs->data[i]);
    39         psFits *errorFile = psFitsAlloc(errName);
    40         if (!psFitsWriteImage(errorFile, NULL, error, 0, NULL)) {
    41             psErrorStackPrint(stderr, "Unable to write image: %s\n", errName);
    42         }
    43         psTrace("stac", 1, "Error image written to %s\n", errName);
    44         psFree(errorFile);
    45 #endif
    46 
    4735    }
    4836
Note: See TracChangeset for help on using the changeset viewer.