Re: WRITING HDF FILES [message #34187] |
Thu, 20 February 2003 20:19 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
MC (markchan@shaw.ca) writes:
> I am new to HDF.
>
> In c:\'file1.txt'
>
> 'file1' contains over 1.3 million lines of data. Each line containing one
> number.
>
> PRO write_my_hdf
> an_array=make_array([108,80,159],/float) ;big enough to hold all in
> 'file1'
> sd_id=HDF_SD_START('c:\file1.hdf',/CREATE)
> sds_id=HDF_SD_CREATE(sd_id,'my data',[108,80,159],/FLOAT)
> HDF_SD_ADDDATA, sds_id, an_array
> HDF_SD_ENDACCESS,sds_id
> HDF_SD_END,sd_id
> END
>
> The above was modified from an example in IDL.
>
> It came back with: "The array is not big enough".
"Not big enough", or "can't make an array that big"?
In any case, I don't see anything wrong with your
code. It runs fine on my machine and makes a lovely
HDF file with a huge volume filled with zeros. :-)
Cheers,
David
P.S. If the message, was "can't make an array that big",
then I suspect you don't have enough process or virtual
memory to work with 7 MBytes of data all at once. You will
have to get more. But we need more details to advice you
sensibly.
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|