function [seismic,ebcdic_header,binary_header]=read_segy_file_legacy(filename,varargin)
% Function reads a SEG-Y file and outputs a seismic structure
%
% Written by: E. Rietsch: March 5, 2000
% Last updated: April 6, 2007: fix bug in reading of user-specified headers
%
% [seismic,ebcdic_header,binary_header]=read_segy_file_legacy(filename,varargin)
%
% INPUT (all input arguments are optional)
% filename name of the file to read
% if the name is omitted, empty, or a file with this name is not found
% a file selector box will pop up to allow interactive file selection
% varargin Variable number of arguments. Each argument is a cell array whose first
% element is a keyword and whose other elements can be strings, numeric
% values, or other cell arrays
% Possible keywords are:
% format floating point format to use; this cell array has the form
% {'format',fp-format} where fp_format is one of the three strings:
% 'ibm' IBM floating point format (standard and default)
% 'ieee' IEEE format, big endian (Sun, SGI, etc.)
% 'header' The binary header bytes 25-26 are used to determine the format
% Default: {'format','header'};
% headers header values to be read from binary trace header; this cell array has
% the form {'headers',{mnem1,first,bytes,units,description}, ...
% {mnem2,first,bytes,units,description},...} where
% "mnem1", "mnem2", ... denote header mnemonics (such as CDP, OFFSET),
% "first" denotes the first byte in the binary header,
% "bytes" denotes the number of bytes occupied by the mnemonic (2 or 4),
% "units" denotes the units of measurement for the header value, and
% "description" is a description of the header value.
% Example:
% {'headers',{'ILINE_NO',181,4,'n/a','CDP number'}, ...
% {'OFFSET',37,4,'m','Source-receiver distance'}}
% See below for a list of headers retrieved by default.
% Default: {'headers',{}}
% times times to output; this cell array has the form
% {'times',first,last}; all samples with times between (and including)
% first and last (in ms) are output.
% Default: {'times',[]} i.e. all times
% traces select traces to output; this cell array has the form
% {'traces',criterion}; the variable "criterion" is used to
% determine which traces to output. "criterion" can be an index
% vector specifying the traces to output
% Examples: {'traces',1:2:100}
% {'traces',[2,5,7:10,22]}
% Alternatively, it can be a string with a logical expression involving
% trace headers such as '10 <= cdp && 100 >= cdp'
% Examples: {'traces','cdp == 100 && offset > 100'}
% {'traces','14000 < cdp && (14660 >= cdp || 14680 <= cdp)'};
% The variables in the logical relationships must be headers of the
% data set; Use of functions "fix", "mod", and "round" are permitted; all
% other function names will be interpreted as headers and likely cause an
% error; the case of the headers in an expression does not matter.
% Default: {'traces',[]}
% ignoreshift By default this function reads byte locations 109-110 (see
% header "lag" below) and applies the shift to the seismic data;
% This behavior can be overwritten by setting this parameter to true;
% Default: {'ignoreshift',false}
%
% Headers retrieved by default are (any one of these headers is removed if it turns out to
% be identically zero):
% ds_seqno Trace sequence number within line (1-4)
% ffid Original Field record number (9-12)
% o_trace_no Trace sequence number within original field record (13-16)
% source Energy source point number (17-20)
% cdp CDP ensemble number (21-24)
% seq_cdp Trace sequence number within CDP ensemble (25-28)
% trc_type Trace ID (1=live,2=dead,3=dummy,4=time break,...) (29-30)
% offset Distance from source point to receiver group (37-40)
% rec_elev Receiver elevation (41-44);
% sou_elev Surface elevation at source (45-48)
% depth Source depth below surface (49-52)
% sou_h2od Water depth at source (61-64)
% rec_h2od Water depth at receiver group (65-68)
% sou_x X coordinate of source (73-76)
% sou_y Y coordinate of source (77-80)
% rec_x X coordinate of receiver (81-84)
% rec_y Y coordinate of receiver (85-88)
% lag Lag time between shot and recording start in ms (109-110)
% (the value of lag is added to the start time of the
% seismic; hence it can be used to simulate non-zero start
% time of the data)
% see also parameter "ignoreshift", above.
% cdp_x X coordinate of CDP (181-184)
% cdp_y Y coordinate of CDP (185-189)
% iline_no In-line number (189-192)
% xline_no Cross-line number (193-196)
% The numbers in parentheses at the end of the line denote the location
% of the corresponding bytes in the SEG-Y trace header
%
% OUTPUT
% seismic Seismic structure
% seismic.type 'seismic' (type of structure)
% seismic.traces Array of seismic traces
% seismic.first Start time of seismic (in ms)
% seismic.last End time of seismic (in ms)
% seismic.step Sample interval of seismic (in ms)
% seismic.units Time units used (ms)
% seismic headers Matrix with header mnemonics (one row
% per header)
% seismic.header_info Three-column cell array with header info
% (one row per header)
% seismic.line_number Line number (5-8)
% seismic.reel_number Reel number (9-12)
% seismic.cdp_fold CDP fold
% seismic.traces_per_record Data traces per record (13-14)
% seismic.aux_per_record Auxiliary traces per record (15-16)
% seismic.history A four element cell array. The first element
% is the start date/time of the program that
% invoked this function; the second element is
% the start date/time this function was executed;
% and the last cell contains the name if the file
% that was read
% Example:
% seismic.offset contains the offset for each trace
% seismic.header_info.cdp two-element cell array {'m','Offset'}
% the first element represents the units of measurement, the
% second is a description of the header
%
% ebcdic_header EBCDIC reel header converted to ASCII
% binary_header Binary reel header
%
% [seismic,ebcdic_header,binary_header]=read_segy_file(filename,varargin)
global S4M ABORTED
ABORTED=false;
seismic=[];
ebcdic_header=[];
binary_header=[];
run_presets_if_needed
% Set default parameters
param.format='header';
param.headers={};
param.ignoreshift=false;
param.times=[];
param.traces=[];
if ~isempty(varargin)
param=assign_input(param,varargin); % Interpret/check input data
end
if strcmpi(param.format,'ieee')
param.format='ieee-be';
end
o_format='ieee-be';
if nargin <
没有合适的资源?快使用搜索试试~ 我知道了~
地球物理相关处理程序matlab工具箱.zip
共408个文件
m:404个
dll:2个
asv:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 27 浏览量
2022-11-13
09:12:51
上传
评论
收藏 1.76MB ZIP 举报
温馨提示
1.版本:matlab2019a,内含运行结果,不会运行可私信 2.领域:基础教程 3.内容:地球物理相关处理程序matlab工具箱.zip 4.适合人群:本科,硕士等教研学习使用
资源推荐
资源详情
资源评论
收起资源包目录
地球物理相关处理程序matlab工具箱.zip (408个子文件)
flipud.asv 740B
mouseclick.dll 24KB
uigetfolder_win32.dll 7KB
read_segy_file_legacy.m 29KB
s_wplot.m 25KB
open_segy_file4reading.m 25KB
write_segy_file.m 20KB
s_iplot.m 20KB
s_cplot.m 19KB
interpret_las3.m 19KB
read_las2_file.m 18KB
s_spectrum.m 18KB
showcell.m 15KB
showcell.m 15KB
list_of_seismic_functions.m 15KB
s_align.m 15KB
systemDefaults4Seislab.m 14KB
s_wavextra.m 13KB
ds_unit_conversion.m 13KB
write_las_file.m 12KB
s_plot_with_header.m 12KB
l_regression.m 11KB
s_create_wavelet.m 11KB
l_plot.m 11KB
moperation.m 11KB
s_wiener_filter.m 11KB
l_lithoplot.m 11KB
s_append.m 10KB
s_select.m 10KB
menu2pick_frequency_windows.m 10KB
s_compare.m 10KB
ds_header.m 9KB
s_zone_attributes.m 9KB
l_unit_conversion.m 9KB
read_segy_file.m 9KB
l_curve.m 9KB
s_principal_components.m 9KB
l_plot1.m 9KB
s_seismic2wavelet.m 9KB
s_ispectrum.m 8KB
check_numeric.m 8KB
s_xplot.m 8KB
s_create_synthetic_gather.m 8KB
progressbar.m 8KB
s_correlate.m 8KB
l_append.m 8KB
s_resample.m 7KB
s_stack.m 7KB
read_traces_of_segy_file.m 7KB
s_attributes.m 7KB
s_header_plot.m 7KB
l_depth2time.m 7KB
histoplot1.m 7KB
myimagemenu.m 7KB
l_sonic2time.m 7KB
list_of_log_functions.m 7KB
s_shift.m 7KB
interpret_las2.m 7KB
mylistdlg.m 6KB
s_3d_spliced_synthetic.m 6KB
mywindow.m 6KB
l_check.m 6KB
linemenu.m 6KB
l_crossplot.m 6KB
l_resample.m 6KB
l_elastic_impedance.m 6KB
s_slice_3d.m 5KB
read_las_file.m 5KB
l_seismic_elastic.m 5KB
s_histogram.m 5KB
s_slice3d.m 5KB
s_trace_numbers.m 5KB
s_gain.m 5KB
l_principal_components.m 5KB
mycolormap.m 5KB
s_header_math.m 5KB
l_select.m 5KB
s_phase_rotation.m 5KB
s_fft.m 5KB
wseismic_scrollbar_menu_item.m 5KB
wseismic_scrollbar_menu.m 5KB
cseismic_scrollbar_menu_item.m 5KB
cseismic_scrollbar_menu.m 5KB
ds_header_sort.m 5KB
l_assign_input.m 5KB
l_lithocurves.m 5KB
axis_label_location.m 5KB
l_curve_math.m 5KB
combine_parameters.m 5KB
xcorr_corresp.m 5KB
l_average.m 5KB
menu2edit_seismic.m 5KB
xcorr_all.m 5KB
zoeppritz_solid_solid.m 5KB
cornor.m 5KB
s_history.m 5KB
l_combine.m 5KB
assign_input.m 5KB
l_compare.m 5KB
s_window.m 4KB
共 408 条
- 1
- 2
- 3
- 4
- 5
资源评论
天天Matlab科研工作室
- 粉丝: 3w+
- 资源: 7259
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功