Re: Read values from a table with IDL - narrowed-down question [message #54058 is a reply to message #54050] |
Thu, 17 May 2007 08:50  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On May 17, 4:13 am, DirtyHarry <kim20...@gmail.com> wrote:
> I posted a message few days ago and have been waiting any suggestions,
> but no one reply. (I am really sad and feel left out.. T.T) I think my
> question was too broad and vague. Therefore, I narrowed down the
> question.
>
> What I really would like to do now is just to read values of the table
> shown below.
>
> Skyl_lut.dat00.dat
>
> Aerosol_type: Continental
> MODIS_Band_1: (0.620,0.670)
> S&O 0.00 0.02 0.04
> ------------------
> 0 0.027 0.040 0.053
> 1 0.028 0.041 0.054
> 2 0.029 0.042 0.055
>
> There are 9 target values in this table. Others are just kind of input
> variables to get those values.
>
> For example, in order to read 0.055 in the table, required input
> variables are...
>
> aerosol_type = continental
> MODIS band = 1
> Optical depth = 0.04
> solar zenith angle = 2
>
> If it is possible, I want to do make a function with 4 input
> variables, and then the output of this function should be a value in
> this table.
>
> Sorry for bothering you, but please give me any suggestions. Thanks in
> advance.
>
> Harry
Depending on how flexible you want it to be, you should be able to
build something using something like:
line=''
while not eof(lun) do begin
readf, lun, line
linesep = strsplit(line,/extract)
;; compare various linesep[] values with the given arguments
endwhile
|
|
|