IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 10:26:46 PM (11 years ago)
Author:
eugene
Message:

merge changes from EAM branch ipp-20150419

Location:
trunk/Ohana/src/opihi/cmd.data
Files:
3 edited
1 copied

Legend:

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

    r38234 r38463  
    2525$(SRC)/book.$(ARCH).o           \
    2626$(SRC)/book_commands.$(ARCH).o  \
     27$(SRC)/bisection.$(ARCH).o              \
    2728$(SRC)/cast.$(ARCH).o           \
    2829$(SRC)/center.$(ARCH).o \
  • trunk/Ohana/src/opihi/cmd.data/init.c

    r38234 r38463  
    99int box              PROTO((int, char **));
    1010int book_command     PROTO((int, char **));
     11int bisection        PROTO((int, char **));
    1112int center           PROTO((int, char **));
    12 int parity           PROTO((int, char **));
    1313int cast             PROTO((int, char **));
    1414int circstats        PROTO((int, char **));
     
    9090int plot             PROTO((int, char **));
    9191int dot              PROTO((int, char **));
     92int parity           PROTO((int, char **));
    9293int point            PROTO((int, char **));
    9394int ps               PROTO((int, char **));
     
    176177  {1, "applyfit2d",   applyfit2d,       "apply 2-d fit to new vector"},
    177178  {1, "applyfit3d",   applyfit3d,       "apply 3-d fit to new vector"},
     179  {1, "bisection",    bisection,        "use bisection to find threshold in vector"},
    178180  {1, "book",         book_command,     "commands to manipulate book/page/word data"},
    179181  {1, "box",          box,              "draw a box on the plot"},
  • trunk/Ohana/src/opihi/cmd.data/tvcolors.c

    r31667 r38463  
    1616  FREE (name);
    1717
     18  int SetNAN = FALSE;
     19  int red, green, blue;
     20  if ((N = get_argument (argc, argv, "-nan"))) {
     21    if (N > argc - 4) {
     22      gprint (GP_ERR, "ERROR: -nan (red) (green) (blue) does not have enough arguments\n");
     23      return FALSE;
     24    }
     25    remove_argument (N, &argc, argv);
     26    red = strtol (argv[N], NULL, 0);
     27    remove_argument (N, &argc, argv);
     28    green = strtol (argv[N], NULL, 0);
     29    remove_argument (N, &argc, argv);
     30    blue = strtol (argv[N], NULL, 0);
     31    remove_argument (N, &argc, argv);
     32    SetNAN = TRUE;
     33  }
     34
    1835  // use the currently-set zero,range values if not supplied
    19   if (argc != 2) {
    20     gprint (GP_ERR, "USAGE: tvcolors (colormap)\n");
     36  if (!SetNAN && (argc != 2)) {
     37    gprint (GP_ERR, "USAGE: tvcolors (colormap) [-nan red green blue]\n");
    2138    gprint (GP_ERR, " colormap options : greyscale, -greyscale, rainbow, heat, fullcolor, ruffcolor (also grayscale, -grayscale)\n");
    2239    return (FALSE);
    2340  }
    2441
    25   KiiSetColormap (kapa, argv[1]);
     42  if (SetNAN) {
     43    KiiSetNanColor (kapa, red, green, blue);
     44  }
     45  if (argc == 2) {
     46    KiiSetColormap (kapa, argv[1]);
     47  }
    2648  return (TRUE);
    2749}
Note: See TracChangeset for help on using the changeset viewer.