Changeset 23965
- Timestamp:
- Apr 24, 2009, 2:19:31 PM (17 years ago)
- Location:
- trunk/magic/remove/src
- Files:
-
- 4 edited
-
streaksio.c (modified) (6 diffs)
-
streaksrelease.c (modified) (1 diff)
-
streaksremove.c (modified) (7 diffs)
-
streaksreplace.c (modified) (1 diff)
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); -
trunk/magic/remove/src/streaksrelease.c
r23257 r23965 37 37 38 38 // Does true work here? 39 streakFiles *sfiles = openFiles(config, true );39 streakFiles *sfiles = openFiles(config, true, argv[0]); 40 40 41 41 if (sfiles->stage == IPP_STAGE_RAW) { -
trunk/magic/remove/src/streaksremove.c
r23936 r23965 34 34 } 35 35 36 streakFiles *sfiles = openFiles(config, true );36 streakFiles *sfiles = openFiles(config, true, argv[0]); 37 37 setupAstrometry(sfiles); 38 38 … … 65 65 } 66 66 psF64 cwp_t = psTimerClear("COMPUTE_WARPED_PIXELS"); 67 p rintf("time to compute warped pixels: %f\n", cwp_t);67 psLogMsg("streaksremove", PS_LOG_INFO, "time to compute warped pixels: %f\n", cwp_t); 68 68 } 69 69 … … 113 113 sfiles->inImage->numCols, sfiles->inImage->numRows); 114 114 115 p rintf("time to get streak pixels: %f\n", psTimerClear("GET_STREAK_PIXELS"));115 psLogMsg("streaksremove", PS_LOG_INFO, "time to get streak pixels: %f\n", psTimerClear("GET_STREAK_PIXELS")); 116 116 117 117 … … 124 124 exciseNonWarpedPixels(sfiles, maskStreak); 125 125 126 p rintf("time to excise non warped pixels: %f\n", psTimerClear("EXCISE_NON_WARPED"));126 psLogMsg("streaksremove", PS_LOG_INFO, "time to excise non warped pixels: %f\n", psTimerClear("EXCISE_NON_WARPED")); 127 127 } 128 128 totalStreakPixels += psArrayLength(pixels); … … 140 140 } 141 141 } 142 p rintf("time to remove streak pixels: %f\n", psTimerClear("REMOVE_STREAKS"));142 psLogMsg("streaksremove", PS_LOG_INFO, "time to remove streak pixels: %f\n", psTimerClear("REMOVE_STREAKS")); 143 143 144 144 if (nanForRelease) { … … 161 161 writeImages(sfiles, exciseImageCube); 162 162 163 p rintf("time to process component %d: %f\n", sfiles->extnum, psTimerClear("PROCESS_COMPONENT"));163 psLogMsg("streaksremove", PS_LOG_INFO, "time to process component %d: %f\n", sfiles->extnum, psTimerClear("PROCESS_COMPONENT")); 164 164 } while (streakFilesNextExtension(sfiles)); 165 165 166 166 psFree(streaks); 167 167 168 p rintf("pixels: %ld streak pixels: %ld %4.2f%%\n", totalPixels, totalStreakPixels, 100. * totalStreakPixels / totalPixels);168 psLogMsg("streaksremove", PS_LOG_INFO, "pixels: %ld streak pixels: %ld %4.2f%%\n", totalPixels, totalStreakPixels, 100. * totalStreakPixels / totalPixels); 169 169 170 170 psTimerStart("CLOSE_IMAGES"); 171 171 // close all files 172 172 closeImages(sfiles); 173 p rintf("time to close images: %f\n", psTimerClear("CLOSE_IMAGES"));173 psLogMsg("streaksremove", PS_LOG_INFO, "time to close images: %f\n", psTimerClear("CLOSE_IMAGES")); 174 174 175 175 // NOTE: from here on we can't just quit if something goes wrong. … … 218 218 streaksNebulousCleanup(); 219 219 pmConfigDone(); 220 p rintf("time to run streaksremove: %f\n", psTimerClear("STREAKSREMOVE"));220 psLogMsg("streaksremove", PS_LOG_INFO, "time to run streaksremove: %f\n", psTimerClear("STREAKSREMOVE")); 221 221 psLibFinalize(); 222 222 -
trunk/magic/remove/src/streaksreplace.c
r23258 r23965 33 33 } 34 34 35 streakFiles *sfiles = openFiles(config, false );35 streakFiles *sfiles = openFiles(config, false, argv[0]); 36 36 37 37 if (sfiles->stage == IPP_STAGE_RAW) {
Note:
See TracChangeset
for help on using the changeset viewer.
