Changeset 36796
- Timestamp:
- Jun 2, 2014, 6:07:00 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140423/Ohana/src/relastro
- Files:
-
- 5 edited
-
include/relastro.h (modified) (2 diffs)
-
src/args.c (modified) (2 diffs)
-
src/bcatalog.c (modified) (5 diffs)
-
src/dvo_astrom_ops.c (modified) (2 diffs)
-
src/load_catalogs.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/relastro/include/relastro.h
r36746 r36796 233 233 int CLIP_THRESH; 234 234 int USE_BASIC_CHECK; 235 236 int ExcludeBogus; 237 double ExcludeBogusRadius; 235 238 236 239 FitMode FIT_MODE; … … 417 420 int setMeanR (double ra_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 418 421 int setMeanD (double dec_fit, MeasureTiny *measure, Average *average, SecFilt *secfilt); 422 double getMeanR_Big (Measure *measure, Average *average, SecFilt *secfilt); 423 double getMeanD_Big (Measure *measure, Average *average, SecFilt *secfilt); 419 424 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt); 420 425 int setMeanD_Big (double dec_fit, Measure *measure, Average *average, SecFilt *secfilt); -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/args.c
r36746 r36796 183 183 remove_argument (N, &argc, argv); 184 184 FlagOutlier = TRUE; 185 } 186 187 ExcludeBogus = FALSE; 188 ExcludeBogusRadius = 0.0; 189 if ((N = get_argument (argc, argv, "-exclude-bogus"))) { 190 remove_argument (N, &argc, argv); 191 ExcludeBogusRadius = atof (argv[N]); 192 remove_argument (N, &argc, argv); 193 ExcludeBogus = TRUE; 185 194 } 186 195 … … 593 602 remove_argument (N, &argc, argv); 594 603 FlagOutlier = TRUE; 604 } 605 606 ExcludeBogus = FALSE; 607 ExcludeBogusRadius = 0.0; 608 if ((N = get_argument (argc, argv, "-exclude-bogus"))) { 609 remove_argument (N, &argc, argv); 610 ExcludeBogusRadius = atof (argv[N]); 611 remove_argument (N, &argc, argv); 612 ExcludeBogus = TRUE; 595 613 } 596 614 -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/bcatalog.c
r36790 r36796 6 6 static int Nskip2 = 0; 7 7 8 static int NskipBogus = 0; 9 8 10 // test image: 2013/06/15,13:25:51, GPC1.r.XY50 9 11 static int CHECK_TEST_IMAGE = TRUE; … … 21 23 off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm; 22 24 int Nsecfilt; 25 Coords coords; 26 27 /* for outlier rejection, project coordinates to a plane centered on the object with units of arcsec */ 28 coords.crval1 = 0; 29 coords.crval2 = 0; 30 coords.crpix1 = 0; 31 coords.crpix2 = 0; 32 coords.cdelt1 = coords.cdelt2 = 1.0 / 3600.0; 33 coords.pc1_1 = coords.pc2_2 = 1.0; 34 coords.pc1_2 = coords.pc2_1 = 0.0; 35 coords.Npolyterms = 1; 36 strcpy (coords.ctype, "DEC--SIN"); 23 37 24 38 // XXX in the future, use catalog[0].Nsecfilt only? allow catalogs to have variable Nsecfilt? … … 79 93 } 80 94 81 // filter out outliers 95 // filter out outliers - these are detections inconsistent with the offset distribution 82 96 if (FlagOutlier && (catalog[0].measure[offset].dbFlags & ID_MEAS_POOR_ASTROM)) { 83 97 catalog[0].measure[offset].dbFlags &= ~ID_MEAS_USED_CHIP; … … 88 102 } 89 103 catalog[0].measure[offset].dbFlags |= ID_MEAS_USED_CHIP; 104 105 // exclude bogus 106 if (ExcludeBogus) { 107 double Ri = getMeanR_Big (&catalog[0].measure[offset], &catalog[0].average[i], &catalog[0].secfilt[i*Nsecfilt]); 108 double Di = getMeanD_Big (&catalog[0].measure[offset], &catalog[0].average[i], &catalog[0].secfilt[i*Nsecfilt]); 109 coords.crval1 = catalog[0].average[i].R; 110 coords.crval2 = catalog[0].average[i].D; 111 double Xi, Yi; 112 RD_to_XY (&Xi, &Yi, Ri, Di, &coords); 113 double radius = hypot(Xi, Yi); 114 // XXX this radius needs to be configurable 115 if (radius > ExcludeBogusRadius) { 116 NskipBogus ++; 117 continue; 118 } 119 } 90 120 91 121 // re-assess on each run of relastro if a measurement should be used … … 159 189 160 190 void bcatalog_show_skips () { 161 fprintf (stderr, "Nskip: %d, %d\n", Nskip1, Nskip2); 162 fprintf (stderr, "Nkeep: %d, %d\n", Nkeep1, Nkeep2); 191 fprintf (stderr, "NskipBogus: %d\n", NskipBogus); 192 // fprintf (stderr, "Nskip: %d, %d\n", Nskip1, Nskip2); 193 // fprintf (stderr, "Nkeep: %d, %d\n", Nkeep1, Nkeep2); 163 194 } 164 195 -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/dvo_astrom_ops.c
r33652 r36796 91 91 } 92 92 93 double getMeanR_Big (Measure *measure, Average *average, SecFilt *secfilt) { 94 95 double ra; 96 97 /* the measure carries the instantaneous mean position at the epoch t */ 98 ra = average[0].R - measure[0].dR / 3600.0; 99 100 /* possible corrections to mean ra: 101 102 - proper-motion and parallax 103 - abberation 104 - precession and nutation, etc 105 - refraction 106 - DCR 107 108 */ 109 110 return (ra); 111 } 112 113 double getMeanD_Big (Measure *measure, Average *average, SecFilt *secfilt) { 114 115 double dec; 116 117 /* the measure carries the instantaneous mean position at the epoch t */ 118 dec = average[0].D - measure[0].dD / 3600.0; 119 120 /* possible corrections to mean ra: 121 122 - proper-motion and parallax 123 - abberation 124 - precession and nutation, etc 125 - refraction 126 - DCR 127 128 */ 129 130 return (dec); 131 } 132 93 133 int setMeanR_Big (double ra_fit, Measure *measure, Average *average, SecFilt *secfilt) { 94 134 … … 144 184 return (TRUE); 145 185 } 186 -
branches/eam_branches/ipp-20140423/Ohana/src/relastro/src/load_catalogs.c
r36630 r36796 84 84 } 85 85 86 // XXX TEST :bcatalog_show_skips();86 bcatalog_show_skips(); 87 87 88 88 Nstar = 0; … … 162 162 163 163 if (FlagOutlier) { snprintf (tmpline, 1024, "%s -clip %d", command, CLIP_THRESH); strcpy (command, tmpline); } 164 if (ExcludeBogus) { snprintf (tmpline, 1024, "%s -exclude-bogus %f", command, ExcludeBogusRadius); strcpy (command, tmpline); } 164 165 165 166 if (USE_FIXED_PIXCOORDS) { snprintf (tmpline, 1024, "%s -D USE_FIXED_PIXCOORDS 1", command); strcpy (command, tmpline); }
Note:
See TracChangeset
for help on using the changeset viewer.
