📄 s_normalize.m
字号:
function seismic=s_normalize(seismic,varargin)
% Function normalized seismic traces
% Written by: E. R.: December 5, 2004
% Last updated:
%
% seismic=s_normalize(seismic,varargin)
% INPUT
% seismic seismic data set
% varargin one or more cell arrays; the first element of each cell array is a keyword,
% the other elements are parameters. Presently, keywords are:
% 'attribute' type of attribute to make equal for all the traces
% Possible values are: 'power', 'rms'
% Default: {'attribute','power'}
% 'value' value to which to set attribute; possible values are the string 'average'
% (which sets the attribute to the average of all attributes) or a numeric value
% Default: {'value','average'}
% OUTPUT
% seismic input data with all traces having the same attribute.
% Set default values for input parameters
param.attribute='power';
param.value='average';
% Replace defaults by input parameters
param=assign_input(param,varargin);
switch lower(param.attribute)
case 'power'
temp=mean(seismic.traces.^2);
if ischar(param.value)
scf=sqrt(mean(temp)./temp);
else
try
scf=sqrt(param.temp./temp);
catch
error('Check attribute value and/or data.')
end
end
case 'rms'
temp=sqrt(mean(seismic.traces.^2));
if ischar(param.value)
scf=mean(temp)./temp;
else
try
scf=param.temp./temp;
catch
error('Check attribute value and/or data.')
end
end
otherwise
error('Unknown option');
end
seismic.traces=mvt(seismic.traces,scf);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -