IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 8, 2011, 2:54:20 PM (15 years ago)
Author:
eugene
Message:

add nice ability to pantasks/pcontrol/pclient; add ports to pantasks_server; minor updates to dvo skycoverage, etc

Location:
trunk/Ohana/src/opihi/cmd.data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/read_vectors.c

    r31667 r32632  
    2323int read_vectors (int argc, char **argv) {
    2424 
    25   int i, j, Nskip, Nvec, *col, done, status, IsCSV;
     25    int i, j, Nskip, Nvec, *col, done, status, IsCSV, VERBOSE;
    2626  int Nbytes, nbytes, Nstart, NELEM, N, nread;
    2727  char *colstr, *c0, *c1, *buffer, *extname;
     
    5151    remove_argument (N, &argc, argv);
    5252    IsCSV = TRUE;
     53  }
     54
     55  VERBOSE = FALSE;
     56  if ((N = get_argument (argc, argv, "-v"))) {
     57    remove_argument (N, &argc, argv);
     58    VERBOSE = TRUE;
    5359  }
    5460
     
    121127    scan_line (f, buffer);
    122128  }
    123 
    124   int Nfield = 0;
    125   int Nline = 0;
    126129
    127130  Nstart = 0;
     
    157160            status = dparse (&value, col[i], c0);
    158161          }
    159           vec[i][0].elements.Flt[N] = value;
    160162          if (status) {
    161               Nfield ++;
     163              vec[i][0].elements.Flt[N] = value;
     164          } else {
     165              vec[i][0].elements.Flt[N] = NAN;
     166              if (VERBOSE) {
     167                  if (IsCSV) {
     168                      gprint (GP_ERR, "suspect field: %d (%s) in %s\n", col[i], argv[2*i+2], c0);
     169                  } else {
     170                      gprint (GP_ERR, "suspect field: %d in %s\n", col[i], c0);
     171                  }
     172              }
    162173          }
    163           if (!status) vec[i][0].elements.Flt[N] = NAN;
    164         }
    165         if (status) N++;
    166       }
    167       Nline ++;
    168       if (c1) {
    169           // fprintf (stderr, "line %d, chars %ld, fields %d\n", Nline, (c1 - c0), Nfield);
    170       }
    171       Nfield = 0;
     174        }
     175        if (status) {
     176            N++;
     177        } else {
     178            if (VERBOSE && FALSE) {
     179                char temp[32];
     180                strncpy (temp, c0, 32);
     181                temp[31] = 0;
     182                gprint (GP_ERR, "skip line %s\n\n", temp);
     183            }
     184        }
     185      }
    172186      c0 = c1 + 1;
    173187      if (N == NELEM) {
     
    177191        }
    178192      }
    179        
    180193    }
    181194  }
  • trunk/Ohana/src/opihi/cmd.data/vstats.c

    r30610 r32632  
    169169
    170170    // we are going to do another pass: mark the entries to skip
    171     pmin = max;
    172     pmax = min;
     171    pmin = min;
     172    pmax = max;
    173173    if (iter < Niter - 1) {
    174174      if (vec[0].type == OPIHI_FLT) {
     
    208208skip:
    209209  FREE(mask);
     210  if (mask) mask = NULL;
    210211
    211212  if (!Quiet) {
Note: See TracChangeset for help on using the changeset viewer.