Changeset 34078
- Timestamp:
- Jun 26, 2012, 10:54:57 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120601
- Files:
-
- 7 edited
-
Ohana/src/imregister/imreg/imregclient.c (modified) (2 diffs)
-
Ohana/src/imregister/spreg/modify.c (modified) (1 diff)
-
Ohana/src/libautocode/def/common.h (modified) (1 diff)
-
Ohana/src/libohana/src/time.c (modified) (1 diff)
-
psLib/src/math/psMinimizePowell.c (modified) (2 diffs)
-
psModules/src/objects/pmPSFtryMakePSF.c (modified) (4 diffs)
-
psphot/src/psphotSourceFits.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/imregclient.c
r33985 r34078 35 35 exit (1); 36 36 } 37 fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm); 37 if (fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm) != 3) { 38 fprintf (stderr, "error reading stats\n"); 39 } 38 40 image[0].ccd = tmpint; 39 41 fclose (f); … … 51 53 for (i = 0; i < Nentry; i++) { 52 54 image[i] = image[0]; 53 fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm); 55 if (fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm) != 3) { 56 fprintf (stderr, "error reading stats\n"); 57 } 54 58 image[i].seq = tmpint; 55 59 if (image[i].seq == Nslice) continue; -
branches/eam_branches/ipp-20120601/Ohana/src/imregister/spreg/modify.c
r27435 r34078 24 24 if (!strncmp (spectrum[i].pathname, output.oldpath, Nold)) { 25 25 strcpy (tmppath, &spectrum[i].pathname[Nold]); 26 snprintf (spectrum[i].pathname, 128, "%s%s", output.newpath, tmppath);26 snprintf (spectrum[i].pathname, 64, "%s%s", output.newpath, tmppath); 27 27 } 28 28 } -
branches/eam_branches/ipp-20120601/Ohana/src/libautocode/def/common.h
r34077 r34078 32 32 # define rawshort short 33 33 34 # define DVO_IMAGE_NAME_LEN 12 834 # define DVO_IMAGE_NAME_LEN 121 35 35 36 36 /*** rawshort is used to handle the broken pre-autocode photreg tables -
branches/eam_branches/ipp-20120601/Ohana/src/libohana/src/time.c
r33982 r34078 90 90 91 91 char *p1, *p2; 92 //double tmp;92 double tmp; 93 93 int mode; 94 94 95 95 p1 = line; 96 strtod (p1, &p2); 96 tmp = strtod (p1, &p2); 97 if (0) { fprintf (stderr, "tmp: %f\n", tmp); } 97 98 mode = TIME_DATE; 98 99 if (p2 == p1 + strlen (p1) - 1) { -
branches/eam_branches/ipp-20120601/psLib/src/math/psMinimizePowell.c
r28998 r34078 367 367 psF32 c = 0.0; 368 368 psF32 n = 0.0; 369 psF32 fa = 0.0;370 psF32 fb = 0.0;371 psF32 fc = 0.0;372 369 psF32 fn = 0.0; 373 370 psF32 mul = 0.0; … … 415 412 PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpb, b); 416 413 PS_VECTOR_ADD_MULTIPLE(params, paramMask, line, tmpc, c); 417 fa = func(tmpa, coords); 418 fb = func(tmpb, coords); 419 fc = func(tmpc, coords); 414 psF32 fb = func(tmpb, coords); 415 # if (PS_TRACE_ON) 416 psF32 fa = func(tmpa, coords); 417 psF32 fc = func(tmpc, coords); 420 418 psTrace("psLib.math", 6, "LineMin: f(%f %f %f) is (%f %f %f)\n", a, b, c, fa, fb, fc); 419 # endif 421 420 422 421 // We determine which is the biggest segment in [a,b,c] then split -
branches/eam_branches/ipp-20120601/psModules/src/objects/pmPSFtryMakePSF.c
r30044 r34078 231 231 // XXX we are using the same stats structure on each pass: do we need to re-init it? 232 232 // XXX we hardwire this to SAMPLE stats above (psphotChoosePSF.c), hardwire here instead? 233 psStatsOptions meanOption = psStatsMeanOption(psf->psfTrendStats->options); 234 psStatsOptions stdevOption = psStatsStdevOption(psf->psfTrendStats->options); 235 233 236 234 pmTrend2D *trend = NULL; 237 float mean, stdev;238 235 239 236 // XXX we are using the same stats structure on each pass: do we need to re-init it? … … 249 246 return true; 250 247 } 248 249 # if (PS_TRACE_ON) 250 float mean, stdev; 251 psStatsOptions meanOption = psStatsMeanOption(psf->psfTrendStats->options); 252 psStatsOptions stdevOption = psStatsStdevOption(psf->psfTrendStats->options); 251 253 mean = psStatsGetValue (trend->stats, meanOption); 252 254 stdev = psStatsGetValue (trend->stats, stdevOption); 253 255 psTrace ("psModules.objects", 4, "clipped E0 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e0->n); 256 # endif 257 254 258 if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map); 255 259 pmSourceVisualPSFModelResid (trend, x, y, e0, srcMask); … … 264 268 return true; 265 269 } 270 # if (PS_TRACE_ON) 266 271 mean = psStatsGetValue (trend->stats, meanOption); 267 272 stdev = psStatsGetValue (trend->stats, stdevOption); 268 273 psTrace ("psModules.objects", 4, "clipped E1 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e1->n); 274 # endif 269 275 if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map); 270 276 pmSourceVisualPSFModelResid (trend, x, y, e1, srcMask); … … 279 285 return true; 280 286 } 287 # if (PS_TRACE_ON) 281 288 mean = psStatsGetValue (trend->stats, meanOption); 282 289 stdev = psStatsGetValue (trend->stats, stdevOption); 283 290 psTrace ("psModules.objects", 4, "clipped E2 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e2->n); 291 # endif 284 292 if (psf->psfTrendMode == PM_TREND_MAP) psImageMapCleanup (trend->map); 285 293 pmSourceVisualPSFModelResid (trend, x, y, e2, srcMask); -
branches/eam_branches/ipp-20120601/psphot/src/psphotSourceFits.c
r32744 r34078 224 224 if (source->type == PM_SOURCE_TYPE_DEFECT) return false; 225 225 if (source->type == PM_SOURCE_TYPE_SATURATED) return false; 226 227 # define TEST_X -420.0228 # define TEST_Y 300.0229 230 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {231 fprintf (stderr, "test galaxy\n");232 }233 234 # undef TEST_X235 # undef TEST_Y236 226 237 227 // set the radius based on the footprint (also sets the mask pixels) … … 513 503 } 514 504 515 # define TEST_X -540.0516 # define TEST_Y 540.0517 518 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {519 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);520 }521 522 505 float t1, t2, t4, t5; 523 506 if (TIMING) { psTimerStart ("psphotFitPCM"); } … … 569 552 } 570 553 571 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {572 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);573 }574 575 554 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); 576 555 psFree (pcm); … … 578 557 return model; 579 558 } 580 581 # undef TEST_X582 # undef TEST_Y583 559 584 560 // note that these should be 1/2n of the standard sersic index … … 603 579 float xMin = NAN; 604 580 float chiSquare[N_INDEX_GUESS]; 605 606 # define TEST_X -540.0607 # define TEST_Y 540.0608 609 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {610 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);611 }612 581 613 582 for (int i = 0; i < N_INDEX_GUESS; i++) { … … 635 604 assert (iMin >= 0); 636 605 637 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {638 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);639 }640 641 606 model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it 642 607 model->params->data.F32[PM_PAR_7] = 0.5/indexGuess[iMin]; … … 666 631 float xMin = NAN; 667 632 float chiSquare[N_INDEX_GUESS]; 668 669 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {670 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 5);671 }672 633 673 634 for (int i = 0; i < N_INDEX_GUESS; i++) { … … 701 662 } 702 663 assert (iMin >= 0); 703 704 if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {705 psTraceSetLevel("psModules.objects.pmPCM_MinimizeChisq", 0);706 }707 664 708 665 model->flags = PM_MODEL_STATUS_NONE; // do not attempt to handle failures here, let the next iteration deal with it
Note:
See TracChangeset
for help on using the changeset viewer.
