- Timestamp:
- Jun 4, 2015, 5:44:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/opihi/lib.shell/VectorIO.c
r38341 r38367 2 2 3 3 // write a set of vectors to a FITS FTable structure (vectors names become fits column names) 4 static int WriteVectorTable (FTable *ftable, char *extname, Vector **vec, int Nvec, char *format ) {4 static int WriteVectorTable (FTable *ftable, char *extname, Vector **vec, int Nvec, char *format, char nativeOrder) { 5 5 6 6 int j; … … 59 59 for (j = 0; j < Nvec; j++) { 60 60 if (vec[j][0].type == OPIHI_FLT) { 61 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "double", vec[j][0].elements.Flt, vec[j][0].Nelements );61 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "double", vec[j][0].elements.Flt, vec[j][0].Nelements, nativeOrder); 62 62 } else { 63 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "int", vec[j][0].elements.Int, vec[j][0].Nelements );63 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "int", vec[j][0].elements.Int, vec[j][0].Nelements, nativeOrder); 64 64 } 65 65 } … … 130 130 131 131 rawtable.header = &rawheader; 132 if (!WriteVectorTable (&rawtable, extname, vec, Nvec, format)) goto escape; 132 if (!WriteVectorTable (&rawtable, extname, vec, Nvec, format, (compress != NULL))) goto escape; 133 // NOTE : for compression, the table is constructed in native by order 133 134 134 135 FTable *outtable = &rawtable; … … 139 140 140 141 dump_raw_table (&rawtable, "wd raw"); 141 if (!gfits_compress_table (&rawtable, &cmptable, 10, compress)) goto escape; 142 if (!gfits_compress_table (&rawtable, &cmptable, 0, compress)) goto escape; 143 144 int i, Nfields; 145 if (!gfits_scan (&cmpheader, "TFIELDS", "%d", 1, &Nfields)) goto escape; 146 for (i = 0; i < Nfields; i++) { 147 gfits_byteswap_varlength_column (&cmptable, i+1); 148 } 142 149 dump_cmp_table (&cmptable, "wd cmp"); 143 150
Note:
See TracChangeset
for help on using the changeset viewer.
