亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? segyinput.m

?? 讀取segy數據
?? M
字號:
function [dataout, sampint, numsamps, t] = segyinput(sgyfile, platform,...
    traces, skip, fcode, ucode)

% function [dataout, sampint, numsamps, t] = segyinput(sgyfile, platform,...
%     traces, skip, fcode, ucode)
%
% Reads segy data into a structured array format in Matlab workspace.
% The name of the segy file and the platform must both be given
% in single quotes. (Without single quotes you will get an 
% "??? Undefined variable 'unquoted stuff'." error.)
%
% Segyinput also gives you the following options: specify the number of 
% traces to read in, the format of the data samples, and the units of 
% measurement used by the survey if desired. The maximum number of traces 
% that may be read in or skipped is approximately 8500 if each trace is 
% 3000 samples long and the data is stored in a 4 byte format.
%
% Possible platform designations, quoted from the FOPEN Matlab help file,
% most likely formats first:
%
% 'b' = data written in UNIX format (big endian, IEEE floating point)
% 'l' = data written in PC format (little endian, IEEE floating point)
% 'c' = Cray floating point (big endian)
% 's' = 64 bit long data type (big endian, IEEE floating point)
% 'a' = 64 bit long data type (little endian, IEEE floating point)
% 'n' = defaults to the format the machine running Matlab uses
% 'd' = VAXD floating point with VAX ordering
% 'g' = VAXG floating point with VAX ordering
%
% dataout   = a structured array containing four fields: textheader,
%             binaryheader, traceheaders, and data
% sampint   = sampling interval
% numsamps  = number of samples per trace
% t         = time vector
% traces    = optional argument, indicates number of traces to read in;
%             otherwise all traces are read in by default
% skip      = optional argument; if the number of traces being read in is 
%             specified, this allows a number of traces to be skipped before 
%             the read in begins (you may have a trace setting without a
%             skip setting, but not a skip setting without a trace setting)
% fcode     = optional argument, format code for the data
%             options for fcode are:
%             1 = 4 byte floating point
%             2 = 4 byte fixed point
%             3 = 2 byte fixed point
%             4 = fixed point with gain code (not readable with this code)
%             5 = IBM/360 32-bit floats
% ucode     = optional argument, code for unit used in the seismic survey,
%             1 for metres, 2 for feet
% 
% Written by C. Osborne, December 2001, Revised March 2002

% Check the file name for problems.
strlength = max(size(sgyfile));
test1 = sgyfile((strlength - 3):strlength);

if (test1 ~= '.sgy') | (test1 ~= '.seg')
    disp(' ')
    disp('This data does not have a ".sgy" or ".seg" extension')
    disp('and may not be segy format data. Do you wish to continue?')
    intest = input('Type y for yes, n for no then hit the enter key.\n', 's')
    if intest == 'n'
        break
    end
end
clear intest;

fileinfo = dir(sgyfile); % Fileinfo is a structured array of file information.
[ro, co] = size(fileinfo);

if ro == 0
    error(['The file ', sgyfile, ' is not in the present working directory.'])
else
    lastbyte = fileinfo.bytes; % Pull the size of the file out of fileinfo.
end

platform = lower(platform);
dataout.textheader = zeros(40, 80); % Initialize the text header.

fclose('all'); % Close any previously opened segy files.
fid = fopen(sgyfile, 'r', platform);% Open the segy file for reading.

if fid == -1
    error('Unable to open file.')
end

% Read the segy file text header.
textheader = reshape(fread(fid, 3200, 'uchar'), 80, 40);
% Convert any numbers present to text and transpose for a
% matrix containing 40 lines of 80 characters, then assign it to the 
% first cell in the array.

[y, z] = find(textheader < 0); % Set up first if condition.
[y2, z2] = find(textheader > 127); % Set up second if condition.

