Changeset 38730
- Timestamp:
- Sep 14, 2015, 11:55:34 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150625/Ohana/src/dvomerge
- Files:
-
- 4 edited
-
include/dvoverify.h (modified) (1 diff)
-
src/dvorepairDeleteImagesByExternID.c (modified) (1 diff)
-
src/dvoverify_args.c (modified) (2 diffs)
-
src/dvoverify_utils.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/include/dvoverify.h
r38622 r38730 37 37 int LIST_MISSING; 38 38 39 int IGNORE_SORTED_STATE; 40 39 41 SkyRegion UserPatch; 40 42 -
branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvorepairDeleteImagesByExternID.c
r38720 r38730 102 102 int NdeleteIDs; 103 103 int *deleteIDs = ReadDeleteListExternID(delList, &NdeleteIDs); 104 exit (2);105 104 106 105 int NdeleteImages = 0; -
branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvoverify_args.c
r38616 r38730 24 24 if ((N = get_argument (*argc, argv, "-sorted"))) { 25 25 CHECKSORTED = TRUE; 26 remove_argument (N, argc, argv); 27 } 28 29 // in some cases, the header sorted state can claim F but is actually T 30 IGNORE_SORTED_STATE = FALSE; 31 if ((N = get_argument (*argc, argv, "-ignore-sorted-state"))) { 32 IGNORE_SORTED_STATE = TRUE; 26 33 remove_argument (N, argc, argv); 27 34 } … … 204 211 } 205 212 213 // in some cases, the header sorted state can claim F but is actually T 214 IGNORE_SORTED_STATE = FALSE; 215 if ((N = get_argument (*argc, argv, "-ignore-sorted-state"))) { 216 IGNORE_SORTED_STATE = TRUE; 217 remove_argument (N, argc, argv); 218 } 219 206 220 if (!HOST_ID || !HOSTDIR || (*argc != 2)) { 207 221 fprintf (stderr, "USAGE: dvoverify_client (catdir) -results (file) -hostID ID -hostdir DIR [-region Rmin Rmax Dmin Dmax] [-v] [-s]\n\n"); -
branches/eam_branches/ipp-20150625/Ohana/src/dvomerge/src/dvoverify_utils.c
r38627 r38730 188 188 dvo_catalog_init (&catalog, TRUE); 189 189 catalog.filename = filename; 190 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ ;190 catalog.catflags = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT; 191 191 catalog.Nsecfilt = 0; 192 192 … … 214 214 215 215 // if the table is NOT SORTED, do we have a subset of checks we can make? 216 if (!catalog.sorted ) {216 if (!catalog.sorted && !IGNORE_SORTED_STATE) { 217 217 fprintf (stderr, "!"); 218 218 dvo_catalog_unlock (&catalog); … … 222 222 return TRUE; 223 223 } 224 225 int NmeasureTotal = 0; 226 int measureOffsetOK = TRUE; 227 int NlensingTotal = 0; 228 int lensingOffsetOK = TRUE; 229 int NlensobjTotal = 0; 230 int lensobjOffsetOK = TRUE; 231 for (i = 0; i < catalog.Naverage; i++) { 232 NmeasureTotal += catalog.average[i].Nmeasure; 233 if (VERBOSE && !(NmeasureTotal <= catalog.Nmeasure)) { 234 fprintf (stderr, "NmeasureTotal > catalog.Nmeasure: %d %d %d\n", i, catalog.average[i].Nmeasure, (int) catalog.Nmeasure); 235 } 236 measureOffsetOK &= (catalog.average[i].measureOffset < catalog.Nmeasure); 237 if (VERBOSE && !(catalog.average[i].measureOffset < catalog.Nmeasure)) { 238 fprintf (stderr, "measureOffset >= catalog.Nmeasure: %d %d %d\n", i, catalog.average[i].measureOffset, (int) catalog.Nmeasure); 239 } 240 measureOffsetOK &= (catalog.average[i].measureOffset + catalog.average[i].Nmeasure <= catalog.Nmeasure); 241 if (VERBOSE && !(catalog.average[i].measureOffset + catalog.average[i].Nmeasure <= catalog.Nmeasure)) { 242 fprintf (stderr, "measureOffset + Nmeasure > catalog.Nmeasure : %d %d %d\n", i, catalog.average[i].Nmeasure, (int) catalog.Nmeasure); 243 } 244 245 // sum of Nlensing for each object < Nlensing for catalog 246 NlensingTotal += catalog.average[i].Nlensing; 247 if (VERBOSE && !(NlensingTotal <= catalog.Nlensing)) { 248 fprintf (stderr, "NlensingTotal > catalog.Nlensing: %d %d %d\n", i, catalog.average[i].Nlensing, (int) catalog.Nlensing); 249 } 250 // lensingOffset needs to be in range for each object 251 lensingOffsetOK &= (!catalog.Nlensing || (catalog.average[i].lensingOffset < catalog.Nlensing)); 252 if (VERBOSE && catalog.Nlensing && !(catalog.average[i].lensingOffset < catalog.Nlensing)) { 253 fprintf (stderr, "lensingOffset >= catalog.Nlensing: %d %d %d\n", i, catalog.average[i].lensingOffset, (int) catalog.Nlensing); 254 } 255 lensingOffsetOK &= (catalog.average[i].lensingOffset + catalog.average[i].Nlensing <= catalog.Nlensing); 256 if (VERBOSE && !(catalog.average[i].lensingOffset + catalog.average[i].Nlensing <= catalog.Nlensing)) { 257 fprintf (stderr, "lensingOffset + Nlensing > catalog.Nlensing : %d %d %d\n", i, catalog.average[i].Nlensing, (int) catalog.Nlensing); 258 } 259 260 NlensobjTotal += catalog.average[i].Nlensobj; 261 if (VERBOSE && !(NlensobjTotal <= catalog.Nlensobj)) { 262 fprintf (stderr, "NlensobjTotal > catalog.Nlensobj: %d %d %d\n", i, catalog.average[i].Nlensobj, (int) catalog.Nlensobj); 263 } 264 lensobjOffsetOK &= (catalog.average[i].lensobjOffset < catalog.Nlensobj); 265 if (VERBOSE && !(catalog.average[i].lensobjOffset < catalog.Nlensobj)) { 266 fprintf (stderr, "lensobjOffset >= catalog.Nlensobj: %d %d %d\n", i, catalog.average[i].lensobjOffset, (int) catalog.Nlensobj); 267 } 268 lensobjOffsetOK &= (catalog.average[i].lensobjOffset + catalog.average[i].Nlensobj <= catalog.Nlensobj); 269 if (VERBOSE && !(catalog.average[i].lensobjOffset + catalog.average[i].Nlensobj <= catalog.Nlensobj)) { 270 fprintf (stderr, "lensobjOffset + Nlensobj > catalog.Nlensobj : %d %d %d\n", i, catalog.average[i].Nlensobj, (int) catalog.Nlensobj); 271 } 272 } 273 274 if (!measureOffsetOK) { 275 fprintf (stderr, "ERROR: catalog %s has an invalid measureOffset\n", catalog.filename); 276 status = FALSE; 277 } 278 279 if (NmeasureTotal != catalog.Nmeasure) { 280 fprintf (stderr, "ERROR: catalog %s has an invalid Nmeasure\n", catalog.filename); 281 status = FALSE; 282 } 283 284 if (!lensingOffsetOK) { 285 fprintf (stderr, "ERROR: catalog %s has an invalid lensingOffset\n", catalog.filename); 286 status = FALSE; 287 } 288 289 if (NlensingTotal != catalog.Nlensing) { 290 fprintf (stderr, "ERROR: catalog %s has an invalid Nlensing\n", catalog.filename); 291 status = FALSE; 292 } 293 294 if (!lensobjOffsetOK) { 295 fprintf (stderr, "ERROR: catalog %s has an invalid lensobjOffset\n", catalog.filename); 296 status = FALSE; 297 } 298 299 if (NlensobjTotal != catalog.Nlensobj) { 300 fprintf (stderr, "ERROR: catalog %s has an invalid Nlensobj\n", catalog.filename); 301 status = FALSE; 302 } 224 225 # define CHECK_TABLE(NAME) { \ 226 int Ntotal = 0; int offsetOK = TRUE; \ 227 for (i = 0; i < catalog.Naverage; i++) { \ 228 Ntotal += catalog.average[i].N##NAME; \ 229 if (VERBOSE && !(Ntotal <= catalog.N##NAME)) { \ 230 fprintf (stderr, "Ntotal (%s) > catalog.N##NAME: %d %d %d\n", #NAME, i, catalog.average[i].N##NAME, (int) catalog.N##NAME); \ 231 } \ 232 offsetOK &= (catalog.average[i].NAME##Offset < catalog.N##NAME); \ 233 if (VERBOSE && !(catalog.average[i].NAME##Offset < catalog.N##NAME)) { \ 234 fprintf (stderr, "%sOffset >= catalog.N%s: %d %d %d\n", #NAME, #NAME, i, catalog.average[i].NAME##Offset, (int) catalog.N##NAME); \ 235 } \ 236 offsetOK &= (catalog.average[i].NAME##Offset + catalog.average[i].N##NAME <= catalog.N##NAME); \ 237 if (VERBOSE && !(catalog.average[i].NAME##Offset + catalog.average[i].N##NAME <= catalog.N##NAME)) { \ 238 fprintf (stderr, "%sOffset + N%s > catalog.N%s : %d %d %d\n", #NAME, #NAME, #NAME, i, catalog.average[i].N##NAME, (int) catalog.N##NAME); \ 239 } } \ 240 if (!offsetOK) { \ 241 fprintf (stderr, "ERROR: catalog %s has an invalid %sOffset\n", catalog.filename, #NAME); \ 242 status = FALSE; \ 243 } \ 244 if (Ntotal != catalog.N##NAME) { \ 245 fprintf (stderr, "ERROR: catalog %s has an invalid N%s\n", catalog.filename, #NAME); \ 246 status = FALSE; \ 247 } \ 248 } 249 250 CHECK_TABLE(measure); 251 CHECK_TABLE(lensing); 252 CHECK_TABLE(lensobj); 253 CHECK_TABLE(starpar); 254 CHECK_TABLE(galphot); 303 255 304 256 // if we have a problem with Nmeasure and/or measureOffset values, we
Note:
See TracChangeset
for help on using the changeset viewer.
