Help Working with HDF Files [message #43369] |
Thu, 07 April 2005 12:10 |
vinit
Messages: 7 Registered: March 2005
|
Junior Member |
|
|
April 7, 2005
Hello,
First off, I'd like to say that I am a real newbie to IDL and this is
the first time that I've heard of the HDF file format. I have bought
Dr. Fanning's excellent book and am aware that there is a chapter on
working with HDF files. I would be grateful if someone could help me
figure out what it is I must do to achieve my goals.
My first goal is to simply read an HDF file (which was given to me by
my lab partner - I am a programmer, not a scientist)that contains
rainfall precipitation data as an image and display it using IDL
(essentially get the same image as when I open it with ENVI).
I have tried running the code found in the "coyote" folder called
"hdfread" but the program halts in the middle and gives the following
error message:
% Compiled module: TEST_ISHDF.
% Compiled module: HDFREAD.
IDL> hdfread
% Compiled module: PICKFILE.
% Loaded DLM: HDF.
Valid HDF file. Opening "E:\IDL_Programs\trmm_data\3B42.991231.6.6.HDF"
Reading number of datasets and file attributes in file ...
No. of Datasets: 2
No. of File Attributes: 2
No. of Palettes: 0
Printing name of each file attribute...
File Attribute No. 0: CoreMetadata.0
File Attribute No. 1: ArchiveMetadata.0
Printing name of each data set and its associated data attributes...
Dataset No. 0: precipitation
Dataset No. 1: relativeError
% HDF_SD_SELECT: Unable to select the HDF-SD dataset (NEWFILEID).
% Execution halted at: HDFREAD 60
E:\IDL_Programs\coyote\hdfread.pro
% $MAIN$
I believe that my data doesn't have the HDF_SD dataset. How to work
around this?
I would then like to "process" the data. More explicitly, I'd like to
divide the picture into n x n pixel regions, extract the value of each
pixel, compute the average value of that region and compare it to a
threshold value. If the average value is less than the threshold value
I want to assign the whole n x n pixel region (i.e each pixel in that
region) a value of -99 else I want to assign the whole region the
computed average value. I'm not sure how to go about doing that, but
perhaps I am getting ahead of myself.
Thank you for your time and help,
Vinit
|
|
|