I am fairly new to Igor Pro and I am trying to use it to analyze big batch of data files.
My data is wrapped in HDF5-like files with systematic naming. So I would like to write a procedure which would allow me to analyze it without opening the files one by one. I am using the HDF5 package recommended by wavemetrics.
I've spent quite some time reading the doc, and its examples but I can't find a way to open a file without being prompt with a browser to select the file I would like.
So far, here is what I have :
Function openDataNXS(filename)
String filename
Variable fileID
string data_name = "data_"+filename
string actu_name = "actu_"+filename
HDF5OpenFile /R fileID as "./"+filename
if (V_flag == 0) // checks file opening
HDF5LoadData /O/N=$data_name fileID, "/scan/scan_data/data_03"// dataset address in the file
HDF5LoadData /O/N=$actu_name fileID, "/scan/scan_data/actuator_1_1"
HDF5CloseFile fileID
display $data_name vs $actu_name
endif
End
Although I provide the function with a filename, I am still prompted with a Browser. Any Idea why?
Thanks
You have to provide an absolute path to HDF5OpenFile
. Either via HDf5OpenFile/PATH=someSymbolicPath fileID as filename
or with filename being an absolute path. If your ./
implies that you mean the location of the experiment try HDf5OpenFile/PATH=home fileID as filename
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.