IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33566


Ignore:
Timestamp:
Mar 17, 2012, 3:21:00 PM (14 years ago)
Author:
eugene
Message:

used named values for masks, more info in verbosity

Location:
branches/eam_branches/ipp-20111122/Ohana/src/relastro
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/include/relastro.h

    r33537 r33566  
    2020
    2121typedef 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
     23typedef 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;
    2231
    2332typedef struct {
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/FitChip.c

    r30616 r33566  
    2727      if (raw[i].mask) continue;
    2828      if (isnan(raw[i].dMag)) {
    29         raw[i].mask |= 0x0004;
     29        raw[i].mask |= MARK_NAN_MAG_ERROR;
    3030        continue;
    3131      }
    3232      if (raw[i].dMag > SIGMA_LIM) {
    33         raw[i].mask |= 0x0008;
     33        raw[i].mask |= MARK_BIG_MAG_ERROR;
    3434        continue;
    3535      } // is this redundant with ImageOps.c:915?
     
    3939      dR = hypot (dL, dM);
    4040      if (dR > dRmax) {
    41         raw[i].mask |= 0x0010;
     41        raw[i].mask |= MARK_BIG_OFFSET;
    4242        continue;
    4343      }
     
    114114  for (i = 0; i < Nmatch; i++) {
    115115    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 ++;
    121121  }
    122122
    123123  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);
    125125
    126126  int Nm = 0;
  • branches/eam_branches/ipp-20111122/Ohana/src/relastro/src/ImageOps.c

    r33515 r33566  
    181181  }
    182182
    183   for (i = 0; VERBOSE2 && (i < Nimage); i++) {
     183  for (i = 0; VERBOSE && (i < Nimage); i++) {
    184184    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,
    186186             ohana_sec_to_date(image[i].tzero), name);
    187187  }
     
    607607    // an object with only one detection provides no information about the image calibration
    608608    // XXX this is already taken care of in bcatalog
    609     raw[i].mask = 0x0000;
     609    raw[i].mask = MARK_MEAS_DEFAULT;
    610610    if (catalog[c].average[n].Nmeasure <= SRC_MEAS_TOOFEW) {
    611       raw[i].mask |= 0x0001;
     611      raw[i].mask |= MARK_TOO_FEW_MEAS;
    612612    }
    613613    if (!finite(measure[0].dR) || !finite(measure[0].dD)) {
    614       raw[i].mask |= 0x0002;
     614      raw[i].mask |= MARK_NAN_POS_ERROR;
    615615    }
    616616    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  
    6262    // fprintf (stderr, "image "OFF_T_FMT" : Nstars: "OFF_T_FMT"\n",  i,  Nraw);
    6363    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);
    6565
    6666      // restore status quo ante
Note: See TracChangeset for help on using the changeset viewer.