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

Home » Public Forums » archive » Re: Multiple datasets
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: Multiple datasets [message #65527] Tue, 10 March 2009 19:28 Go to previous message
Andi Walther is currently offline  Andi Walther
Messages: 5
Registered: March 2009
Junior Member
I would create a function

FUNCTION get_my_data,file, h5_variable_name
file_ID = H5F_open(file)
dataset_ID = h5d_open(file_ID, h5_variable_name)
data_space = h5d_get_space(dataset_ID)
result_space = h5s_create_simple ([100,100,30])
;([x,y,z]) = result_space
vol_data=h5d_read(dataset_ID)
;vol_data=transpose(vol_data)
vol_data = TRANSPOSE(vol_data, [1, 0, 2])
vol_data = REVERSE(vol_data, 2)

h5s_close, result_space
h5s_close, data_space
h5d_close , dataset_ID
h5f_close, file_ID

return,vol_data

end


and then

IDL> dataset_name = 'CAPPI'+STRTRIM(indgen(number_of_datasets),1)
IDL > for i=0,number_of_datasets -1 do dummy = execute
('vol_data'+dataset_name[i] + '= get_my_data('+dataset_name[i]+')' )


In this way you will have your data stored in arrays
"vol_data_CAPPI0" , etc.
[Message index]
 
Read Message
Read Message
Previous Topic: Multiple datasets
Next Topic: Re: using irregularly spaced coordinates with ray-casting in iVolume

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

Current Time: Fri Oct 10 10:30:19 PDT 2025

Total time taken to generate the page: 0.87788 seconds