📄 fix_las_file_log.m
字号:
function wlog=fix_las_file_log(wlog)% Perform error checking and other tasks for well log read fronm LAS file% User in LAS-file reader%% Written by: E. R.: December 19, 2006% Last updated:%% wlog=fix_las_file_log(wlog)% INPUT% wlog raw well log% OUTPUT% wlog corrected well logglobal S4M% Convert all well log data to single precision if requestedif strcmpi(S4M.precision,'single') wlog=single(wlog);end% Replace mnemonic of first column if it is "dept"if strcmpi(wlog.curve_info{1,1},'dept') wlog.curve_info{1,1}='DEPTH';end% Make sure that log depths are ascendingif wlog.first > wlog.last wlog.curves=flipud(wlog.curves); temp=wlog.first; wlog.first=wlog.last; wlog.last=temp; wlog.step=-wlog.step;end% Check log start and end time and step sizeif isempty(wlog.curves) disp(' No log curve values read; there may be non-numeric characters in the data block') error(' Check ~ASCII-data section of LAS file')endif wlog.first ~= wlog.curves(1,1) fprintf(['Log start depth (',num2str(wlog.curves(1,1)), ... ') differs from header information (',num2str(wlog.first), ... '); now corrected\n']) wlog.first=wlog.curves(1,1);endif wlog.last ~= wlog.curves(end,1) fprintf(['Log end depth (',num2str(wlog.curves(end,1)), ... ') differs from header information (',num2str(wlog.last), ... '); now corrected\n']); wlog.last=wlog.curves(end,1);endif wlog.step ~= 0 if ~isconstant(diff(wlog.curves(:,1)),S4M.log_step_error) fprintf('Log step size not uniform enough; step size changed to 0\n') endend% Replace null values by NaNsidx=find(wlog.curves == wlog.null);if ~isempty(idx) wlog.curves(idx)=NaN; wlog.null=NaN;else wlog.null=[];end% Replade 'UNDEFINED' in curve description when it is obvious from the mnemonicwlog.curve_info=description_substitution(wlog.curve_info);% Replace unadmissible curve mnemonicswlog.curve_info(:,1)=fix_mnemonics(wlog.curve_info(:,1));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -