Changeset 41148
- Timestamp:
- Nov 27, 2019, 5:13:23 AM (7 years ago)
- Location:
- branches/eam_branches/ohana.20190329/src/dvomerge
- Files:
-
- 6 edited
-
include/dvomerge.h (modified) (2 diffs)
-
src/LoadCatalog.c (modified) (2 diffs)
-
src/args.c (modified) (4 diffs)
-
src/build_links.c (modified) (1 diff)
-
src/dvomergeUpdate_catalogs.c (modified) (1 diff)
-
src/merge_catalogs_old.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20190329/src/dvomerge/include/dvomerge.h
r40736 r41148 31 31 int IMAGES_ONLY; 32 32 int ACCEPT_MOTION; 33 33 34 int ACCEPT_ASTROM; 35 int RETAIN_AVE_PHOTOMETRY; 36 34 37 char CATDIR[DVO_MAX_PATH]; 35 38 char GSCFILE[DVO_MAX_PATH]; … … 63 66 64 67 int SKIP_MEASURE; 68 int SKIP_MISSING; 65 69 int SKIP_LENSING; 66 70 int SKIP_LENSOBJ; -
branches/eam_branches/ohana.20190329/src/dvomerge/src/LoadCatalog.c
r39926 r41148 10 10 // always load all of the data (if any exists) 11 11 12 catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_ MISSING | DVO_LOAD_SECFILT;12 catalog[0].catflags = DVO_LOAD_AVERAGE | DVO_LOAD_SECFILT; 13 13 14 14 if (SKIP_MEASURE) { … … 16 16 } else { 17 17 catalog[0].catflags = catalog[0].catflags | DVO_LOAD_MEASURE; 18 } 19 20 if (SKIP_MISSING) { 21 catalog[0].catflags = catalog[0].catflags | DVO_SKIP_MISSING; 22 } else { 23 catalog[0].catflags = catalog[0].catflags | DVO_LOAD_MISSING; 18 24 } 19 25 -
branches/eam_branches/ohana.20190329/src/dvomerge/src/args.c
r40736 r41148 53 53 remove_argument (N, argc, argv); 54 54 } 55 SKIP_MISSING = FALSE; 56 if ((N = get_argument (*argc, argv, "-skip-missing"))) { 57 SKIP_MISSING = TRUE; 58 remove_argument (N, argc, argv); 59 } 55 60 SKIP_LENSING = FALSE; 56 61 if ((N = get_argument (*argc, argv, "-skip-lensing"))) { … … 118 123 remove_argument (N, argc, argv); 119 124 ACCEPT_ASTROM = TRUE; 125 } 126 127 /* limit the impact of a dvomerge -parallel */ 128 RETAIN_AVE_PHOTOMETRY = FALSE; 129 if ((N = get_argument (*argc, argv, "-retain-ave-photometry"))) { 130 remove_argument (N, argc, argv); 131 RETAIN_AVE_PHOTOMETRY = TRUE; 132 remove_argument (N, argc, argv); 120 133 } 121 134 … … 343 356 } 344 357 358 /* limit the impact of a dvomerge -parallel */ 359 RETAIN_AVE_PHOTOMETRY = FALSE; 360 if ((N = get_argument (*argc, argv, "-retain-ave-photometry"))) { 361 remove_argument (N, argc, argv); 362 RETAIN_AVE_PHOTOMETRY = TRUE; 363 remove_argument (N, argc, argv); 364 } 365 345 366 /* extra error messages */ 346 367 MATCHED_TABLES = FALSE; … … 354 375 if ((N = get_argument (*argc, argv, "-skip-measure"))) { 355 376 SKIP_MEASURE = TRUE; 377 remove_argument (N, argc, argv); 378 } 379 SKIP_MISSING = FALSE; 380 if ((N = get_argument (*argc, argv, "-skip-missing"))) { 381 SKIP_MISSING = TRUE; 356 382 remove_argument (N, argc, argv); 357 383 } -
branches/eam_branches/ohana.20190329/src/dvomerge/src/build_links.c
r40291 r41148 185 185 off_t *next_missing; 186 186 187 if (!missing) return NULL; 188 if (SKIP_MISSING) return NULL; 189 187 190 N = 0; 188 191 -
branches/eam_branches/ohana.20190329/src/dvomerge/src/dvomergeUpdate_catalogs.c
r40736 r41148 320 320 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, RADIUS); 321 321 322 if (VERBOSE) { strextend (&command, "-v"); } 323 if (VERIFY) { strextend (&command, "-verify"); } 324 if (VERIFY_CATALOG_ONLY) { strextend (&command, "-verify-catalogs"); } 325 if (REPLACE_BY_PHOTCODE) { strextend (&command, "-replace"); } 326 if (REPLACE_TYCHO) { strextend (&command, "-replace-tycho"); } 327 if (PARALLEL_INPUT) { strextend (&command, "-parallel-input"); } 328 if (FORCE_MERGE) { strextend (&command, "-force-merge"); } 329 if (ACCEPT_MOTION) { strextend (&command, "-accept-motion"); } 330 if (ACCEPT_ASTROM) { strextend (&command, "-accept-astrom"); } 331 if (MATCHED_TABLES) { strextend (&command, "-matched-tables"); } 332 if (MATCH_BY_EXTERN_ID) { strextend (&command, "-match-by-extern-id"); } 333 if (ONLY_MATCHES) { strextend (&command, "-only-matches"); } 334 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 335 if (UPDATE_CATCOMPRESS) { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); } 336 if (REPAIR_BY_OBJID) { strextend (&command, "-repair-by-objid"); } 322 if (VERBOSE) { strextend (&command, "-v"); } 323 if (VERIFY) { strextend (&command, "-verify"); } 324 if (VERIFY_CATALOG_ONLY) { strextend (&command, "-verify-catalogs"); } 325 if (REPLACE_BY_PHOTCODE) { strextend (&command, "-replace"); } 326 if (REPLACE_TYCHO) { strextend (&command, "-replace-tycho"); } 327 if (PARALLEL_INPUT) { strextend (&command, "-parallel-input"); } 328 if (FORCE_MERGE) { strextend (&command, "-force-merge"); } 329 if (ACCEPT_MOTION) { strextend (&command, "-accept-motion"); } 330 if (ACCEPT_ASTROM) { strextend (&command, "-accept-astrom"); } 331 if (RETAIN_AVE_PHOTOMETRY) { strextend (&command, "-retain-ave-photometry"); } 332 if (MATCHED_TABLES) { strextend (&command, "-matched-tables"); } 333 if (MATCH_BY_EXTERN_ID) { strextend (&command, "-match-by-extern-id"); } 334 if (ONLY_MATCHES) { strextend (&command, "-only-matches"); } 335 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 336 if (UPDATE_CATCOMPRESS) { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); } 337 if (REPAIR_BY_OBJID) { strextend (&command, "-repair-by-objid"); } 337 338 338 339 if (SKIP_MEASURE) { strextend (&command, "-skip-measure"); } 340 if (SKIP_MISSING) { strextend (&command, "-skip-missing"); } 339 341 if (SKIP_LENSING) { strextend (&command, "-skip-lensing"); } 340 342 if (SKIP_LENSOBJ) { strextend (&command, "-skip-lensobj"); } -
branches/eam_branches/ohana.20190329/src/dvomerge/src/merge_catalogs_old.c
r40736 r41148 1 1 # include "dvomerge.h" 2 2 # define PSPS_ID TRUE 3 # define D_ITEM 100000 3 4 4 5 # define IN_REGION(R,D) ( \ … … 187 188 /* make sure there is space for next Nmeasure entries */ 188 189 if (Nmeasure + input[0].average[N].Nmeasure >= NMEASURE) { 189 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + 1000;190 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + D_ITEM; 190 191 REALLOCATE (next_measure, off_t, NMEASURE); 191 192 REALLOCATE (output[0].measure, Measure, NMEASURE); 192 193 } 193 194 if (Nlensing + input[0].average[N].Nlensing >= NLENSING) { 194 NLENSING = Nlensing + input[0].average[N].Nlensing + 1000;195 NLENSING = Nlensing + input[0].average[N].Nlensing + D_ITEM; 195 196 REALLOCATE (next_lensing, off_t, NLENSING); 196 197 REALLOCATE (output[0].lensing, Lensing, NLENSING); 197 198 } 198 199 if (Nlensobj + input[0].average[N].Nlensobj >= NLENSOBJ) { 199 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + 1000;200 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + D_ITEM; 200 201 REALLOCATE (next_lensobj, off_t, NLENSOBJ); 201 202 REALLOCATE (output[0].lensobj, Lensobj, NLENSOBJ); 202 203 } 203 204 if (Nstarpar + input[0].average[N].Nstarpar >= NSTARPAR) { 204 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + 1000;205 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + D_ITEM; 205 206 REALLOCATE (next_starpar, off_t, NSTARPAR); 206 207 REALLOCATE (output[0].starpar, StarPar, NSTARPAR); 207 208 } 208 209 if (Ngalphot + input[0].average[N].Ngalphot >= NGALPHOT) { 209 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + 1000;210 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + D_ITEM; 210 211 REALLOCATE (next_galphot, off_t, NGALPHOT); 211 212 REALLOCATE (output[0].galphot, GalPhot, NGALPHOT); … … 364 365 // XXX: add choice of secfilt 365 366 // update the average properties to reflect the incoming entries: 366 // if the original value is NAN but the input value is not, accept the input: 367 // if RETAIN_AVE_PHOTOMETRY is true and the original value is NAN, but the input value is not, accept the input: 368 // if RETAIN_AVE_PHOTOMETRY is false and the input value is not NAN, accept the input 369 // if RETAIN_AVE_PHOTOMETRY is true and the original value is not NAN, the keep the existing average photometry 370 367 371 if (!secfiltMap) { 368 372 // secfilt tables of input and output are the same 369 373 for (k = 0; k < NsecfiltIn; k++) { 370 if ( isfinite(output[0].secfilt[n*NsecfiltIn+k].MpsfChp)) continue;374 if (RETAIN_AVE_PHOTOMETRY && isfinite(output[0].secfilt[n*NsecfiltIn+k].MpsfChp)) continue; 371 375 if (!isfinite( input[0].secfilt[N*NsecfiltIn+k].MpsfChp)) continue; 372 376 output[0].secfilt[n*NsecfiltIn+k] = input[0].secfilt[N*NsecfiltIn+k]; … … 379 383 int outputIndex = n * NsecfiltOut + secfiltMap[k]; 380 384 381 if ( isfinite(output[0].secfilt[outputIndex].MpsfChp)) continue;385 if (RETAIN_AVE_PHOTOMETRY && isfinite(output[0].secfilt[outputIndex].MpsfChp)) continue; 382 386 if (!isfinite( input[0].secfilt[N*NsecfiltIn+k].MpsfChp)) continue; 383 387 output[0].secfilt[outputIndex] = input[0].secfilt[N*NsecfiltIn+k]; … … 416 420 /* make sure there is space for next entry */ 417 421 if (Nmeasure + input[0].average[N].Nmeasure >= NMEASURE) { 418 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + 1000;422 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + D_ITEM; 419 423 REALLOCATE (next_measure, off_t, NMEASURE); 420 424 REALLOCATE (output[0].measure, Measure, NMEASURE); 421 425 } 422 426 if (Nlensing + input[0].average[N].Nlensing >= NLENSING) { 423 NLENSING = Nlensing + input[0].average[N].Nlensing + 1000;427 NLENSING = Nlensing + input[0].average[N].Nlensing + D_ITEM; 424 428 REALLOCATE (next_lensing, off_t, NLENSING); 425 429 REALLOCATE (output[0].lensing, Lensing, NLENSING); 426 430 } 427 431 if (Nlensobj + input[0].average[N].Nlensobj >= NLENSOBJ) { 428 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + 1000;432 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + D_ITEM; 429 433 REALLOCATE (next_lensobj, off_t, NLENSOBJ); 430 434 REALLOCATE (output[0].lensobj, Lensobj, NLENSOBJ); 431 435 } 432 436 if (Nstarpar + input[0].average[N].Nstarpar >= NSTARPAR) { 433 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + 1000;437 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + D_ITEM; 434 438 REALLOCATE (next_starpar, off_t, NSTARPAR); 435 439 REALLOCATE (output[0].starpar, StarPar, NSTARPAR); 436 440 } 437 441 if (Ngalphot + input[0].average[N].Ngalphot >= NGALPHOT) { 438 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + 1000;442 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + D_ITEM; 439 443 REALLOCATE (next_galphot, off_t, NGALPHOT); 440 444 REALLOCATE (output[0].galphot, GalPhot, NGALPHOT); 441 445 } 442 446 if (Nave >= NAVE) { 443 NAVE = Nave + 1000;447 NAVE = Nave + D_ITEM; 444 448 REALLOCATE (output[0].average, Average, NAVE); 445 449 REALLOCATE (output[0].secfilt, SecFilt, NAVE*NsecfiltOut);
Note:
See TracChangeset
for help on using the changeset viewer.
