Changeset 33566
- Timestamp:
- Mar 17, 2012, 3:21:00 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/relastro
- Files:
-
- 4 edited
-
include/relastro.h (modified) (1 diff)
-
src/FitChip.c (modified) (3 diffs)
-
src/ImageOps.c (modified) (2 diffs)
-
src/UpdateChips.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relastro/include/relastro.h
r33537 r33566 20 20 21 21 typedef enum {TARGET_NONE, TARGET_SIMPLE, TARGET_CHIPS, TARGET_MOSAICS, TARGET_HIGH_SPEED, TARGET_MERGE_SOURCE, TARGET_UPDATE_OBJECTS, TARGET_UPDATE_OFFSETS, TARGET_LOAD_OBJECTS} FitTarget; 22 23 typedef enum { 24 MARK_MEAS_DEFAULT = 0x0000, 25 MARK_TOO_FEW_MEAS = 0x0001, 26 MARK_NAN_POS_ERROR = 0x0002, 27 MARK_NAN_MAG_ERROR = 0x0004, 28 MARK_BIG_MAG_ERROR = 0x0008, 29 MARK_BIG_OFFSET = 0x0010, 30 } MeasurementMask; 22 31 23 32 typedef struct { -
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/FitChip.c
r30616 r33566 27 27 if (raw[i].mask) continue; 28 28 if (isnan(raw[i].dMag)) { 29 raw[i].mask |= 0x0004;29 raw[i].mask |= MARK_NAN_MAG_ERROR; 30 30 continue; 31 31 } 32 32 if (raw[i].dMag > SIGMA_LIM) { 33 raw[i].mask |= 0x0008;33 raw[i].mask |= MARK_BIG_MAG_ERROR; 34 34 continue; 35 35 } // is this redundant with ImageOps.c:915? … … 39 39 dR = hypot (dL, dM); 40 40 if (dR > dRmax) { 41 raw[i].mask |= 0x0010;41 raw[i].mask |= MARK_BIG_OFFSET; 42 42 continue; 43 43 } … … 114 114 for (i = 0; i < Nmatch; i++) { 115 115 if (!raw[i].mask) continue; 116 if (raw[i].mask & 0x01) nMask1 ++;117 if (raw[i].mask & 0x02) nMask2 ++;118 if (raw[i].mask & 0x04) nMask3 ++;119 if (raw[i].mask & 0x08) nMask4 ++;120 if (raw[i].mask & 0x10) nMask5 ++;116 if (raw[i].mask & MARK_TOO_FEW_MEAS ) nMask1 ++; 117 if (raw[i].mask & MARK_NAN_POS_ERROR) nMask2 ++; 118 if (raw[i].mask & MARK_NAN_MAG_ERROR) nMask3 ++; 119 if (raw[i].mask & MARK_BIG_MAG_ERROR) nMask4 ++; 120 if (raw[i].mask & MARK_BIG_OFFSET ) nMask5 ++; 121 121 } 122 122 123 123 GetScatterRawRef(&dLsigFull, &dMsigFull, &dRsigFull, &NstatFull, raw, ref, Nmatch, SIGMA_LIM); 124 GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat,raw, ref, Nmatch, IMFIT_SYS_SIGMA_LIM);124 GetScatterRawRef(&dLsig, &dMsig, &dRsig, &Nstat, raw, ref, Nmatch, IMFIT_SYS_SIGMA_LIM); 125 125 126 126 int Nm = 0; -
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/ImageOps.c
r33515 r33566 181 181 } 182 182 183 for (i = 0; VERBOSE 2&& (i < Nimage); i++) {183 for (i = 0; VERBOSE && (i < Nimage); i++) { 184 184 name = GetPhotcodeNamebyCode (image[i].photcode); 185 fprintf (stderr, "image "OFF_T_FMT" has "OFF_T_FMT" measures (%s, %s)\n", i, N_onImage[i],185 fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" of %d measures (%s, %s)\n", i, image[i].imageID, image[i].name, N_onImage[i], image[i].nstar, 186 186 ohana_sec_to_date(image[i].tzero), name); 187 187 } … … 607 607 // an object with only one detection provides no information about the image calibration 608 608 // XXX this is already taken care of in bcatalog 609 raw[i].mask = 0x0000;609 raw[i].mask = MARK_MEAS_DEFAULT; 610 610 if (catalog[c].average[n].Nmeasure <= SRC_MEAS_TOOFEW) { 611 raw[i].mask |= 0x0001;611 raw[i].mask |= MARK_TOO_FEW_MEAS; 612 612 } 613 613 if (!finite(measure[0].dR) || !finite(measure[0].dD)) { 614 raw[i].mask |= 0x0002;614 raw[i].mask |= MARK_NAN_POS_ERROR; 615 615 } 616 616 raw[i].Nmeas = catalog[c].average[n].Nmeasure; // record so we can check how well connected an image is -
branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/UpdateChips.c
r33448 r33566 62 62 // fprintf (stderr, "image "OFF_T_FMT" : Nstars: "OFF_T_FMT"\n", i, Nraw); 63 63 if (!FitChip (raw, ref, Nraw, &image[i])) { 64 if (VERBOSE) fprintf (stderr, "reject fit for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT" \n", image[i].name, i, Nraw);64 if (VERBOSE) fprintf (stderr, "reject fit for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT" of %d\n", image[i].name, i, Nraw, image[i].nstar); 65 65 66 66 // restore status quo ante
Note:
See TracChangeset
for help on using the changeset viewer.
