NOTE: The software in these directories uses IDL routines.  You must have a license to run their software.  The software in these directories is offered free of charge, but use at your own risk.  No guarantees are made about the software.  You get the point....


Be sure to check out the Johns Hopkins University Applied Physics Lab library of IDL routines.

To install these programs:
(1) copy the IDL code to a directory named idl.  (2) edit setidl so that IDL_PATH points to the idl directory that you just made.  (3) Before starting IDL, at your unix prompt, type   UNIX> source setidl  so that when you are in IDL, it will know where to look for the programs.
 


SAR and Interferometric SAR Programs:

The following programs are used with ESA's ERS 1 and ERS 2 baseline files and with their descw program.  The directions for running each program are listed at the beginning.  They are set up slightly different than the other IDL programs on this page.  Once you're in IDL, you'll have to type:  IDL> .run ../read_base  in order to run the read_base program (ditto for the others).

These programs will allow you to search the ERS baseline files for all possible baselines between orbital pairs for a given frame location.

(1) First run DESCW to figure out the frame and track numbers covering your study region, then ftp all of the baseline files to a directory.
(2) Now read the directions in read_base and run read_base.
(3) Next run date_base, also following the directions listed at the beginning of the program.
(4) Now you can run plot_base to get a plot of the dates versus all available baselines.  A postscript file is output from plot_base and it can be lpr'd to your local printer.
(5) Or you can run sort_base to get a quick screen printout.
 


Data Input Routines:  All of these programs work the same way; at the IDL prompt type;

                                            IDL>  data=read_single()

and read_single.pro will ask you for the input filename, width, length, starting and ending points, etc.  Also, you can swap the bytes from little to big (vice/versa) endian on the fly.  In summary:

Program Name                       Input File Format
read_single.pro                        a file of floats
read_2byte.pro                         a file of short integers (2 bytes long)
read_4byte.pro                         a file of integers
read_byte.pro                          a file of bytes
read_double.pro                        a file of complex numbers

Data Output Routine:  write_data.pro is a simple routine that writes out whatever data format is fed to it and it asks if you want to swap the data before writing to disk.

                                      IDL> write_data, data



 

Displaying Images:

(1)  plot_scale.pro    IDL> plot_scale, data    This will plot your data in a window that is the same width and length as the input data.  Use it for small arrays, say less than 1000 x 1000 in size.

(2)  plot_scale2.pro    IDL> plot_scale2, data   This will first rescale your array to a maximum width or length of 950 pixels and then plot the image in a scaled window that will fit on the computer screen.

(3)  plot_image.pro    IDL> plot_image, data   For large images, its sometimes useful to plot them at full size, but to have elevator bars that allow you to pan through the image in a window that fits on the screen.

(4)  profiler_doug.pro   IDL> profiler_doug, data   This is a really cool program.  It first scales your input data image so that it fits within a window scaled to fit on the screen (like plot_scale2.pro).  Then, it puts up two additional windows showing a plot of the column and row of data at the cursor's location.  The column and row plots use data from the original, unscaled image.  To quit, click on the right mouse button and the program will right out two text files containing the row and column data (files are named killme.col and killme.row).  These files can be imported to a microsoft excel spreadsheet, etc.

(5)  profile2.pro   IDL> profile2, data1, data2   This is the same as profiler_doug.pro, except that the cursor column and row positions are plotted for both arrays.

(6)  profile_pick.pro   IDL> profile_pick, data  This program allows you to display the image and then interactively pick a random path to display a plot of the image data along the path.  After selecting the points along the path, a plot window appears and a file, "killme.plot" is written to disk.

(7)  profile_pick2.pro   IDL> profile_pick2, data1, data2  This program is identicle to profile_pick, but this one allows you to pick and plot the same path from two images covering the same region.  Both profiles are written to the same text file, killme.plot.

(8)  profile_extract.pro profile_read.pro  and profile_write.pro    Use these three programs together.  Say that you have already run profile_pick and have written out a file, killme.plot, containing the x,y, and z values for the path.  Use profile_read to read the x and y positions:

                                  IDL> path=profile_read()
 

Then, use profile_extract to get the z data from a coregistered image that corresponds to the path:

                                  IDL> zdata=profile_extract(data,path)

Finally, use profile_write to write out a file of x,y, and z data (the program will prompt you for the output file name).

                                  IDL> profile_write, zdata, path


Miscellaneous:

(1)  flip_data.pro   IDL> flip_data, data   Program will prompt you for flipping top and bottom (NS) or right and left (EW).

(2)  zero_value.pro   IDL> zero_value, data   Program allows you to zero all values in data that are equal to a scalar.  The program will prompt you for the scalar value.

(3)  fit_surface.pro   IDL> surface=fit_surface(data)  Program fits a polynomial surface to all data points and returns the surface.  I recommend this only for small data arrays (say 500 x 500 and smaller) and low order fits.  The way to use this program is to first use read_single, but reading only every 10th data point from a 5000 x 5000 array.  Then, use fit_surface to find the long wavelength trend in the subsampled array.   Then, use rebin (IDL routine) to interpolate the surface and subtract it from the original 5000 x 5000 array.  That way you can do an easy trend surface removal.  Instead of this approach, I suggest you use my image processing C routines, poly_surface_fit and poly_surface.

(4)  stdev_despike.pro   IDL> stdev_despike, data   Although this program can take some time, it will despike your data.  In fact, instead of this program, I suggest you use my C program despike.c.  Both operate similarly; the IDL program will prompt you for the size of a small, local moving window to calculate the local statistics around a point.  If the point falls outside of the average + multiple of the standard deviation, then it is zeroed.

(5)  replace_value.pro   IDL> replace_value, data   After prompting you for the value that you want to replace, the program will find those values, then replace them with the local minimum around that point.