Changeset 33657
- Timestamp:
- Apr 1, 2012, 3:10:26 PM (14 years ago)
- Location:
- trunk/Ohana/src/dvomerge
- Files:
-
- 11 edited
-
include/dvomerge.h (modified) (1 diff)
-
src/args.c (modified) (1 diff)
-
src/dvoconvert.c (modified) (1 diff)
-
src/dvomergeContinue.c (modified) (1 diff)
-
src/dvomergeContinue_threaded.c (modified) (1 diff)
-
src/dvomergeCreate.c (modified) (1 diff)
-
src/dvomergeUpdate.c (modified) (4 diffs)
-
src/dvomergeUpdate_threaded.c (modified) (2 diffs)
-
src/dvorepairCPT.c (modified) (1 diff)
-
src/dvorepairImageVsMeasure.c (modified) (1 diff)
-
src/dvoverify.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvomerge/include/dvomerge.h
r29938 r33657 16 16 # include <arpa/inet.h> 17 17 # include <glob.h> 18 19 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }20 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }21 18 22 19 int VERBOSE; -
trunk/Ohana/src/dvomerge/src/args.c
r29938 r33657 14 14 if ((N = get_argument (*argc, argv, "-photcode-file"))) { 15 15 remove_argument (N, argc, argv); 16 ALTERNATE_PHOTCODE_FILE = str dup(argv[N]);16 ALTERNATE_PHOTCODE_FILE = strcreate(argv[N]); 17 17 remove_argument (N, argc, argv); 18 18 } -
trunk/Ohana/src/dvomerge/src/dvoconvert.c
r29938 r33657 100 100 101 101 // save the output sky table copy 102 sprintf (filename, "%s/SkyTable.fits",output);103 check_file_access ( filename, TRUE, TRUE, VERBOSE);104 if (!SkyTableSave (outsky, filename)) {102 char *skyfile = SkyTableFilename (output); 103 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 104 if (!SkyTableSave (outsky, skyfile)) { 105 105 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 106 106 exit (1); -
trunk/Ohana/src/dvomerge/src/dvomergeContinue.c
r29938 r33657 150 150 151 151 // save the output sky table copy 152 sprintf (filename, "%s/SkyTable.fits",output);153 check_file_access ( filename, TRUE, TRUE, VERBOSE);154 if (!SkyTableSave (outsky, filename)) {152 char *skyfile = SkyTableFilename (output); 153 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 154 if (!SkyTableSave (outsky, skyfile)) { 155 155 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 156 156 exit (1); -
trunk/Ohana/src/dvomerge/src/dvomergeContinue_threaded.c
r29938 r33657 277 277 278 278 // save the output sky table copy 279 sprintf (filename, "%s/SkyTable.fits",output);280 check_file_access ( filename, TRUE, TRUE, VERBOSE);281 if (!SkyTableSave (outsky, filename)) {279 char *skyfile = SkyTableFilename (output); 280 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 281 if (!SkyTableSave (outsky, skyfile)) { 282 282 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 283 283 exit (1); -
trunk/Ohana/src/dvomerge/src/dvomergeCreate.c
r31173 r33657 183 183 184 184 // save the output sky table copy 185 sprintf (filename, "%s/SkyTable.fits",output);186 check_file_access ( filename, TRUE, TRUE, VERBOSE);187 if (!SkyTableSave (outsky, filename)) {185 char *skyfile = SkyTableFilename (output); 186 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 187 if (!SkyTableSave (outsky, skyfile)) { 188 188 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 189 189 exit (1); -
trunk/Ohana/src/dvomerge/src/dvomergeUpdate.c
r29938 r33657 3 3 int dvomergeUpdate (int argc, char **argv) { 4 4 5 int depth,CONTINUE;6 off_t i, j , Ns, Ne;5 int CONTINUE; 6 off_t i, j; 7 7 SkyTable *outsky, *insky; 8 8 SkyList *outlist, *inlist; … … 101 101 // loop over the populatable output tables; check for data in input in the corresponding regions 102 102 103 SkyListPopulatedRange (&Ns, &Ne, inlist, 0); 104 depth = inlist[0].regions[Ns][0].depth; 103 // XXX this is not really used... 104 // SkyListPopulatedRange (&Ns, &Ne, inlist, 0); 105 // depth = inlist[0].regions[Ns][0].depth; 105 106 106 107 SetPhotcodeTable(NULL); … … 126 127 // compare to a slightly reduced footprint 127 128 float dPos = 2.0/3600.0; 128 outlist = SkyListByBounds (outsky, depth, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos);129 outlist = SkyListByBounds (outsky, inlist[0].regions[i][0].depth, inlist[0].regions[i][0].Rmin + dPos, inlist[0].regions[i][0].Rmax - dPos, inlist[0].regions[i][0].Dmin + dPos, inlist[0].regions[i][0].Dmax - dPos); 129 130 for (j = 0; j < outlist[0].Nregions; j++) { 130 131 if (VERBOSE) fprintf (stderr, "output : %s\n", outlist[0].regions[j][0].name); … … 158 159 159 160 // save the output sky table copy 160 sprintf (filename, "%s/SkyTable.fits",output);161 check_file_access ( filename, TRUE, TRUE, VERBOSE);162 if (!SkyTableSave (outsky, filename)) {161 char *skyfile = SkyTableFilename (output); 162 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 163 if (!SkyTableSave (outsky, skyfile)) { 163 164 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 164 165 exit (1); -
trunk/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c
r29938 r33657 61 61 // compare to a slightly reduced footprint 62 62 float dPos = 2.0/3600.0; 63 // XXX probably need to use threadData->region->depth 63 64 outlist = SkyListByBounds (threadData->outsky, threadData->depth, threadData->region->Rmin + dPos, threadData->region->Rmax - dPos, threadData->region->Dmin + dPos, threadData->region->Dmax - dPos); 64 65 for (j = 0; (j < outlist[0].Nregions) && (threadData->state != TS_FAIL); j++) { … … 277 278 278 279 // save the output sky table copy 279 sprintf (filename, "%s/SkyTable.fits",output);280 check_file_access ( filename, TRUE, TRUE, VERBOSE);281 if (!SkyTableSave (outsky, filename)) {280 char *skyfile = SkyTableFilename (output); 281 check_file_access (skyfile, TRUE, TRUE, VERBOSE); 282 if (!SkyTableSave (outsky, skyfile)) { 282 283 fprintf (stderr, "ERROR: failed to save sky table for %s\n", output); 283 284 exit (1); -
trunk/Ohana/src/dvomerge/src/dvorepairCPT.c
r29938 r33657 1 1 # include "dvomerge.h" 2 3 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }4 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }5 2 6 3 // broken cpt file, valid cpm file: we can recover everything in the cpt file from the cpm file: -
trunk/Ohana/src/dvomerge/src/dvorepairImageVsMeasure.c
r29938 r33657 1 1 # include "dvomerge.h" 2 3 # define myAbort(MSG) { fprintf (stderr, "%s\n", MSG); abort(); }4 # define myAssert(LOGIC,MSG) { if (!(LOGIC)) { fprintf (stderr, "%s\n", MSG); abort(); } }5 2 6 3 // find images which are missing detections: -
trunk/Ohana/src/dvomerge/src/dvoverify.c
r31450 r33657 84 84 85 85 // check the skytable 86 sprintf (filename, "%s/SkyTable.fits",catdir);87 if (!VerifyTableFile ( filename)) {86 char *skyfile = SkyTableFilename (catdir); 87 if (!VerifyTableFile (skyfile)) { 88 88 Nbad ++; 89 89 }
Note:
See TracChangeset
for help on using the changeset viewer.
