ft_recenter_virgo_map.m

来自「用matlab做的Frequency domain INterferomEter」· M 代码 · 共 33 行

M
33
字号
%%--------------------------------------------------------------------------% 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 + =
减小字号Ctrl + -
显示快捷键?