Re: IDL [message #75532 is a reply to message #296] |
Mon, 21 March 2011 06:50   |
Ammar Yusuf
Messages: 36 Registered: October 2010
|
Member |
|
|
On Mar 20, 10:55 am, BigDaveII <davidharri...@yahoo.com> wrote:
> Hello all
>
> So I have made some progress but I am stuck again being new to IDL
>
> So I got it to display a color image using the following code
>
> data = read_binary('avhrr_pf.ndvi.1nmegl.8207.bin', data_type = 4,
> data_dims = [360, 180], endian = 'big')
> device, decomposed = 0
> xloadct
> window, 0, xsize = 360, ysize = 180
> !order=1
> tv, data
>
> However, I was trying to create a procedure so that I can just call it
> up.
>
> I keep getting this error
>
> File does not exist: 'homework1a.pro'.
> pro Homework1a,
> ^
> % Syntax error.
> At: F:\GMUMAY2010\GGS754EarthScienceandAdvanceDataAnalysis\Homew ork
> \Homework1\Data\NDVI\HW1\Homework1a, Line 1
> % 1 Compilation error(s) in module $MAIN$.
> IDL> tv, data
>
> What am I doing wrong?
>
> How do I calculate which pixels correspond to the particular latitude
> and longitude values that defines a subset, and then use IDL's array
> subscripting to put that subset into a new variable?
>
> How do I set up a loop to go through all of my NDVI images, extract
> the appropriate subset, then display each subset?
>
> I have taken some general notes
>
> Define a 3D data array data(360, 180, 24)
> for k=1,24
> forming the file name for each k
> read one file into an 2D array, say a
> data(*,*,k) = a
> end loop k
>
> determine the indices for the given lat/lon, say ig, jg
> pick the values for that location and form a time series vector
> ts = data(ig, jg, *)
>
> display the time series, ts
Hi, your first error is this right?
File does not exist: 'homework1a.pro'.
pro Homework1a,
The reason you are getting that is because the procedure name and the
file name are case sensitive and have to be the same. Try doing that
and see if works.
|
|
|