Changeset 35669
- Timestamp:
- Jun 17, 2013, 6:53:08 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509/Ohana/src/relastro
- Files:
-
- 8 edited
-
include/relastro.h (modified) (1 diff)
-
src/ImageOps.c (modified) (2 diffs)
-
src/UpdateObjectOffsets.c (modified) (1 diff)
-
src/UpdateObjects.c (modified) (5 diffs)
-
src/args.c (modified) (2 diffs)
-
src/high_speed_catalogs.c (modified) (1 diff)
-
src/hpm_catalogs.c (modified) (1 diff)
-
src/relastro_objects.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/Ohana/src/relastro/include/relastro.h
r35416 r35669 194 194 195 195 int PhotFlagSelect, PhotFlagPoor, PhotFlagBad; 196 197 float MinBadQF; 198 float MaxMeanOffset; 196 199 197 200 int TimeSelect; -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/ImageOps.c
r35665 r35669 1019 1019 } 1020 1020 1021 // if (MinBadQF > 0.0) { 1022 // if (measure[0].psfQF < MinBadQF) return FALSE; 1023 // } 1024 1021 1025 /* select measurements by time */ 1022 1026 if (TimeSelect) { … … 1081 1085 } 1082 1086 1087 if (MinBadQF > 0.0) { 1088 if (measure[0].psfQF < MinBadQF) return FALSE; 1089 } 1090 1083 1091 /* select measurements by time */ 1084 1092 if (TimeSelect) { -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjectOffsets.c
r35494 r35669 128 128 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 129 129 130 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); } 131 if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); } 132 130 133 if (TimeSelect) { 131 134 char *tstart = ohana_sec_to_date (TSTART); -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/UpdateObjects.c
r35606 r35669 48 48 PMFit fitAve, fitPM, fitPAR, fit; 49 49 time_t T2000; 50 off_t Nave, Npm, Npar, Nskip ;51 off_t NaveSum, NpmSum, NparSum, NskipSum ;50 off_t Nave, Npm, Npar, Nskip, Noffset; 51 off_t NaveSum, NpmSum, NparSum, NskipSum, NoffSum; 52 52 double Tmin, Tmax, Tmean, Trange; 53 53 … … 80 80 } 81 81 82 NaveSum = NparSum = NpmSum = N skipSum = 0;82 NaveSum = NparSum = NpmSum = NoffSum = NskipSum = 0; 83 83 for (i = 0; i < Ncatalog; i++) { 84 84 85 85 if (VERBOSE2) fprintf (stderr, "astrometrize catalog %d : "OFF_T_FMT" ave, "OFF_T_FMT" meas\n", i, catalog[i].Naverage, catalog[i].Nmeasure); 86 86 87 Nave = Npar = Npm = Nskip = 0;87 Nave = Npar = Npm = Nskip = Noffset = 0; 88 88 for (j = 0; j < catalog[i].Naverage; j++) { 89 89 /* calculate the average value of R,D for a single star */ … … 121 121 122 122 // does the measurement pass the supplied filtering constraints? 123 if (!MeasFilterTestTiny(&measure[k], FALSE)) { 123 // MeasFilterTestTiny does not test psfQF 124 int keepMeasure = measureBig ? MeasFilterTest(&measureBig[k], FALSE) : MeasFilterTestTiny(&measure[k], FALSE); 125 if (!keepMeasure) { 124 126 measure[k].dbFlags &= ~ID_MEAS_USED_OBJ; 125 127 if (measureBig) { measureBig[k].dbFlags &= ~ID_MEAS_USED_OBJ; } … … 345 347 continue; 346 348 } 349 350 // what is the offset relative to the mean fit position? 351 coords.crval1 = catalog[i].average[j].R; 352 coords.crval2 = catalog[i].average[j].D; 353 354 double dXoff, dYoff; 355 RD_to_XY (&dXoff, &dYoff, fit.Ro, fit.Do, &coords); 356 float dPos = hypot (dXoff, dYoff); 357 if (dPos > MaxMeanOffset) { 358 Noffset ++; 359 continue; 360 } 361 347 362 348 363 // the measure fields must be updated before the average fields … … 390 405 NparSum += Npar; 391 406 NskipSum += Nskip; 392 if (VERBOSE) fprintf (stderr, "catalog %d : "OFF_T_FMT" ave, "OFF_T_FMT" pm, "OFF_T_FMT" par : Nskip "OFF_T_FMT"\n", i, Nave, Npm, Npar, Nskip); 407 NoffSum += Noffset; 408 if (VERBOSE) fprintf (stderr, "catalog %d : "OFF_T_FMT" ave, "OFF_T_FMT" pm, "OFF_T_FMT" par : Nskip "OFF_T_FMT", Noffset "OFF_T_FMT"\n", i, Nave, Npm, Npar, Nskip, Noffset); 393 409 } 394 410 395 if (VERBOSE) fprintf (stderr, "fitted "OFF_T_FMT" objects ("OFF_T_FMT" ave, "OFF_T_FMT" pm, "OFF_T_FMT" par), skipped "OFF_T_FMT" \n", (NaveSum + NpmSum + NparSum), NaveSum, NpmSum, NparSum, NskipSum);411 if (VERBOSE) fprintf (stderr, "fitted "OFF_T_FMT" objects ("OFF_T_FMT" ave, "OFF_T_FMT" pm, "OFF_T_FMT" par), skipped "OFF_T_FMT", "OFF_T_FMT" have too large an offset\n", (NaveSum + NpmSum + NparSum), NaveSum, NpmSum, NparSum, NskipSum, NoffSum); 396 412 return (TRUE); 397 413 } -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/args.c
r35416 r35669 382 382 } 383 383 384 MinBadQF = 0.0; 385 if ((N = get_argument (argc, argv, "-min-bad-psfqf"))) { 386 remove_argument (N, &argc, argv); 387 MinBadQF = atof (argv[N]); 388 remove_argument (N, &argc, argv); 389 } 390 391 MaxMeanOffset = 10.0; 392 if ((N = get_argument (argc, argv, "-max-mean-offset"))) { 393 remove_argument (N, &argc, argv); 394 MaxMeanOffset = atof (argv[N]); 395 remove_argument (N, &argc, argv); 396 } 397 384 398 NLOOP = 4; 385 399 if ((N = get_argument (argc, argv, "-nloop"))) { … … 675 689 remove_argument (N, &argc, argv); 676 690 PhotFlagPoor = atoi (argv[N]); 691 remove_argument (N, &argc, argv); 692 } 693 694 MinBadQF = 0.0; 695 if ((N = get_argument (argc, argv, "-min-bad-psfqf"))) { 696 remove_argument (N, &argc, argv); 697 MinBadQF = atof (argv[N]); 698 remove_argument (N, &argc, argv); 699 } 700 701 MaxMeanOffset = 10.0; 702 if ((N = get_argument (argc, argv, "-max-mean-offset"))) { 703 remove_argument (N, &argc, argv); 704 MaxMeanOffset = atof (argv[N]); 677 705 remove_argument (N, &argc, argv); 678 706 } -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/high_speed_catalogs.c
r35105 r35669 162 162 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 163 163 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 164 165 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); } 166 if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); } 164 167 165 168 if (WHERE_A[0]) { snprintf (tmpline, 1024, "%s -D WHERE_A \"%s\"", command, WHERE_A); strcpy (command, tmpline); } -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/hpm_catalogs.c
r35416 r35669 160 160 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 161 161 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 162 163 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); } 164 if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); } 162 165 163 166 if (TimeSelect) { -
branches/eam_branches/ipp-20130509/Ohana/src/relastro/src/relastro_objects.c
r35105 r35669 154 154 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 155 155 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 156 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); }157 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); }158 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); }156 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 157 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } 158 if (PhotFlagPoor) { snprintf (tmpline, 1024, "%s +photflagpoor %d", command, PhotFlagPoor); strcpy (command, tmpline); } 159 159 // XXX note that the above pass in the flag as decimal -- also note that args.c cannot handle 0xHEX values 160 161 if (MinBadQF > 0.0) { snprintf (tmpline, 1024, "%s -min-bad-psfqf %f", command, MinBadQF); strcpy (command, tmpline); } 162 if (MaxMeanOffset != 10.0) { snprintf (tmpline, 1024, "%s -max-mean-offset %f", command, MaxMeanOffset); strcpy (command, tmpline); } 160 163 161 164 if (TimeSelect) {
Note:
See TracChangeset
for help on using the changeset viewer.
