Question about using h5dump to ASCII

Hello all!

I'm using h5dump to convert hdf dataset to ASCII file as:

h5dump -d /dataset -o dataset.txt -y testfile.hdf

But output is different from what i get using "Export Data to File" command
from HDFView.

My question is: what parameters should i useng in h5dump to get output
exactly as in "Export Data to File" command ?

Thanks!

···

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/Question-about-using-h5dump-to-ASCII-tp1348652p1348652.html
Sent from the hdf-forum mailing list archive at Nabble.com.

HDFView exports data to text according to what is displayed in the table, i.e.
a row of numbers will be printed out in a single line in the text file. You can
also set the delimiter at Tools-->User Options. Also, HDFView can only print
up to 2D a time since the table view can only show 2D (row x column) a time.

h5dump prints out the whole dataset. Each line wraps according to certain
number of characters in a line. You can use "-w" option to set the number
of columns.

      -w N, --width=N Set the number of columns of output. A value of 0 (zero)
                           sets the number of columns to the maximum (65535).
                           Default width is 80 columns.

For 2D dataset, if you set "N" large enough, e.g. 3000, the output should
be close to hdfivew output.

e.g.

h5dump -w 3000 -d /dataset -o dataset.txt -y testfile.hdf

Thanks
--pc

···

On 8/26/2010 4:33 AM, onpr wrote:

Hello all!

I'm using h5dump to convert hdf dataset to ASCII file as:

h5dump -d /dataset -o dataset.txt -y testfile.hdf

But output is different from what i get using "Export Data to File" command
from HDFView.

My question is: what parameters should i useng in h5dump to get output
exactly as in "Export Data to File" command ?

Thanks!

Hello all!

I'm using h5dump to convert hdf dataset to ASCII file as:

h5dump -d /dataset -o dataset.txt -y testfile.hdf

But output is different from what i get using "Export Data to File" command
from HDFView.

What is the "real" problem you want to solve? A number of my colleagues
need to extract data from hdf files for use in other programs that can import
ASCII. They often want a command line (batch) tool to generates files that
can easily be imported with a minimum of manual editing.

There are a number of "matrix" languages that support hdf5 and provide
flexible format controls for writing ASCII files: python, R/S+ (stats
language),
gnudatalanguage/IDL, octave/Matlab.

My question is: what parameters should i useng in h5dump to get output
exactly as in "Export Data to File" command ?

Is that really the ideal format for your task?

···

On Thu, Aug 26, 2010 at 6:33 AM, onpr <anklavonpr@gmail.com> wrote:

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

Thank you Peter, using parameter -w really help.

One more question:

Is h5dump have parameter to set column delimeter?

Peter Cao wrote:

···

h5dump prints out the whole dataset. Each line wraps according to certain
number of characters in a line. You can use "-w" option to set the number
of columns.

      -w N, --width=N Set the number of columns of output. A value
of 0 (zero)
                           sets the number of columns to the maximum
(65535).
                           Default width is 80 columns.

For 2D dataset, if you set "N" large enough, e.g. 3000, the output should
be close to hdfivew output.

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/Question-about-using-h5dump-to-ASCII-tp1348652p1367988.html
Sent from the hdf-forum mailing list archive at Nabble.com.

I already have an program which works with hdf data in ascii format, and it
is configured for hdfview output. I just want automate exporting task with
h5dump, so formatting provided with "Export Data to File" ideal for me.

George N. White III wrote:

···

My question is: what parameters should i useng in h5dump to get output
exactly as in "Export Data to File" command ?

Is that really the ideal format for your task?

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/Question-about-using-h5dump-to-ASCII-tp1348652p1370531.html
Sent from the hdf-forum mailing list archive at Nabble.com.

h5dump does not have options for column delimiters.

···

On 8/27/2010 4:42 AM, onpr wrote:

Thank you Peter, using parameter -w really help.

One more question:

Is h5dump have parameter to set column delimeter?

Peter Cao wrote:

h5dump prints out the whole dataset. Each line wraps according to certain
number of characters in a line. You can use "-w" option to set the number
of columns.

       -w N, --width=N Set the number of columns of output. A value
of 0 (zero)
                            sets the number of columns to the maximum
(65535).
                            Default width is 80 columns.

For 2D dataset, if you set "N" large enough, e.g. 3000, the output should
be close to hdfivew output.