% momentum-space plot of an "inner" packet...

function [] = plot_inner_dataset(num)
global idata pdata

odata=pdata;

cd /var/tmp

eval (sprintf('load packet%d_r', num));
eval (sprintf('load packet%d_i', num));
pdata=fftshift(fft2(eval( sprintf('(packet%d_r + 1i*packet%d_i)', num,num))'));
eval (sprintf('clear packet%d_r packet%d_i', num, num));

sz = size(pdata);
ii = (sz(1)/2);
jj = (sz(2)/2);

% figure(1);
mesh([-ii:(ii-1)],[-jj:(jj-1)],abs(pdata),angle(pdata));
set(gca,'XLim',[-ii ii],'YLim',[-jj jj],  ...
        'XTick',[-ii -ii/2 0 ii/2 ii],'YTick',[-jj -jj/2 0 jj/2 jj]);
%set(gca,'Visible','off');
title(sprintf('probability density after %d segments (p-sp)', num));
