IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16429


Ignore:
Timestamp:
Feb 13, 2008, 3:22:53 PM (18 years ago)
Author:
eugene
Message:

add quiet option

File:
1 edited

Legend:

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

    r15442 r16429  
    33int imhist (int argc, char **argv) {
    44 
    5   int i, j, N, Nbins;
     5  int i, j, N, Nbins, Quiet;
    66  int sx, sy, nx, ny, bin;
    77  float *V, delta;
     
    99  Vector *vec1, *vec2;
    1010  Buffer *buf;
     11
     12  Quiet = FALSE;
     13  if ((N = get_argument (argc, argv, "-q"))) {
     14    Quiet = TRUE;
     15    remove_argument (N, &argc, argv);
     16  }
     17  if ((N = get_argument (argc, argv, "-quiet"))) {
     18    Quiet = TRUE;
     19    remove_argument (N, &argc, argv);
     20  }
    1121
    1222  delta = 0;
     
    8797    Nbins = (max - min) / dx;
    8898  }
    89   gprint (GP_ERR, "max %f, min %f, dx %f\n", max, min, dx);
    90  
     99  if (Quiet) {
     100    set_variable ("MIN", min);
     101    set_variable ("MAX", max);
     102    set_variable ("DX",  dx);
     103  } else {
     104    gprint (GP_LOG, "max %f, min %f, dx %f\n", max, min, dx);
     105  } 
     106
    91107  vec1[0].Nelements = Nbins + 1;
    92108  vec2[0].Nelements = Nbins + 1;
Note: See TracChangeset for help on using the changeset viewer.