📄 ft_recenter_virgo_map.m
字号:
%%--------------------------------------------------------------------------% function [map]=FT_recenter_virgo_map(map)%% A function for Matlab which tries to center mirror surface map as read by % FT_read_virgo_map from the original map file in the standard% virgo format. It uses a simple center of gravity computation.%% filename: name of virgo file% map: the surface map (variable converted to 'map' structure by% FT_read_virgo_map)%% Andreas Freise 23.07.2008%--------------------------------------------------------------------------%function [map]=FT_recenter_virgo_map(map)baseid='recenter_virgo_map';[rows,cols]=size(map.data);% Perform a simple centre of gravity calculation to find a new center % of the map:[ridx,cidx]=find(map.data~=0);npoints=length(ridx);x0=round(sum(cidx)/npoints);y0=round(sum(ridx)/npoints);disp(sprintf('move center (row,col) from (%d, %d) to (%d, %d)',map.y0,map.x0,y0,x0));map.x0=x0;map.y0=y0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -