Hi,

I have imported the following libraries to access the data sets from a HDF4 
file in Python 2.7

from pyhdf.SD import SD, SDC

hdf = SD(FILE_NAME, SDC.READ)
hdf.datasets()

While I don't have any issues in accessing the contents of the data sets, I am 
unable to access the metadata.

I have earlier accessed the metadata in MATLAB using the following commands:

metadata = hdfread(infile, '/metadata', 'Fields', 'Lidar_Data_Altitudes', 
'FirstRecord',1 ,'NumRecords',1)

alts = metadata{1}

What are the equivalent commands in Python for accessing the metadata fields 
from a HDF file in Python?

Thanks in advance
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to