Thread Subject: SAR polar formatting: using griddata

Subject: SAR polar formatting: using griddata

From: Joe McGlinchy

Date: 19 Jan, 2009 23:46:02

Message: 1 of 3

Hi everyone,

I am trying to polar format a phase history data set down to a rectangular grid to form an image. The data set is complex valued, but I have read that shouldn't matter using griddata. The data set is an 1800x1999 array. I have attempted to compute the location of each sample in the frequency domain in polar coordinates, convert that to rectangular, and use griddata from there. I am getting errors for OUT OF MEMORY, and errors using qhullmx as well. here is my code as of now

%number of samples per pulse, 1800. 1999 pulses
rf = Beff*(double((0.0:1.0:nsamps-1))-nsamps/2)/nsamps + Bc;
thetaf = dtheta*double((0.0:1.0:npulses-1))/npulses+theta_1;

[thetaF,rF] = meshgrid(thetaf,rf);

[X,Y] = pol2cart(thetaF,rF);

XI = (0:10:1800);
YI = (0:10:1999)';
Z = phase_vector;
ZI = griddata(X,Y,Z,XI,YI,'nearest');

is there a problem with the arguments X,Y in griddata being matrices instead of row and column vectors? the help file in matlab is not too helpful in describing the format the arguments need to be in.

Any help would be appreciated, thanks!

Joe

Subject: SAR polar formatting: using griddata

From: Sadik

Date: 20 Jan, 2009 00:25:04

Message: 2 of 3

"Joe McGlinchy" <jxm8863@rit.edu> wrote in message <gl33bq$hi4$1@fred.mathworks.com>...
> Hi everyone,
>
> I am trying to polar format a phase history data set down to a rectangular grid to form an image. The data set is complex valued, but I have read that shouldn't matter using griddata. The data set is an 1800x1999 array. I have attempted to compute the location of each sample in the frequency domain in polar coordinates, convert that to rectangular, and use griddata from there. I am getting errors for OUT OF MEMORY, and errors using qhullmx as well. here is my code as of now
>
> %number of samples per pulse, 1800. 1999 pulses
> rf = Beff*(double((0.0:1.0:nsamps-1))-nsamps/2)/nsamps + Bc;
> thetaf = dtheta*double((0.0:1.0:npulses-1))/npulses+theta_1;
>
> [thetaF,rF] = meshgrid(thetaf,rf);
>
> [X,Y] = pol2cart(thetaF,rF);
>
> XI = (0:10:1800);
> YI = (0:10:1999)';
> Z = phase_vector;
> ZI = griddata(X,Y,Z,XI,YI,'nearest');
>
> is there a problem with the arguments X,Y in griddata being matrices instead of row and column vectors? the help file in matlab is not too helpful in describing the format the arguments need to be in.
>
> Any help would be appreciated, thanks!
>
> Joe

Hello Joe,

help griddata says:

ZI = GRIDDATA(X,Y,Z,XI,YI) fits a surface of the form Z = F(X,Y) to the
    data in the (usually) nonuniformly-spaced vectors (X,Y,Z). GRIDDATA
    interpolates this surface at the points specified by (XI,YI) to produce
    ZI. The surface always goes through the data points. XI and YI are
    usually a uniform grid (as produced by MESHGRID) and is where GRIDDATA
    gets its name.
 
    XI can be a row vector, in which case it specifies a matrix with
    constant columns. Similarly, YI can be a column vector and it specifies
    a matrix with constant rows.

So, from here, my understanding is that X, Y and Z should be vectors, and XI, YI defined in your code looks fine.

1800*1999 is maybe too large to fit on a figure, but I cannot say for sure. It depressed my laptop, too. :))

Subject: SAR polar formatting: using griddata

From: Joe McGlinchy

Date: 20 Jan, 2009 00:35:05

Message: 3 of 3

thanks for the response. 1800x1999 isn't too big, at least using imshow. I forgot to mention I will be using ifftshift(ifft2(ZI,2048,2048)) to compute the inverse fourier transform of ZI (as soon as it works) and display the image with imshow

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
griddata Joe McGlinchy 19 Jan, 2009 18:50:04
meshgrid Joe McGlinchy 19 Jan, 2009 18:50:04
delaunay Joe McGlinchy 19 Jan, 2009 18:50:04
qhullmx Joe McGlinchy 19 Jan, 2009 18:50:04
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com