comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Store large array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Store large array [message #69120] Mon, 14 December 2009 07:22
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<289fd11a-ac85-42d4-9fcc-e04826ffcc79@y24g2000yqb.googlegroups.com>,
Alexander Sousa <antinacos@gmail.com> wrote:

> I've been trying for hours to store a large array (about 8640 x 6240
> pixels) generated by chunks in an HDF or TIFF file, but neither of
> them is working because the data is too big to be stored in a single
> array, i can't save chunks to the tiff file and when trying to store
> them in the hdf file using START and COUNT i get an error saying
> something like "The dataset is not that big", even though i declared
> it precisely 8640 x 6240, i've even declared it bigger, but i won't
> get a positive result... i stored the data in a JPEG2000 but it's
> floating point data and it was stored as int... besides, i was told
> "Don't use jpeg2000"... so i'm screwed right now... i request help
> from your almighty forum wisdom please, any good advise will be
> appreciated.
>
> Thank you in advance, Alexander

As floating point data this array is only about 215 MB, which is not
that large. I don't know about TIFF, and don't care for HDF, but to
create a netCDF file do this:

myarray = FLTARR(8640, 6240)
id = NCDF_CREATE('filename.nc')
xid = NCDF_DIMDEF(id, 'x', 8640)
yid = NCDF_DIMDEF(id, 'y', 6240)
vid = NCDF_VARDEF(id, 'myarray', [xid, yid], /FLOAT)
NCDF_CONTROL, id, /ENDEF
NCDF_VARPUT, id, 'myarray', myarray
NCDF_CLOSE, id

to read the data

id = NCDF_OPEN('filename.nc')
NCDF_VARGET, id, 'myarray', myarray
NCDF_CLOSE, id


Ken Bowman
[Message index]
 
Read Message
Previous Topic: Store large array
Next Topic: crap

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:51:16 PDT 2025

Total time taken to generate the page: 0.00470 seconds