IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39360 for trunk


Ignore:
Timestamp:
Feb 18, 2016, 5:36:58 PM (10 years ago)
Author:
eugene
Message:

add support for ntile option in fits output compression

Location:
trunk/Ohana/src/opihi
Files:
9 edited

Legend:

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

    r39328 r39360  
    22int dump_raw_table (FTable *table, char *message);
    33int dump_cmp_table (FTable *table, char *message);
     4void gfits_uncompress_timing ();
    45
    56FILE *f = (FILE *) NULL;
     
    594595    }
    595596    if (!gfits_uncompress_table (&table, &rawtable)) ESCAPE ("failed to uncompress table\n");
     597    gfits_uncompress_timing ();
     598
    596599    dump_raw_table (&rawtable, "rd raw");
    597600
  • trunk/Ohana/src/opihi/cmd.data/write_vectors.c

    r39283 r39360  
    7474      fprintf (stderr, "NOTE: write_vectors -compress has no effect on non-FITS\n");
    7575    }
     76  }
     77
     78  int Ntile = 0;
     79  if ((N = get_argument (argc, argv, "-compress-Ntile"))) {
     80    remove_argument (N, &argc, argv);
     81    Ntile = atoi(argv[N]);
     82    remove_argument (N, &argc, argv);
    7683  }
    7784
     
    117124
    118125  if (FITS) {
    119     int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, compress, format);
     126    int status = WriteVectorTableFITS (argv[1], FITS, vec, Nvec, append, compress, format, Ntile);
    120127    free (vec);
    121128    return status;
  • trunk/Ohana/src/opihi/dvo/avextract.c

    r39296 r39360  
    262262  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    263263  if (RESULT_FILE && !SKIP_RESULTS) {
    264     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL);
     264    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL, 0);
    265265    if (!status) {
    266266      goto escape;
  • trunk/Ohana/src/opihi/dvo/avmatch.c

    r39225 r39360  
    115115
    116116      CoordsFile = abspath("coords.fits", 1024);
    117       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL);
     117      int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
    118118      if (!status) goto escape;
    119119    }
     
    304304      vec[i][0].Nelements = Nfound;
    305305    }
    306     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields + 1, FALSE, FALSE, NULL);
     306    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields + 1, FALSE, FALSE, NULL, 0);
    307307    free (vec[Nfields]->elements.Int);
    308308    free (vec[Nfields]);
  • trunk/Ohana/src/opihi/dvo/dvo_host_utils.c

    r38441 r39360  
    230230  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    231231  if (ResultFile) {
    232     int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, FALSE, NULL);
     232    int status = WriteVectorTableFITS (ResultFile, "RESULT", vec, Nvec, FALSE, FALSE, NULL, 0);
    233233    if (!status) {
    234234      gprint (GP_ERR, "failed to write result file %s\n", ResultFile);
  • trunk/Ohana/src/opihi/dvo/mextract.c

    r38986 r39360  
    321321  // write vectors to a table (this is used by parallel dvo operations, but can be used elsewhere)
    322322  if (RESULT_FILE && !SKIP_RESULTS) {
    323     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL);
     323    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nreturn, FALSE, FALSE, NULL, 0);
    324324    if (!status) goto escape;
    325325  }
  • trunk/Ohana/src/opihi/dvo/mmatch.c

    r38471 r39360  
    150150      // XXX this is now set for both cases...
    151151      CoordsFile = abspath("coords.fits", 1024);
    152       int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL);
     152      int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, FALSE, NULL, 0);
    153153      if (!status) goto escape;
    154154    }
     
    350350      vec[Nfields-1] = IDXvec;
    351351    }
    352     int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields, FALSE, FALSE, NULL);
     352    int status = WriteVectorTableFITS (RESULT_FILE, "RESULT", vec, Nfields, FALSE, FALSE, NULL, 0);
    353353    if (!status) goto escape;
    354354  }
  • trunk/Ohana/src/opihi/include/dvomath.h

    r39225 r39360  
    168168
    169169/* vector IO functions */
    170 int           WriteVectorTableFITS  PROTO((char *filename, char *extname, Vector **vec, int Nvec, int append, char *compress, char *format));
     170int           WriteVectorTableFITS  PROTO((char *filename, char *extname, Vector **vec, int Nvec, int append, char *compress, char *format, int Ntile));
    171171Vector      **ReadVectorTableFITS   PROTO((char *filename, char *extname, int *Nvec));
    172172
  • trunk/Ohana/src/opihi/lib.shell/VectorIO.c

    r38441 r39360  
    11# include "opihi.h"
     2void gfits_compress_timing ();
    23 
    34// write a set of vectors to a FITS FTable structure (vectors names become fits column names)
     
    103104
    104105// write a set of vectors to a FITS file (vectors names become fits column names)
    105 int WriteVectorTableFITS (char *filename, char *extname, Vector **vec, int Nvec, int append, char *compress, char *format) {
     106int WriteVectorTableFITS (char *filename, char *extname, Vector **vec, int Nvec, int append, char *compress, char *format, int Ntile) {
    106107 
    107108  Header rawheader;
     
    140141
    141142    dump_raw_table (&rawtable, "wd raw");
    142     if (!gfits_compress_table (&rawtable, &cmptable, 0, compress)) goto escape;
     143    if (!gfits_compress_table (&rawtable, &cmptable, Ntile, compress)) goto escape;
     144    gfits_compress_timing ();
    143145
    144146    int i, Nfields;
Note: See TracChangeset for help on using the changeset viewer.