IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2015, 6:18:23 PM (11 years ago)
Author:
eugene
Message:

merge changes from EAM dev branch ohana.20150429

Location:
trunk/Ohana
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/cmd.data

  • trunk/Ohana/src/opihi/cmd.data/write_vectors.c

    r35109 r38441  
    33int write_vectors (int argc, char **argv) {
    44 
    5   int append;
    65  int i, j, Nvec, Ne, N;
    76  FILE *f;
    87  char **fmtlist, *fmttype;
    9   char *p0, *p1, *p2, *format, *FITS;
     8  char *p0, *p1, *p2, *format;
    109  Vector **vec;
    1110
     
    3433
    3534  /* option generate a FITS output table */
    36   FITS = NULL;
     35  char *FITS = NULL;
    3736  if ((N = get_argument (argc, argv, "-fits"))) {
    3837    remove_argument (N, &argc, argv);
     
    5857  }
    5958
    60   append = FALSE;
     59  int append = FALSE;
    6160  if ((N = get_argument (argc, argv, "-append"))) {
    6261    remove_argument (N, &argc, argv);
    6362    append = TRUE;
     63  }
     64
     65  char *compress = NULL;
     66  if ((N = get_argument (argc, argv, "-compress-mode"))) {
     67    remove_argument (N, &argc, argv);
     68    compress = strcreate(argv[N]);
     69    remove_argument (N, &argc, argv);
     70  } else if ((N = get_argument (argc, argv, "-compress"))) {
     71    remove_argument (N, &argc, argv);
     72    compress = strcreate("GZIP_1");
     73    if (!FITS) {
     74      fprintf (stderr, "NOTE: write_vectors -compress has no effect on non-FITS\n");
     75    }
    6476  }
    6577
     
    105117
    106118  if (FITS) {
    107     int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, format);
     119    int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, compress, format);
    108120    free (vec);
    109121    return status;
     
    243255    gprint (GP_ERR, "  -csv : write a comma-separated values file (eg, to read in excel)\n");
    244256    gprint (GP_ERR, "  -f \"format\" : provide formatting codes for output:\n");
    245     gprint (GP_ERR, "    ascii / csv : format consists of c-style format codes in form %NN.Md\n");
     257    gprint (GP_ERR, "    ascii / csv : format consists of c-style format codes in form %%NN.Md\n");
    246258    gprint (GP_ERR, ",     the following codes are allowed\n");
    247     gprint (GP_ERR, "        %e -- double, %f -- float\n");
    248     gprint (GP_ERR, "        %d -- int, %c -- char, %x -- hex int\n");
     259    gprint (GP_ERR, "        %%e -- double, %%f -- float\n");
     260    gprint (GP_ERR, "        %%d -- int, %%c -- char, %%x -- hex int\n");
    249261    gprint (GP_ERR, "    FITS : format consists of the following FITS binary table format codes:\n");
    250262    gprint (GP_ERR, "      B : 1 byte int\n");   
Note: See TracChangeset for help on using the changeset viewer.