Changeset 41164 for trunk/Ohana/src/opihi/cmd.data/write_vectors.c
- Timestamp:
- Nov 27, 2019, 11:22:02 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.data/write_vectors.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/write_vectors.c
r40574 r41164 32 32 } 33 33 34 /* option generate a FITS output table */ 34 // option generate a FITS output table (FITS holds the filename) 35 // in FITS output context, -header is interpretted as a buffer containing 36 // header keywords to supplement the FITS table header 35 37 char *FITS = NULL; 38 Header *fitsheader = NULL; 39 Buffer *headbuffer = NULL; 36 40 if ((N = get_argument (argc, argv, "-fits"))) { 37 41 remove_argument (N, &argc, argv); 38 42 FITS = strcreate (argv[N]); 39 43 remove_argument (N, &argc, argv); 40 } 41 44 45 if ((N = get_argument (argc, argv, "-header"))) { 46 remove_argument (N, &argc, argv); 47 if ((headbuffer = SelectBuffer (argv[N], OLDBUFFER, TRUE)) == NULL) return (FALSE); 48 fitsheader = &headbuffer->header; 49 remove_argument (N, &argc, argv); 50 } 51 } 52 42 53 /* option generate a FITS output table */ 43 54 int CSV = FALSE; … … 124 135 125 136 if (FITS) { 126 int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, compress, format, Ntile);137 int status = WriteVectorTableFITS (argv[1], FITS, fitsheader, vec, Nvec, append, compress, format, Ntile); 127 138 free (vec); 128 139 return status; … … 260 271 gprint (GP_ERR, " -append : write to the end of the existing file\n"); 261 272 gprint (GP_ERR, " -fits NAME : write a fits table (extention name is NAME, column names match vector names)\n"); 273 gprint (GP_ERR, " in FITS output context, -header takes an additional argument which is interpretted\n"); 274 gprint (GP_ERR, " as a buffer containing header keywords to supplement the FITS table header\n"); 262 275 gprint (GP_ERR, " -csv : write a comma-separated values file (eg, to read in excel)\n"); 263 276 gprint (GP_ERR, " -f \"format\" : provide formatting codes for output:\n");
Note:
See TracChangeset
for help on using the changeset viewer.
