IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 28, 2015, 8:28:24 PM (11 years ago)
Author:
eugene
Message:

adding compression option to wd and write

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/opihi/cmd.data/write_vectors.c

    r35109 r38330  
    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  int compress = FALSE;
     66  if ((N = get_argument (argc, argv, "-compress"))) {
     67    remove_argument (N, &argc, argv);
     68    compress = TRUE;
     69    if (!FITS) {
     70      fprintf (stderr, "NOTE: write_vectors -compress has no effect on non-FITS\n");
     71    }
    6472  }
    6573
     
    105113
    106114  if (FITS) {
    107     int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, format);
     115    int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, compress, format);
    108116    free (vec);
    109117    return status;
Note: See TracChangeset for help on using the changeset viewer.