Changeset 23965 for trunk/magic/remove/src/streaksio.c
- Timestamp:
- Apr 24, 2009, 2:19:31 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/magic/remove/src/streaksio.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/magic/remove/src/streaksio.c
r23946 r23965 13 13 // if remove is true the calling program is streaksremove and the recovery files are outputs 14 14 // if false the recovery files are inputs 15 streakFiles *openFiles(pmConfig *config, bool remove )15 streakFiles *openFiles(pmConfig *config, bool remove, char *program_name) 16 16 { 17 17 bool status; … … 21 21 22 22 sf->config = config; 23 sf->program_name = basename(program_name); 23 24 24 25 // error checking is done by sFileOpen. If a file can't be opened we just exit … … 914 915 deleteFile(sFile *sfile) 915 916 { 916 #if 0917 // XXX API for nebDelete has changed; need to fix this later918 917 if (sfile->inNebulous) { 919 918 nebServer *server = getNebServer(NULL); … … 930 929 } 931 930 } 932 #endif933 931 return true; 934 932 } … … 1018 1016 } 1019 1017 if (printCounts) { 1020 p rintf("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")); 1021 1019 int totalPixels = image->numRows * image->numCols; 1022 p rintf("pixels: %10ld\n", totalPixels);1023 p rintf("masked pixels: %10ld %4.2f%%\n", maskedPixels, 100. * maskedPixels / totalPixels);1024 p rintf("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); 1025 1023 if (weight) { 1026 p rintf("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); 1027 1025 } 1028 1026 } … … 1050 1048 strkGetMaskValues(streakFiles *sfiles, psU32 *maskStreak, psU32 *maskMask) 1051 1049 { 1052 if (sfiles->inMask ->header) {1050 if (sfiles->inMask && sfiles->inMask->header) { 1053 1051 if (!pmConfigMaskReadHeader(sfiles->config, sfiles->inMask->header)) { 1054 1052 streaksExit("failed to read mask values from file", PS_EXIT_CONFIG_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.
