addpath ../../sharedFiles
jetMap=jet(256);
invertedJet=jetMap(end:-1:1,:); %Colorscale

pd=dir('polarFormat/*.mat')

for i=1:length(pd)
%for i=[8 10] %1:length(pd)
    load(['polarFormat/' pd(i).name])
    [dMx,rMx]=meshgrid(pmi.dArray, pmi.rArray);
    figure(i); clf; colormap(invertedJet)
    pcolorPolarCenteredLatLon(dMx, rMx, pmi.bthPolar, pmi.imgCenterLat, pmi.imgCenterLon); colorbar
    caxis([160 280])
end

lonArray=[]; latArray=[];
dd=dir('data/*.mat')
for i=1:length(pd)
%for i=[8 10] %1:length(pd)
    load(['data/' dd(i).name])
    disp([datestr(mi.tcTime) '  ' mi.sensorType]);
    if isempty(mi.imgCenterLon)
        lonArray=[lonArray mi.estCenterLon];
        latArray=[latArray mi.estCenterLat];
    else
        lonArray=[lonArray mi.imgCenterLon];
        latArray=[latArray mi.imgCenterLat];
    end 
    figure(i); clf; colormap(invertedJet)
    pcolorCentered(mi.lonMx,mi.latMx,mi.bthMx); hold on; colorbar
    plot(mi.estCenterLon,mi.estCenterLat,'m+'); hold on;
    caxis([160 280])
end

figure(100); clf;
plot(lonArray,latArray,'b-.');
for i=1:length(pd)
    text(lonArray(i),latArray(i),[' ' num2str(i)]);
end
