Changeset 40805
- Timestamp:
- Jun 20, 2019, 10:22:42 AM (7 years ago)
- Location:
- trunk/Ohana/src/dvomerge
- Files:
-
- 4 edited
-
include/dvomerge.h (modified) (1 diff)
-
src/args.c (modified) (2 diffs)
-
src/dvomergeUpdate_catalogs.c (modified) (1 diff)
-
src/merge_catalogs_old.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvomerge/include/dvomerge.h
r40735 r40805 31 31 int IMAGES_ONLY; 32 32 int ACCEPT_MOTION; 33 int RETAIN_AVE_PHOTOMETRY; 33 34 char CATDIR[DVO_MAX_PATH]; 34 35 char GSCFILE[DVO_MAX_PATH]; -
trunk/Ohana/src/dvomerge/src/args.c
r40735 r40805 117 117 remove_argument (N, argc, argv); 118 118 ACCEPT_MOTION = TRUE; 119 } 120 121 /* limit the impact of a dvomerge -parallel */ 122 RETAIN_AVE_PHOTOMETRY = FALSE; 123 if ((N = get_argument (*argc, argv, "-retain-ave-photometry"))) { 124 remove_argument (N, argc, argv); 125 RETAIN_AVE_PHOTOMETRY = TRUE; 126 remove_argument (N, argc, argv); 119 127 } 120 128 … … 336 344 } 337 345 346 /* limit the impact of a dvomerge -parallel */ 347 RETAIN_AVE_PHOTOMETRY = FALSE; 348 if ((N = get_argument (*argc, argv, "-retain-ave-photometry"))) { 349 remove_argument (N, argc, argv); 350 RETAIN_AVE_PHOTOMETRY = TRUE; 351 remove_argument (N, argc, argv); 352 } 353 338 354 /* extra error messages */ 339 355 MATCHED_TABLES = FALSE; -
trunk/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c
r40735 r40805 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 (MATCHED_TABLES) { strextend (&command, "-matched-tables"); } 331 if (MATCH_BY_EXTERN_ID) { strextend (&command, "-match-by-extern-id"); } 332 if (ONLY_MATCHES) { strextend (&command, "-only-matches"); } 333 if (UPDATE_CATFORMAT) { strextend (&command, "-update-catformat %s", UPDATE_CATFORMAT); } 334 if (UPDATE_CATCOMPRESS) { strextend (&command, "-update-catcompress %s", UPDATE_CATCOMPRESS); } 335 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 (RETAIN_AVE_PHOTOMETRY) { strextend (&command, "-retain-ave-photometry"); } 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"); } 336 337 337 338 if (SKIP_MEASURE) { strextend (&command, "-skip-measure"); } -
trunk/Ohana/src/dvomerge/src/merge_catalogs_old.c
r40574 r40805 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); … … 363 364 364 365 // update the average properties to reflect the incoming entries: 365 // if the original value is NAN but the input value is not, accept the input: 366 // if RETAIN_AVE_PHOTOMETRY is true and the original value is NAN, but the input value is not, accept the input: 367 // if RETAIN_AVE_PHOTOMETRY is false and the input value is not NAN, accept the input 368 // if RETAIN_AVE_PHOTOMETRY is true and the original value is not NAN, the keep the existing average photometry 369 366 370 if (!secfiltMap) { 367 371 // secfilt tables of input and output are the same 368 372 for (k = 0; k < NsecfiltIn; k++) { 369 if ( isfinite(output[0].secfilt[n*NsecfiltIn+k].MpsfChp)) continue;373 if (RETAIN_AVE_PHOTOMETRY && isfinite(output[0].secfilt[n*NsecfiltIn+k].MpsfChp)) continue; 370 374 if (!isfinite( input[0].secfilt[N*NsecfiltIn+k].MpsfChp)) continue; 371 375 output[0].secfilt[n*NsecfiltIn+k] = input[0].secfilt[N*NsecfiltIn+k]; … … 378 382 int outputIndex = n * NsecfiltOut + secfiltMap[k]; 379 383 380 if ( isfinite(output[0].secfilt[outputIndex].MpsfChp)) continue;384 if (RETAIN_AVE_PHOTOMETRY && isfinite(output[0].secfilt[outputIndex].MpsfChp)) continue; 381 385 if (!isfinite( input[0].secfilt[N*NsecfiltIn+k].MpsfChp)) continue; 382 386 output[0].secfilt[outputIndex] = input[0].secfilt[N*NsecfiltIn+k]; … … 411 415 /* make sure there is space for next entry */ 412 416 if (Nmeasure + input[0].average[N].Nmeasure >= NMEASURE) { 413 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + 1000;417 NMEASURE = Nmeasure + input[0].average[N].Nmeasure + D_ITEM; 414 418 REALLOCATE (next_measure, off_t, NMEASURE); 415 419 REALLOCATE (output[0].measure, Measure, NMEASURE); 416 420 } 417 421 if (Nlensing + input[0].average[N].Nlensing >= NLENSING) { 418 NLENSING = Nlensing + input[0].average[N].Nlensing + 1000;422 NLENSING = Nlensing + input[0].average[N].Nlensing + D_ITEM; 419 423 REALLOCATE (next_lensing, off_t, NLENSING); 420 424 REALLOCATE (output[0].lensing, Lensing, NLENSING); 421 425 } 422 426 if (Nlensobj + input[0].average[N].Nlensobj >= NLENSOBJ) { 423 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + 1000;427 NLENSOBJ = Nlensobj + input[0].average[N].Nlensobj + D_ITEM; 424 428 REALLOCATE (next_lensobj, off_t, NLENSOBJ); 425 429 REALLOCATE (output[0].lensobj, Lensobj, NLENSOBJ); 426 430 } 427 431 if (Nstarpar + input[0].average[N].Nstarpar >= NSTARPAR) { 428 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + 1000;432 NSTARPAR = Nstarpar + input[0].average[N].Nstarpar + D_ITEM; 429 433 REALLOCATE (next_starpar, off_t, NSTARPAR); 430 434 REALLOCATE (output[0].starpar, StarPar, NSTARPAR); 431 435 } 432 436 if (Ngalphot + input[0].average[N].Ngalphot >= NGALPHOT) { 433 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + 1000;437 NGALPHOT = Ngalphot + input[0].average[N].Ngalphot + D_ITEM; 434 438 REALLOCATE (next_galphot, off_t, NGALPHOT); 435 439 REALLOCATE (output[0].galphot, GalPhot, NGALPHOT); 436 440 } 437 441 if (Nave >= NAVE) { 438 NAVE = Nave + 1000;442 NAVE = Nave + D_ITEM; 439 443 REALLOCATE (output[0].average, Average, NAVE); 440 444 REALLOCATE (output[0].secfilt, SecFilt, NAVE*NsecfiltOut);
Note:
See TracChangeset
for help on using the changeset viewer.