if (y ~= []) | (y2 ~= [])
    tabmtest = exist('tableset.m');
    tabtest = exist('table.mat');
    if (tabtest == 0) & (tabmtest == 0)
        error('The support file "tableset.m" is missing. It is required by segyinput.')
    end
    dataout.textheader = ebcchar(textheader'); % If the header is in EBCDIC format.
else
    dataout.textheader = char(textheader'); % In case the header is in ASCII format.
end

% Read out the information from the binary header that is typically available.
% Header descriptions are in header.m.
binpart1 = fread(fid, 3, 'int32'); % First section of the binary header.
binpart2 = fread(fid, 24, 'int16'); % Second section of the binary header.

% Create the binary header cell for dataout.
binpart1s = max(size(binpart1));
binpart2s = max(size(binpart2));
binrows = binpart1s + binpart2s;
dataout.binaryheader = zeros(binrows, 1);
dataout.binaryheader(1:3, :) = binpart1;
dataout.binaryheader(4:binrows, :) = binpart2;

sampint = dataout.binaryheader(6:6, :); % Sample interval in milliseconds.
numsamps = dataout.binaryheader(8:8, :); % Number of samples.

if (nargin == 5) | (nargin == 6)
    format = fcode;
else
    format = binpart2(7);
end
needibm = 0;

% Recently a format code of 5 has been added to the segy standard for
% IBM/360 32-bit floats.
% Find what format the seismic data is in.
if format == 1
    disp(' ')
    disp('Format code does not indicate whether floating point type of the data')
    disp('is IBM format or IEEE format. Please type 1 for IBM or 2 for IEEE.')
    intest = input('Type format number, then hit enter.\n', 's')
             if intest == '1'
                needibm = 1;
             end
	dformat = 'float32'; % 4 bytes.
    bytelength = 4;
elseif format == 2
    dformat = 'int32'; % 4 bytes, signed.
    bytelength = 4;
elseif format == 3
    dformat = 'int16'; % 2 bytes, signed.
    bytelength = 2;
elseif format == 4
    error('Can not convert this format. (Fixed point with gain code.)');
elseif format == 5
    dformat = 'float32'; % 4 bytes.
    bytelength = 4;
    needibm = 1;
else
    error(['Can not convert data format ', num2str(format), '.']);
end
clear intest

% Check to see if the entire data set is to be read in or not.
if (nargin >= 3) & (nargin <= 6)
    numtraces = traces;
    lastbyte = (((bytelength*numsamps) + 240)*traces) + 3600;
else
    numtraces = round(lastbyte/((bytelength*numsamps) + 240));
end

% Find what distance measurement units were used in the survey.
if nargin == 6
   units = ucode;
else
   units = dataout.binaryheader(25:25, :); % Units used for the seismic survey.
end

if units == 2 % Feet used.
 units = 0.3048; % Conversion factor to go from feet to metres.
else
 units = 1; % Metres used.
end

testth = fread(fid, 170, 'int16'); % Skip the rest of the binary header.
clear testth

% Skip a number of traces before starting the read if required.
if exist('skip') == 1
   skipbytes = (((bytelength*numsamps) + 240)*skip);
   testth = fread(fid, skipbytes, 'uchar');
   lastbyte = lastbyte + skipbytes;
end
clear testth

dataout.traceheaders = zeros(60, 1); % Initialize the traceheader cell.
dataout.data = zeros(numsamps, 1); % Initialize the data cell.
% Other initializations needed for the while loop.
setcol = 1;
temp = 0;
position = 0;

while position < lastbyte
    dataout.traceheaders(:, setcol:setcol) = fread(fid, 60, 'float32');
    if needibm == 1
	  ibm1 = fread(fid, numsamps, 'uint32');
      temp = ibm2ieee(ibm1);
      check2 = max(size(temp));
          if check2 ~= numsamps
             disp(['Problem reading trace ', num2str(setcol), '.'])
             disp('Replace with zeroes?')
             intest = input('Type y for yes, n for no then hit enter.\n', 's')
             if intest == 'y'
                disp('Replacing with zeroes.')
                dataout.data(:, setcol:setcol) = zeros(numsamps, 1);
             else
                break
             end
          else
             dataout.data(:, setcol:setcol) = temp;
          end
  	else
        temp = fread(fid, numsamps, dformat);
        check2 = max(size(temp));
        if check2 ~= numsamps
           disp(['Problem reading trace ', num2str(setcol), '.'])
           disp('Replace with zeroes?')
             intest = input('Type y for yes, n for no then hit the enter key.\n', 's')
             if intest == 'y'
                disp('Replacing with zeroes.')
                dataout.data(:, setcol:setcol) = zeros(numsamps, 1);
             else
                break
             end
        else
          dataout.data(:, setcol:setcol) = temp;
        end
    end
    setcol = setcol + 1 % Prints to show the algorithm hasn't crashed.
                        % Note that setcol will finish 1 higher than the
                        % actual number of traces.
    position = ftell(fid);
end

dataout.data = units*dataout.data; % Apply the unit factor.
t = dataout.traceheaders(36:36, 1:1):(sampint/1000000):(((numsamps - 1)*sampint)/1000000);
disp('Segy data read in successfully.')

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品日韩一区| 久久久久久综合| 国产成人精品三级麻豆| 美女www一区二区| 日韩一区欧美二区| 麻豆极品一区二区三区| 韩国一区二区三区| 国产91丝袜在线播放| 国产凹凸在线观看一区二区| 日韩三区在线观看| 欧美tk—视频vk| 国产欧美日韩久久| 136国产福利精品导航| 国产精品久久久久一区二区三区共 | 国产91精品一区二区| caoporn国产精品| 色婷婷久久综合| 欧美精品粉嫩高潮一区二区| 精品福利在线导航| 国产精品伦理在线| 亚洲gay无套男同| 经典一区二区三区| 色综合天天狠狠| 日韩欧美综合一区| 国产精品久久久久9999吃药| 亚洲国产精品天堂| 国产制服丝袜一区| 欧美色综合网站| 久久综合九色综合欧美98| 亚洲图片另类小说| 久久99久久精品| 日本高清不卡一区| 久久综合久久综合久久综合| 一区二区在线看| 国产在线日韩欧美| 欧洲精品中文字幕| 久久精品视频在线看| 亚洲高清不卡在线| 成人激情视频网站| 欧美va亚洲va香蕉在线| 亚洲综合免费观看高清完整版在线 | 亚洲婷婷综合色高清在线| 视频一区中文字幕国产| 不卡视频一二三四| 久久久无码精品亚洲日韩按摩| 亚洲精品一卡二卡| 国产激情一区二区三区四区| 欧美浪妇xxxx高跟鞋交| 亚洲免费观看在线视频| 国产精品一区二区不卡| 日韩午夜电影av| 日韩国产在线一| eeuss影院一区二区三区| 精品国产伦理网| 日日夜夜精品视频免费| 在线一区二区三区| 亚洲免费资源在线播放| 懂色一区二区三区免费观看 | 国产精品白丝在线| 精品一区二区三区影院在线午夜| 欧美无砖专区一中文字| 亚洲欧美色图小说| 91免费在线视频观看| 最新国产精品久久精品| 国产成人av电影在线| 久久综合九色综合欧美98| 美女视频一区二区三区| 日韩免费一区二区三区在线播放| 污片在线观看一区二区| 7777精品伊人久久久大香线蕉| 亚洲国产精品久久人人爱| 欧美三级蜜桃2在线观看| 亚洲一区二区偷拍精品| 欧美亚洲国产一区在线观看网站| 亚洲免费观看高清| 欧美四级电影网| 日本成人中文字幕在线视频| 欧美一区二区视频在线观看| 亚洲第一福利一区| 欧美一区二区三区不卡| 另类成人小视频在线| 久久久一区二区三区捆绑**| 高清不卡在线观看av| 国产精品成人在线观看 | 首页综合国产亚洲丝袜| 欧美一二三区在线| 国产精品资源在线观看| 国产精品午夜在线观看| 91在线免费播放| 亚洲成年人影院| www国产成人| 99国产精品久久久久久久久久久| 一区二区成人在线视频| 欧美妇女性影城| 国产在线不卡一卡二卡三卡四卡| 国产亚洲精品资源在线26u| 99精品国产99久久久久久白柏| 亚洲国产成人精品视频| 精品不卡在线视频| 91在线视频官网| 另类调教123区| 中文字幕亚洲一区二区va在线| 欧美日韩一区二区三区在线看| 蜜臀精品久久久久久蜜臀| 中文字幕国产一区| 欧美狂野另类xxxxoooo| 粗大黑人巨茎大战欧美成人| 一区二区三区日韩精品| 精品国产伦理网| 日本韩国一区二区| 国模一区二区三区白浆| 亚洲午夜久久久久中文字幕久| 欧美成人一区二区三区片免费| 91欧美激情一区二区三区成人| 美女在线视频一区| 有坂深雪av一区二区精品| 久久久天堂av| 欧美一区二区福利视频| 99精品黄色片免费大全| 国产伦精品一区二区三区视频青涩 | 国产成人免费视频网站高清观看视频| 亚洲视频一区二区在线| 精品国产髙清在线看国产毛片| 一本大道久久精品懂色aⅴ| 狠狠色丁香久久婷婷综合_中 | 国产欧美日韩不卡| 91麻豆精品国产91久久久更新时间 | 亚洲成人av电影在线| 综合久久久久久| 国产片一区二区| 欧美成人女星排名| 欧美日韩www| 欧美伊人久久久久久午夜久久久久| 国模娜娜一区二区三区| 麻豆精品在线视频| 奇米888四色在线精品| 亚洲精品日产精品乱码不卡| 中文字幕一区二区5566日韩| 国产欧美日韩激情| 精品对白一区国产伦| 精品久久久三级丝袜| 日韩一级二级三级精品视频| 欧美日韩国产综合一区二区| 色欲综合视频天天天| 成人高清在线视频| 成人午夜视频网站| 不卡视频在线看| 99这里都是精品| 一本色道久久综合狠狠躁的推荐| 91亚洲永久精品| 色婷婷综合激情| 欧美日韩在线综合| 欧美精品少妇一区二区三区| 7777精品伊人久久久大香线蕉| 欧美精品日韩精品| 精品三级av在线| 久久亚洲二区三区| 国产精品久久久久毛片软件| 1024成人网色www| 亚洲亚洲人成综合网络| 日韩高清不卡一区| 国产一区二区三区香蕉| 国产一区激情在线| 成人精品国产免费网站| 91老师片黄在线观看| 欧美日韩视频第一区| 91精品国产91综合久久蜜臀| 精品剧情v国产在线观看在线| 久久综合色综合88| 亚洲色图在线看| 日韩电影一二三区| 国产99久久久国产精品潘金| 91玉足脚交白嫩脚丫在线播放| 日本电影欧美片| 日韩视频永久免费| 国产精品电影一区二区| 亚洲在线视频网站| 国产一区二区看久久| 色香蕉久久蜜桃| 精品国产乱码久久久久久牛牛 | 欧美亚洲国产一区二区三区va| 91精品国产麻豆| 中文字幕制服丝袜一区二区三区| 亚洲一区日韩精品中文字幕| 久久99蜜桃精品| 91免费精品国自产拍在线不卡| 717成人午夜免费福利电影| 久久精品亚洲精品国产欧美kt∨| 亚洲精品videosex极品| 麻豆精品视频在线观看| 91在线视频观看| 日韩午夜激情视频| 亚洲欧美成aⅴ人在线观看| 久久不见久久见免费视频1| www.激情成人| 日韩精品一区二区三区四区| 一区二区三区在线观看欧美| 国产成人免费在线| 日韩一级欧美一级| 亚洲va欧美va人人爽午夜|