Changeset 38441 for trunk/Ohana/src/opihi/cmd.data/write_vectors.c
- Timestamp:
- Jun 12, 2015, 6:18:23 PM (11 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/opihi/cmd.data (modified) (1 prop)
-
src/opihi/cmd.data/write_vectors.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/ohana.20150429 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/opihi/cmd.data
- Property svn:mergeinfo changed
/branches/eam_branches/ohana.20150429/src/opihi/cmd.data (added) merged: 38330,38336,38338,38340-38341,38363,38367,38406,38410,38424,38440
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.data/write_vectors.c
r35109 r38441 3 3 int write_vectors (int argc, char **argv) { 4 4 5 int append;6 5 int i, j, Nvec, Ne, N; 7 6 FILE *f; 8 7 char **fmtlist, *fmttype; 9 char *p0, *p1, *p2, *format , *FITS;8 char *p0, *p1, *p2, *format; 10 9 Vector **vec; 11 10 … … 34 33 35 34 /* option generate a FITS output table */ 36 FITS = NULL;35 char *FITS = NULL; 37 36 if ((N = get_argument (argc, argv, "-fits"))) { 38 37 remove_argument (N, &argc, argv); … … 58 57 } 59 58 60 append = FALSE;59 int append = FALSE; 61 60 if ((N = get_argument (argc, argv, "-append"))) { 62 61 remove_argument (N, &argc, argv); 63 62 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 } 64 76 } 65 77 … … 105 117 106 118 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); 108 120 free (vec); 109 121 return status; … … 243 255 gprint (GP_ERR, " -csv : write a comma-separated values file (eg, to read in excel)\n"); 244 256 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"); 246 258 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"); 249 261 gprint (GP_ERR, " FITS : format consists of the following FITS binary table format codes:\n"); 250 262 gprint (GP_ERR, " B : 1 byte int\n");
Note:
See TracChangeset
for help on using the changeset viewer.
