IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 7, 2007, 6:28:03 PM (19 years ago)
Author:
eugene
Message:

converted internal NO_MAG and NO_ERR to NAN, NAN_S_SHORT, etc as appropriate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/gstar.c

    r15208 r15509  
    274274}
    275275
    276 void print_value (double value, short int ival) {
    277   if (ival == NO_MAG)
     276void print_double (double value) {
     277  if (isnan(value))
     278    gprint (GP_LOG, "NaN    ");
     279  else
     280    gprint (GP_LOG, "%6.3f ", value);
     281}
     282
     283void print_short (double value, short int ival) {
     284  if (ival == NAN_S_SHORT)
    278285    gprint (GP_LOG, "NaN    ");
    279286  else
     
    320327    case 0: /* average mags */
    321328      if (seq == -1) {
    322         print_value (NO_MAG, NO_MAG);
     329        print_double (NAN);
    323330      } else {
    324         print_value (secfilt[seq].M, secfilt[seq].M);
     331        print_double (secfilt[seq].M);
    325332      }
    326333      break;
     
    328335    case 1: /* average mags errors */
    329336      if (seq == -1) {
    330         print_value (NO_MAG, NO_MAG);
     337        print_double (NAN);
    331338      } else {
    332         print_value (secfilt[seq].dM, secfilt[seq].dM);
     339        print_double (secfilt[seq].dM);
    333340      }
    334341      break;
     
    336343    case 2: /* average mag chisq */
    337344      if (seq == -1) {
    338         print_value (NO_MAG, NO_MAG);
     345        print_short (NAN_S_SHORT, NAN_S_SHORT);
    339346      } else {
    340         print_value (pow (10.0, 0.01*secfilt[seq].Xm), secfilt[seq].Xm);
     347        print_short (pow (10.0, 0.01*secfilt[seq].Xm), secfilt[seq].Xm);
    341348      }
    342349      break;
Note: See TracChangeset for help on using the changeset viewer.