IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2012, 3:24:39 PM (14 years ago)
Author:
eugene
Message:

support for parallel dvo in mextract, avextract, avmerge, gstar, gcat; remove some if-def-ed out code already moved to libdvo; list -vectors and -buffers options (store names of vectors and buffers in lists); list -copy give error if missing source; catlist, hosts & remote functions to support parallel dvos; skyregion -save option; new skycoverage modes (-min-ubercal; -min-dmag-sys; -min-mcal; -max-mcal); gstar output formatting cleanups; add more average info to gstar output; functions for spectral similarity analysis; coords returns nans for projections off the sphere; fix cumulative function; add name:type option to opihi/read function (eg read a:float 2 b:time 3 c:int 4); line -frac option; vtype function to get vector types; threshold function; write -fits option; code for unfinished mtype function (matching vtype)

File:
1 edited

Legend:

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

    r2598 r33662  
    77}
    88
     9int vtype (int argc, char **argv) {
     10
     11  int N;
     12
     13  char *Variable = (char *) NULL;
     14  if ((N = get_argument (argc, argv, "-var"))) {
     15    remove_argument (N, &argc, argv);
     16    Variable = strcreate (argv[N]);
     17    remove_argument (N, &argc, argv);
     18  }
     19
     20  if (argc != 2) {
     21    gprint (GP_ERR, "USAGE: vtype (vector) [-var out]\n");
     22    return (FALSE);
     23  }
     24
     25  Vector *vec = SelectVector (argv[1], OLDVECTOR, FALSE);
     26  if (!vec) {
     27    gprint (GP_ERR, "unknown vector %s\n", argv[1]);
     28    free (Variable);
     29    return FALSE;
     30  }
     31
     32  if (vec->type == OPIHI_FLT) {
     33    if (Variable) {
     34      set_str_variable (Variable, "FLT");
     35    } else {
     36      gprint (GP_LOG, "%s : FLT\n", argv[1]);
     37    }
     38  } else {
     39    if (Variable) {
     40      set_str_variable (Variable, "INT");
     41    } else {
     42      gprint (GP_LOG, "%s : INT\n", argv[1]);
     43    }
     44  }
     45  if (Variable) free (Variable);
     46
     47  return (TRUE);
     48}
     49
Note: See TracChangeset for help on using the changeset viewer.