Changeset 40246
- Timestamp:
- Dec 6, 2017, 5:55:50 AM (9 years ago)
- Location:
- branches/eam_branches/ohana.20170822/src/relphot/src
- Files:
-
- 5 edited
-
launch_region_hosts.c (modified) (1 diff)
-
liststats.c (modified) (5 diffs)
-
relphot_images.c (modified) (6 diffs)
-
relphot_parallel_images.c (modified) (3 diffs)
-
setMrelCatalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20170822/src/relphot/src/launch_region_hosts.c
r39511 r40246 58 58 strextend (&command, "-cloud-limit %f", CLOUD_TOLERANCE); 59 59 60 if (VERBOSE) strextend (&command, "-v");61 if (VERBOSE2) strextend (&command, "-vv");62 if (RESET) strextend (&command, "-reset");63 if (RESET_ZEROPTS) strextend (&command, "-reset-zpts");64 if (!KEEP_UBERCAL) strextend (&command, "-reset-ubercal");65 if (DophotSelect) strextend (&command, "-dophot %d", DophotValue);66 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax);67 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue);68 if (SyntheticPhotometry) strextend (&command, "-synthphot");69 if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search");60 if (VERBOSE) strextend (&command, "-v"); 61 if (VERBOSE2) strextend (&command, "-vv"); 62 if (RESET) strextend (&command, "-reset"); 63 if (RESET_ZEROPTS) strextend (&command, "-reset-zpts"); 64 if (!KEEP_UBERCAL) strextend (&command, "-reset-ubercal"); 65 if (DophotSelect) strextend (&command, "-dophot %d", DophotValue); 66 if (ImagSelect) strextend (&command, "-instmag %f %f", ImagMin, ImagMax); 67 if (MaxDensityUse) strextend (&command, "-max-density %f", MaxDensityValue); 68 if (SyntheticPhotometry) strextend (&command, "-synthphot"); 69 if (USE_BASIC_CHECK) strextend (&command, "-basic-image-search"); 70 70 71 if (UPDATE) strextend (&command, "-update"); 72 if (MOSAIC_ZEROPT) strextend (&command, "-mosaic"); 73 if (FREEZE_IMAGES) strextend (&command, "-imfreeze"); 74 if (FREEZE_MOSAICS) strextend (&command, "-mosfreeze"); 75 if (PARALLEL) strextend (&command, "-parallel"); 76 if (PARALLEL_MANUAL) strextend (&command, "-parallel-manual"); 77 if (PARALLEL_SERIAL) strextend (&command, "-parallel-serial"); 71 if (UPDATE) strextend (&command, "-update"); 72 if (MOSAIC_ZEROPT) strextend (&command, "-mosaic"); 73 if (FREEZE_IMAGES) strextend (&command, "-imfreeze"); 74 if (FREEZE_MOSAICS) strextend (&command, "-mosfreeze"); 75 if (CALIBRATE_STACKS_AND_WARPS) strextend (&command, "-only-stacks-and-warps"); 76 77 if (PARALLEL) strextend (&command, "-parallel"); 78 if (PARALLEL_MANUAL) strextend (&command, "-parallel-manual"); 79 if (PARALLEL_SERIAL) strextend (&command, "-parallel-serial"); 78 80 79 81 // XXX deprecate this if we are happy with the new version -
branches/eam_branches/ohana.20170822/src/relphot/src/liststats.c
r39648 r40246 194 194 # define WEIGHT_THRESHOLD 0.3 195 195 196 int fit_least_squares (double *fit, double * y, double *dy, double *wgt, double *wt, int Npts);196 int fit_least_squares (double *fit, double *err, double *y, double *dy, double *wgt, double *wt, int Npts); 197 197 double VectorFractionInterpolate (double *values, float fraction, int Npts); 198 198 double weight_cauchy (double x); … … 253 253 254 254 double oldValue = value; 255 if (!fit_least_squares (&value, dataset->flxlist, dataset->errlist, dataset->wgtlist, dataset->wtvals, Npoints)) {255 if (!fit_least_squares (&value, NULL, dataset->flxlist, dataset->errlist, dataset->wgtlist, dataset->wtvals, Npoints)) { 256 256 value = oldValue; 257 257 break; … … 330 330 } 331 331 332 if (!fit_least_squares (&value, dataset->ysample, dataset->dysample, dataset->wtsample, NULL, Nkeep)) continue;332 if (!fit_least_squares (&value, NULL, dataset->ysample, dataset->dysample, dataset->wtsample, NULL, Nkeep)) continue; 333 333 334 334 dataset->bvalue[Nboot] = value; … … 342 342 stats->error = (Shi - Slo) / 2.0; 343 343 344 // bootstrap can sometimes yield an excessively-optimistic result for the error. Do not let 345 // the reported error be smaller than the formal error 346 double errvalue; 347 if (fit_least_squares (&value, &errvalue, dataset->ykeep, dataset->dykeep, dataset->wtkeep, NULL, Nkeep)) { 348 stats->error = MAX (stats->error, errvalue); 349 } 350 344 351 return TRUE; 345 352 } 346 353 347 354 // wgt is externally-supplied weight, wt is optional 348 int fit_least_squares (double *fit, double * y, double *dy, double *wgt, double *wt, int Npts) {355 int fit_least_squares (double *fit, double *err, double *y, double *dy, double *wgt, double *wt, int Npts) { 349 356 350 357 int i; … … 364 371 } 365 372 if (S0 == 0.0) return FALSE; 366 *fit = S1 / S0; 373 *fit = S1 / S0; 374 if (err) { *err = 1.0 / S0; } 367 375 return TRUE; 368 376 } -
branches/eam_branches/ohana.20170822/src/relphot/src/relphot_images.c
r40235 r40246 42 42 MARKTIME("-- load images: %f sec\n", dtime); 43 43 44 checkImages("load images");44 // checkImages("load images"); 45 45 46 46 /* unlock, if we can (else, unlocked below) */ … … 48 48 49 49 // load the flat correction table (if defined) 50 // we no longer need to do this: the flatcorrection is now saved in measure.Mflat 50 51 # if (0) 51 52 char flatcorrfile[256]; … … 62 63 /* add in a loop over the catalogs calling dvo_catalog_chipcoords */ 63 64 64 checkImages("load catalog");65 // checkImages("load catalog"); 65 66 66 67 /* match measurements with images, mosaics */ … … 81 82 82 83 setExclusions (catalog, Ncatalog, TRUE); 83 checkImages("set Exclu");84 // checkImages("set Exclu"); 84 85 85 86 global_stats (catalog, Ncatalog, flatcorr, 0); … … 114 115 } 115 116 if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog); 116 checkImages("start loop");117 // checkImages("start loop"); 117 118 118 119 setMrel (catalog, Ncatalog, flatcorr); // threaded 119 120 if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog); 120 checkImages("set Mrel");121 // checkImages("set Mrel"); 121 122 122 123 if (PLOTSTUFF) { … … 124 125 } 125 126 setMcal (catalog, FALSE, flatcorr); 126 checkImages("set Mcal");127 // checkImages("set Mcal"); 127 128 if (VERBOSE2) dumpMags (stderr, catalog, Ncatalog); 128 129 -
branches/eam_branches/ohana.20170822/src/relphot/src/relphot_parallel_images.c
r39643 r40246 36 36 client_logger_message ("loaded images\n"); 37 37 38 // once we have read this table, we should remove it for repeat runs39 // unlink (IMAGE_TABLE); // XXX a bit risky, add some protection?40 41 38 makeMosaics (image, Nimage, TRUE); 42 39 … … 44 41 45 42 // load the flat correction table (if defined) 43 // we no longer need to do this: the flatcorrection is now saved in measure.Mflat 46 44 # if (0) 47 45 char flatcorrfile[256]; … … 150 148 client_logger_message ("all hosts are done the loops\n"); 151 149 152 /* set Mcal & Mmos for bad images */ 153 setMcal (catalog, TRUE, flatcorr); 154 setMmos (catalog, TRUE, flatcorr); 150 /* set Mcal & Mmos for bad images (for stack_and_warps, force images to be measured) */ 151 int onlyPoorImages = !CALIBRATE_STACKS_AND_WARPS; 152 setMcal (catalog, onlyPoorImages, flatcorr); 153 setMmos (catalog, onlyPoorImages, flatcorr); 155 154 MARKTIME("-- finalize Mcal values: %f sec\n", dtime); 156 155 -
branches/eam_branches/ohana.20170822/src/relphot/src/setMrelCatalog.c
r40245 r40246 569 569 570 570 float psfQFbest = 0.0; 571 float SNbest = 0.0; 571 572 572 573 off_t stackBestMeasure = -1;
Note:
See TracChangeset
for help on using the changeset viewer.
