HDF5 Issues When Trying to Open and load it through the program
coltblaze
I was planning to open an HDF5 File which had two groups and load there data whatever format they are available.
I want to use it to automate the task of the HDF5 Browser. But I am Facing the basic HDF5LoadGroup, HDF5LoadData Problems.
From experience I can say that these operations do work ;)
Could you elaborate or show what you tried already? If you are just starting with Igor it is a good idea to take the guided tour.
August 2, 2018 at 02:56 pm - Permalink
In reply to From experience I can say… by thomas_braun
this is what I had done.
August 3, 2018 at 12:38 am - Permalink
In reply to thomas_braun wrote: From… by coltblaze
That is a good start already. I've fixed the HDF5OpenGroup call and now have
Print"Successfully called GraphCoordination Function"
Variable FileID
HDF5OpenFile /I/Z FileID as ""
String Q,File_Path
Q= S_fileName
File_Path= S_Path
Print Q
Print File_Path
String fileLocation
fileLocation=File_Path
if(V_Flag==0)
Print "The File is successfully Loaded."
else
printf "Error %d on file load\r", v_flag
return NaN
Endif
HDF5ListGroup /F/R/Type=1/Z FileID,"/"
Print V_Flag
String GroupList
GroupList= S_HDF5ListGroup
variable groupID
HDF5OpenGroup /Z FileID, "/", groupID
print V_Flag
End
so now you just need to add a HDF5LoadData call.
August 3, 2018 at 01:41 am - Permalink
In reply to That is a good start already… by thomas_braun
Thank You Sir. I will notify you if my HDF5LoadData does not work thanks.
August 3, 2018 at 01:48 am - Permalink
sir my LoadData is also not working
this is what I had written next in the above code.
August 3, 2018 at 07:06 am - Permalink
or do i need to set up DFREF and call NewdataFolder than HDF5 Load Data call
August 4, 2018 at 12:45 am - Permalink
In reply to That is a good start already… by thomas_braun
now loaddata is giving me issues
itshows V_Flag=1007
August 6, 2018 at 01:41 am - Permalink
Dear Chozo,
This is what I have the intention to do:
I have an HDF5 File named:
"25eV_FS_0000.h5"
I want to write a program from where I can open this File. then load its data in the form of table and image as shown in the images:https://drive.google.com/open?id=1M1VlESdfzOLg7tkX5XF5NYUnWOpBGIj_ then write the procedures to develop the fermi-level.
thank you
Pankaj Nagil
August 8, 2018 at 12:20 am - Permalink
I do not know why you are addressing me directly in this post where I have not commented, but OK. I am not sure you realize what for a huge standard HDF5 is. It's almost it's own file system. Nobody can guess your specific file contents, arrangement in groups or data types. At least now you have linked a screenshot of the HDF browser, so we now know a bit what we are talking about.
You are appending all kinds of optional flags to the HDF5LoadData command, which are probably not really relevant to your problem (but may not cause an error either). Have you read the documentation for HDF5LoadData? I assume just passing S_HDF5ListGroup is the culprit here, since you seem to have 2 groups and a string list is not in the right format anyway to be passed as the name string for the group to load (even if only for the semicolon at the end). You need to pass the correct name of the group you want to load here. What is the content of S_HDF5ListGroup list at the time of calling?
Here is a copy of the relevant part of the documentation for HDF5LoadData:
I guess your command needs to be more along the lines of (already some time has passed since I last used this stuff so I might be off):
HDF5LoadData GroupID, "Image Data"
Another problem could be that your HDF5OpenGroup command is already off. You could also try yourself to alternatively use HDF5LoadGroup instead of HDF5OpenGroup+HDF5LoadData. I hope that helps a bit.
P.S.: I mean no offense, but please, please try to describe precisely what you want to achieve (not "I want to load data", but "I want to load content X of file type Y, the data is arranged in the following format Z, and I want to get this part of it with the command ABC...") and where something is not working, what you have tried and what exact errors you get for your particular Igor version and operating system (which?). Otherwise you cannot expect anybody to be able to help you quickly and accurately.
August 8, 2018 at 08:02 pm - Permalink
I would also like to add that it is not reasonable to expect that we have all read other threads you have posted. If we have read them, we don't necessarily connect them together. If you feel that another thread is relevant to the present topic, you should provide at least a link to the other thread. We are not magical, we cannot read minds :)
August 9, 2018 at 09:07 am - Permalink