cdftrans −− translate a Candis file from one format to another
cdftrans −[f|i|a] [-s]
Cdftrans expects a Candis file on the standard input in any of the Candis formats, ascii, int, or float. The output is the equivalent Candis file translated into the format specified by the command line flag: f = float, i = int, and a = ascii. Pixel fields are not changed by translation to int format. The ascii representation of a pixel field is a series of 8 bit bytes in hexidecimal form. This makes pixel fields with pixels of 8 bits or less immune to byte ordering problems when transferring between machines with different byte orders. Longer pixels will have bytes swapped, even in ascii form. (This problem could be fixed if necessary.) If the -s flag is set, bytes are swapped in shorts, longs, and floats when translating out of int or float format. Pixel fields are not affected by this option.
On some systems, translating a float file to ascii that contains IEEE "NaN" (not a number) values results in element values specified as "NaN". Retranslation into float fails with an error message in this case.