Changeset 40291 for trunk/Ohana/src/opihi/lib.shell/VectorIO.c
- Timestamp:
- Dec 13, 2017, 10:53:48 AM (9 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/opihi/lib.shell/VectorIO.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
trunk/Ohana/src/opihi/lib.shell/VectorIO.c
r39457 r40291 41 41 for (j = 0; j < Nvec; j++) { 42 42 // if the format is not defined, just use the native byte-widths 43 tformat[2*j + 0] = (vec[j][0].type == OPIHI_FLT) ? 'D' : ' J';43 tformat[2*j + 0] = (vec[j][0].type == OPIHI_FLT) ? 'D' : 'K'; // this depends on opihi_int == int64_t for Int 44 44 tformat[2*j + 1] = 0; 45 45 } … … 60 60 for (j = 0; j < Nvec; j++) { 61 61 if (vec[j][0].type == OPIHI_FLT) { 62 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "double", vec[j][0].elements.Flt, vec[j][0].Nelements, nativeOrder);62 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "double", vec[j][0].elements.Flt, vec[j][0].Nelements, nativeOrder); 63 63 } else { 64 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "int", vec[j][0].elements.Int, vec[j][0].Nelements, nativeOrder); 64 // gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "int", vec[j][0].elements.Int, vec[j][0].Nelements, nativeOrder); 65 gfits_set_bintable_column_reformat (theader, ftable, vec[j][0].name, "int64_t", vec[j][0].elements.Int, vec[j][0].Nelements, nativeOrder); 65 66 } 66 67 } … … 328 329 ASSIGN_DATA(short, short, Int); 329 330 ASSIGN_DATA(int, int, Int); 330 ASSIGN_DATA(int64_t, int64_t, Flt); // int64_t has a problem: Int is too small, Flt is wrong precision 331 ASSIGN_DATA(int64_t, int64_t, Int); // XXX this works if opihi_int is assigned to int64_t 332 //ASSIGN_DATA(int64_t, int64_t, Flt); // int64_t has a problem: Int is too small, Flt is wrong precision 331 333 ASSIGN_DATA(float, float, Flt); 332 334 ASSIGN_DATA(double, double, Flt); … … 353 355 ASSIGN_DATA_TRANSPOSE(short, short, Int); 354 356 ASSIGN_DATA_TRANSPOSE(int, int, Int); 355 ASSIGN_DATA_TRANSPOSE(int64_t, int64_t, Flt); 357 ASSIGN_DATA_TRANSPOSE(int64_t, int64_t, Int); 358 //ASSIGN_DATA_TRANSPOSE(int64_t, int64_t, Flt); // see above comment 356 359 ASSIGN_DATA_TRANSPOSE(float, float, Flt); 357 360 ASSIGN_DATA_TRANSPOSE(double, double, Flt);
Note:
See TracChangeset
for help on using the changeset viewer.
