Changeset 8405
- Timestamp:
- Aug 16, 2006, 4:18:39 PM (20 years ago)
- Location:
- trunk/ppMerge
- Files:
-
- 10 edited
-
configure.ac (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/ppMerge.c (modified) (2 diffs)
-
src/ppMerge.h (modified) (1 diff)
-
src/ppMergeCheckInputs.c (modified) (1 diff)
-
src/ppMergeCombine.c (modified) (4 diffs)
-
src/ppMergeConfig.c (modified) (1 diff)
-
src/ppMergeData.c (modified) (2 diffs)
-
src/ppMergeData.h (modified) (1 diff)
-
src/ppMergeOptions.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMerge/configure.ac
r7874 r8405 35 35 PKG_CHECK_MODULES([PSLIB], [pslib >= 0.9.0]) 36 36 PKG_CHECK_MODULES([PSMODULE], [psmodule >= 0.0.0]) 37 PKG_CHECK_MODULES([PPSTATS], [ppStats >= 0.0.0]) 37 38 38 39 dnl handle profiler building -
trunk/ppMerge/src/Makefile.am
r7874 r8405 1 1 bin_PROGRAMS = ppMerge 2 2 3 ppMerge_CFLAGS += $(P SMODULE_CFLAGS) $(PSLIB_CFLAGS)4 ppMerge_LDFLAGS += $(P SMODULE_LIBS) $(PSLIB_LIBS) -Wl,-Bdynamic3 ppMerge_CFLAGS += $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) 4 ppMerge_LDFLAGS += $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS) -Wl,-Bdynamic 5 5 6 6 ppMerge_SOURCES = \ -
trunk/ppMerge/src/ppMerge.c
r7751 r8405 2 2 #include <pslib.h> 3 3 #include <psmodules.h> 4 #include <ppStats.h> 4 5 5 6 #include "ppMerge.h" … … 49 50 ppMergeCombine(scale, zero, data, options, config); 50 51 52 if (data->statsFile) { 53 psMetadata *stats = ppStats(NULL, data->out, NULL, config); // Statistics for output FPA 54 psString statsOut = psMetadataConfigFormat(stats); // String to write out 55 fprintf(data->statsFile, "%s", statsOut); 56 psFree(statsOut); 57 psFree(stats); 58 } 59 51 60 pmFPAPrint(stdout, data->out, true, true); 52 61 -
trunk/ppMerge/src/ppMerge.h
r7067 r8405 3 3 4 4 #define TIMERNAME "ppMerge" 5 #define RECIPENAME "PPMERGE"5 #define PPMERGE_RECIPE "PPMERGE" 6 6 7 7 #endif -
trunk/ppMerge/src/ppMergeCheckInputs.c
r8069 r8405 23 23 psErrorStackPrint(stderr, "Can't open output image: %s\n", outName); 24 24 exit(EXIT_FAILURE); 25 } 26 27 // Statistics file 28 psString statsName = psMetadataLookupStr(NULL, config->arguments, "-stats"); // Name for statistics file 29 if (statsName && strlen(statsName) > 0) { 30 data->statsFile = fopen(statsName, "w"); 31 if (!data->statsFile) { 32 psLogMsg(__func__, PS_LOG_WARN, "Unable to open statistics file %s --- ignored.\n", 33 statsName); 34 } 25 35 } 26 36 -
trunk/ppMerge/src/ppMergeCombine.c
r8069 r8405 1 1 #include <stdio.h> 2 #include <unistd.h> 2 3 #include <assert.h> 3 4 #include <pslib.h> … … 12 13 if (psTraceGetLevel(__func__) > 9) { 13 14 psMemBlock **leaks = NULL; 14 int numLeaks = psMemCheckLeaks(0, &leaks, NULL, false);15 int numLeaks = psMemCheckLeaks(0, &leaks, NULL, true); 15 16 size_t largestSize = 0; 16 17 psMemId largest = 0; … … 27 28 psTrace(__func__, 0, "Memory in use: %zd\n", totalSize); 28 29 psTrace(__func__, 0, "Largest block: %ld\n", largest); 30 psTrace(__func__, 0, "sbrk(): %zd\n", sbrk(0)); 29 31 } 30 32 return; … … 121 123 } 122 124 numScan++; 125 126 memCheck(); 127 123 128 } while (numRead > 0); 124 129 psFree(readout); // Drop reference -
trunk/ppMerge/src/ppMergeConfig.c
r7829 r8405 34 34 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "-exptime", 0, "Scale by the exposure time?", false); 35 35 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-onoff", 0, "Number of on/off pairs", 0); 36 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-stats", 0, "MDC file to hold statistics ", NULL); 36 37 37 38 if (argc == 1) { -
trunk/ppMerge/src/ppMergeData.c
r7759 r8405 20 20 if (data->outFile) { 21 21 psFitsClose(data->outFile); 22 data->outFile = NULL; 23 } 24 if (data->statsFile) { 25 fclose(data->statsFile); 26 data->statsFile = NULL; 22 27 } 23 28 } … … 34 39 data->out = NULL; 35 40 data->outFile = NULL; 41 data->statsFile = NULL; 36 42 37 43 return data; -
trunk/ppMerge/src/ppMergeData.h
r7759 r8405 12 12 pmFPA *out; // Output FPA structure 13 13 psFits *outFile; // FITS file handle for output 14 FILE *statsFile; // File stream for statistics output 14 15 } ppMergeData; 15 16 -
trunk/ppMerge/src/ppMergeOptions.c
r7260 r8405 122 122 // Now we can read the recipe 123 123 bool mdok = true; // Status of MD lookup 124 psMetadata *recipe = psMetadataLookupMD(&mdok, config->recipes, RECIPENAME); // Recipe information124 psMetadata *recipe = psMetadataLookupMD(&mdok, config->recipes, PPMERGE_RECIPE); // Recipe information 125 125 if (!mdok || !recipe) { 126 psError(PS_ERR_IO, true, "Unable to find recipe %s", RECIPENAME);126 psError(PS_ERR_IO, true, "Unable to find recipe %s", PPMERGE_RECIPE); 127 127 exit(EXIT_FAILURE); 128 128 }
Note:
See TracChangeset
for help on using the changeset viewer.
