bl3ddemo.m
来自「beamlet变化的工具箱」· M 代码 · 共 409 行 · 第 1/2 页
M
409 行
function PlotAllFigures
%********************************************************
global LastFigureNo
global StopPlot
global IfNewWindow
for i=1:LastFigureNo,
if StopPlot == 1,
break;
end
h=findobj(gcf,'tag','edit1');
set(h,'Value',i);
PlotFigure;
pause(3);
%DeleteNonDemoFigures
end
%********************************************************
function WriteCaptions(edit1)
%********************************************************
global MakeFigureFilePrefix
global NRfigures
global CRfigures
global UnderConstructionFigures
captions='';
if 0,
switch edit1
case 1
captions = 'A simulated large-scale galaxy distribution, courtesy of Anatoly Klypin';
case 2
captions = 'The vertices associated with the data cube are the voxel corners on the surface; a digital line indicated in red, with endpoints at vertices indicated in green';
case 3
captions = 'Dyadic cubes';
case 4
captions = 'Vertices of vertex-pairs system are voxel corners on the faces of dyadic cubes';
case 5
captions = 'Examples of Beamlets at two different scales (a) scale 1 (next finer scale) (b) scale 0 (coarsest scale)';
case 6
captions = 'Dividing planes of a cube';
case 7
captions = 'Decomposition of several beamlets into continuum beamlets at next finer scale, indicating cases which can occur';
case 8
captions = '2D Slant Stack Lines. These images show the weights involved in calculations of various slant stack coefficients';
case 9
captions = 'Planes generates by families of lines in the Slope-Angle dictionary; subpanels indicate various choices of slope';
case 10
captions = 'Lines selected from Planes via Slope-Intercept indexing';
case 11
captions = 'Shearing and slicing a 3D image. Extracting horizontal slices of a sheared 3D image is the same as extracting slanted slices of the original image';
case 12
captions = 'The Pseudopolar Grid for n = 8. Cartesian data with n = 8 are converted into data at the intersections of concentric squares and lines through the origin';
case 13
captions = 'Selecting planes through the origin.';
case 14
captions = 'Timing comparison';
case 15
captions = 'Representatives of several X-ray coefficients';
case 16
captions = 'X-ray Back-projections of various rectangles in coefficient space.';
case 17
captions = 'X-ray analysis of a beam';
case 18
captions = 'A noiseless helix';
case 19
captions = 'Three orthogonal slices through (a) a noiseless helix (b) the noisy data volume';
case 20
captions = 'A noiseless helix, a reconstruction from noisy data obtained by backprojecting coefficients exceeding threshold and a depiction of the beamlets associated to significant coefficients';
end
text2 = findobj(gcf,'tag','text2');
set(text2,'string', captions);
end
if edit1 < 10,
s=strcat('0', num2str(edit1));
else
s=num2str(edit1);
end
text3 = findobj(gcf,'tag','text3');
switch edit1,
case UnderConstructionFigures
set(text3,'string', ['This figure is still under construction']);
case NRfigures
set(text3,'string', ['This figure is produced by', ' ', strcat(MakeFigureFilePrefix, num2str(edit1)),'.m',' ','(NR)']);
case CRfigures
set(text3,'string', ['This figure is produced by', ' ', strcat(MakeFigureFilePrefix, num2str(edit1)),'.m',' ','(CR)']);
otherwise
set(text3,'string', ['This figure is produced by', ' ', strcat(MakeFigureFilePrefix, s),'.m', ' ', '(R)']);
end
%********************************************************
function AdjustSubplots
%********************************************************
global plotOffset
% set(gcf,'Visible', 'off');
MagnificationFactor = 0.92;
right = 0.78;
c = get(gcf,'Children');
[m1,n1]=size(c);
m=m1-plotOffset;
p = zeros(m, 4);
for i=m:-1:1,
%get all suplots' positions
p(i,:) = get(c(i),'position');
end
% contract all subplots
p = p * MagnificationFactor;
col=sum(unique(p(:,1))<1);
LegNo = length(findobj(gcf,'tag','legend'));
if ~isempty(LegNo)
col = col- LegNo;
end
diff = length(unique(p(:,1))) - col;
if col > 0,
row = m/col;
end
cond1 = isempty(LegNo);
hshift = .05;
%simpliy do a horizontal shift for children that is not "camera" menu nor legend
for i=m:-1:1
if p(i,1)<1,
cond2 = and(~cond1, ~strcmp(get(c(i),'tag'), 'legend'));
if or(cond1, cond2),
width = p(i,3);
%hshift = (right - col * width) / (col+1);
p(i,1) = p(i,1) - hshift;
set(c(i), 'position', p(i,:));
end
end
end
%********************************************************
function DeleteSubplots
%********************************************************
global plotOffset
c = get(gcf,'Children');
[m1,n1]=size(c);
m=m1-plotOffset;
for i=1:m,
delete(c(i));
end
%********************************************************
function DeleteNonDemoFigures
%********************************************************
h=findobj(0,'Type','figure');
[m,n]=size(h);
for i=1:m,
if h(i)~=1
close(h(i));
end
end
%********************************************************
function CloseDemoFigures
%********************************************************
global PaperName;
h=findobj(0,'Name', PaperName);
[m,n]=size(h);
for i=1:m,
close(h(i))
end
%********************************************************
function ClearGlobalVariables
%********************************************************
global plotOffset
global LastFigureNo
global PaperName
global MakeFigureFilePrefix
global IfNewWindow
global IfAddTitle
global IfLoadData
global StopPlot
global WLVERBOSE;
global NRfigures;
global CRfigures;
global UnderConstructionFigures;
clear plotOffset
clear LastFigureNo
clear PaperName
clear MakeFigureFilePrefix
clear IfNewWindow
clear IfAddTitle
clear IfLoadData
clear StopPlot
clear WLVERBOSE;
clear NRfigures;
clear CRfigures;
clear UnderConstructionFigures;%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?