⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ft_plot_virgo_map.m

📁 用matlab做的Frequency domain INterferomEter Simulation SoftwarE,在国外网站下的,还在研究中,不会用,有会用的回复我
💻 M
字号:
%%--------------------------------------------------------------------------% function []=FT_plot_virgo_map(map)%% A function for Matlab which plots a mirror surface map as read by % FT_read_virgo_map from the original map file in the standard% virgo format.%% filename: name of virgo file% map:      the surface map (variable converted to 'map' structure by%           FT_read_virgo_map)%% Charlotte Bond  11.07.2008%--------------------------------------------------------------------------%function [] = FT_plot_virgo_map(map)baseid='plot_virgo_map';% Set the name of the map to the name of the data and remove underscores% and file type.name=FT_remove_file_extension(map.name);name2=FT_replace_underscores(name,'\_');[rows,cols]=size(map.data);% Set the title for the top of the plotwin_title=sprintf('Virgo mirror map: %s', name );fig_title=sprintf('Virgo mirror map: %s', name2 );figure('name', win_title )% Define the x and y scales in [cm]x_index=linspace(1,cols,cols);y_index=linspace(1,rows,rows);x=(x_index-(map.x0))*map.xstep*100;y=(y_index-(map.y0))*map.ystep*100;% Rescaling map into nanomater% (this should the default but its better to make sure% so that the coloraxis label is correct)data=map.data*map.scaling*1e9;;% Plot a surface plot of the mapsurf(x,y,data,'Edgecolor','none');% Set the figure to give a 2D view of the surface plotview(2);% Set the y and x scales to linear and attach axis labelsset(gca, 'YScale', 'lin');set(gca, 'XScale', 'lin');xlabel('x [cm] ');ylabel('y [cm] ');zlabel('Height [nm]');axis square% Reduce the plotted area to size of mirror:%  find all points that are NOT zero[ridx,cidx]=find(map.data~=0); %  and find the min/max x/y values for this data setx_min=min(x(cidx));x_max=max(x(cidx));y_min=min(y(ridx));y_max=max(y(ridx));set(gca, 'XLim', [x_min x_max]);set(gca, 'YLim', [y_min y_max]);disp(sprintf('Zoom: plotting only (rows,cols): (%d, %d) from a (%d, %d) data set',max(ridx)-min(ridx),max(cidx)-min(cidx),rows,cols));% Insert colorbar in figurehc=colorbar('Xaxislocation','top');set(get(hc,'xlabel'),'string','Height [nm]','fontsize',15,'Fontname','helvetica','fontweight','bold');z_min=min(min(data));z_max=max(max(data));disp(sprintf('Maximum deviations from zero: %g  <--> %g nm',z_min,z_max));% Make a symmetric color mappingc_max=max(abs([z_max z_min]));set(gca, 'CLim', [-c_max c_max]);set(gca, 'ZLim', [-c_max c_max]);% Set a tile and align it to the left in order to leave enough space% for the colorbar labelht=title( fig_title );pos=get(ht,'Position');pos(1)=x_min;set(ht,'Position',pos);set(ht,'HorizontalAlignment','left')grid off;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -