0001 function beammap(d, elStepSizeDeg)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 if(nargin>1)
0012 end
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 [d_noise d_nonoise indNoise] = cutNoise(d);
0029
0030
0031
0032 d_dip = framecut(d_nonoise, bitsearch(d_nonoise.array.frame.features, 5, 'any'));
0033
0034
0035 indSrc = bitsearch(d_nonoise.array.frame.features, 9, 'any');
0036
0037 indSrc = interp1(d_nonoise.array.frame.utc, indSrc, d_nonoise.antenna0.receiver.utc, 'nearest');
0038 indSrc(isnan(indSrc)) = 0;
0039 indSrc = logical(indSrc);
0040
0041 d_src = framecut(d_nonoise, indSrc);
0042
0043 [a, b, dataMap, dataRms, azGrid, elGrid] = sourceScanMap(d_src, elStepSizeDeg, 0);
0044
0045
0046 figure(1)
0047 setwinsize(gcf, 575, 750);
0048 subplot(2,1,1)
0049 imagesc(azGrid, elGrid, -dataMap(:,:,1));
0050 colorbar('horizontal');
0051 xlabel('az offset');
0052 ylabel('el offset');
0053 title('Total Intensity 1');
0054
0055 subplot(2,1,2)
0056 imagesc(azGrid, elGrid, -dataMap(:,:,6));
0057 colorbar('horizontal');
0058 xlabel('az offset');
0059 ylabel('el offset');
0060 title('Total Intensity 2');
0061 eval(sprintf('gtitle(''Raw Counts from Backend on %s'');', d_src.antenna0.tracker.source{1}));
0062
0063
0064 figure(2)
0065 setwinsize(gcf, 575, 750);
0066 subplot(2,1,1)
0067 a = dataMap(:,:,1)./min(min(dataMap(:,:,1)));
0068 imagesc(azGrid, elGrid, log10(a), [-0.5 0]);
0069 colorbar('horizontal');
0070 xlabel('az offset');
0071 ylabel('el offset');
0072 title('Total Intensity 1 (log plot)');
0073
0074 subplot(2,1,2)
0075 a = dataMap(:,:,6)./min(min(dataMap(:,:,6)));
0076 imagesc(azGrid, elGrid, log10(a));
0077 colorbar('horizontal');
0078 xlabel('az offset');
0079 ylabel('el offset');
0080 title('Total Intensity 2 (log plot)');
0081 eval(sprintf('gtitle(''Raw Counts from Backend on %s (log plot)'');', d_src.antenna0.tracker.source{1}));
0082
0083
0084 keyboard;
0085
0086
0087 [x1 y1] = find(-dataMap(:,:,1)==max(max(-dataMap(:,:,1))));
0088 [x6 y6] = find(-dataMap(:,:,6)==max(max(-dataMap(:,:,6))));
0089
0090
0091 midAz = median(x6);
0092 midEl = median(y6);
0093
0094 azGrid2 = min(azGrid):0.05:max(azGrid);
0095 elGrid2 = min(elGrid):0.05:max(elGrid);
0096 d2 = interp2(azGrid', elGrid, -squeeze(dataMap(:,:,6))', azGrid2', elGrid2);
0097
0098 [x y] = find(d2==max(d2(:)));
0099
0100
0101 elScanThroughMid = squeeze(d2(:,y));
0102 plot(elGrid2, elScanThroughMid);
0103 xlabel('Elevation angle');
0104 ylabel('Backend units');
0105
0106
0107
0108 return;
0109
0110