IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 24, 2009, 2:19:31 PM (17 years ago)
Author:
bills
Message:

various changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/magic/remove/src/streaksio.c

    r23946 r23965  
    1313// if remove is true the calling program is streaksremove and the recovery files are outputs
    1414// if false the recovery files are inputs
    15 streakFiles *openFiles(pmConfig *config, bool remove)
     15streakFiles *openFiles(pmConfig *config, bool remove, char *program_name)
    1616{
    1717    bool status;
     
    2121
    2222    sf->config = config;
     23    sf->program_name = basename(program_name);
    2324
    2425    // error checking is done by sFileOpen. If a file can't be opened we just exit
     
    914915deleteFile(sFile *sfile)
    915916{
    916 #if 0
    917     // XXX API for nebDelete has changed; need to fix this later
    918917    if (sfile->inNebulous) {
    919918        nebServer *server = getNebServer(NULL);
     
    930929        }
    931930    }
    932 #endif
    933931    return true;
    934932}
     
    10181016        }
    10191017        if (printCounts) {
    1020             printf("time to NAN mask pixels: %f\n", psTimerClear("NAN_MASKED"));
     1018            psLogMsg(sfiles->program_name, PS_LOG_INFO, "time to NAN mask pixels: %f\n", psTimerClear("NAN_MASKED"));
    10211019            int totalPixels = image->numRows * image->numCols;
    1022             printf("pixels:        %10ld\n", totalPixels);
    1023             printf("masked pixels: %10ld %4.2f%%\n", maskedPixels, 100. * maskedPixels / totalPixels);
    1024             printf("nand pixels:   %10ld %4.2f%%\n", nandPixels, 100. * nandPixels / totalPixels);
     1020            psLogMsg(sfiles->program_name, PS_LOG_INFO, "pixels:        %10ld\n", totalPixels);
     1021            psLogMsg(sfiles->program_name, PS_LOG_INFO, "masked pixels: %10ld %4.2f%%\n", maskedPixels, 100. * maskedPixels / totalPixels);
     1022            psLogMsg(sfiles->program_name, PS_LOG_INFO, "nand pixels:   %10ld %4.2f%%\n", nandPixels, 100. * nandPixels / totalPixels);
    10251023            if (weight) {
    1026                 printf("nand weights:  %10ld %4.2f%%\n", nandWeights, 100. * nandWeights / totalPixels);
     1024                psLogMsg(sfiles->program_name, PS_LOG_INFO, "nand weights:  %10ld %4.2f%%\n", nandWeights, 100. * nandWeights / totalPixels);
    10271025            }
    10281026        }
     
    10501048strkGetMaskValues(streakFiles *sfiles, psU32 *maskStreak, psU32 *maskMask)
    10511049{
    1052     if (sfiles->inMask->header) {
     1050    if (sfiles->inMask && sfiles->inMask->header) {
    10531051        if (!pmConfigMaskReadHeader(sfiles->config, sfiles->inMask->header)) {
    10541052            streaksExit("failed to read mask values from file", PS_EXIT_CONFIG_ERROR);
Note: See TracChangeset for help on using the changeset viewer.