%
%   This example illustrates SAR interferometry.
%   First look at the phase of the reference image.  It will look
%   like random noise.  Then look at the phase of the repeat image.
%   It will also look like noise.   Finally examine the phase difference.  
%   This will show interferometric fringes across the image related
%   to the curvature if the Earth.
%
%
%   load the data files. only keep the first 800 rows
%   this is an ERS-1 to ERS-2 Tandem pair from the
%   Salton Sea,  perpendicular baseline 58 m.
%
e1=fread(fopen('22388_2925.SLC'),[5488,800],'*short','b')';
e2=fread(fopen('02715_2925.SLC'),[5488,800],'*short','b')';
%
%  Problem 1.  Make the best looking amplitude image that you can
%              using both images 1 and 2.  This could involve low-pass
%              filtering and perhaps averaging the two images. I can't
%              provide a formula for doing this but note that the pixels
%              are 16 m in the range direction and only 4 m in the azimuth
%              direction (top-to-bottom) so the filter should be taller than it
%              is wide by about 4 times.  Remember these are complex numbers
%              so would one construct amplitude then filter or filter the real
%              and imaginary parts and then make amplitude?  When and how should
%              the images be averaged?
%
%  Problem 2.  Make the interferogram and filter it to make the best looking
%              phase map.  Should one filter before or after interferogram
%              formation? Should one filter the real and imaginary components
%              or filter the phase?
%
%  Problem 3.  Do the best that you can to remove the phase ramp across the image.
%              How do you estimate the phase ramp and what is the best way to remove it?
%
%  Problem 4.  Can you unwrap the phase using Matlab? 
%
%  Since this exercise is optional I will not offer much assistance although
%  you could contact one of the graduate students for help. Davis Thomsen
%  should know how to do this.
%
%  This assignment is due June 10 and you can attempt one or all of the
%  problems for extra credit.
%              
