diff --git a/DOC/index.php b/DOC/index.php
index 1271245..a0865c9 100644
--- a/DOC/index.php
+++ b/DOC/index.php
@@ -1,6 +1,6 @@
pd
require_once('magpierss/rss_fetch.inc');
- $release="1.3";
+ $release="1.4";
?>
@@ -19,7 +19,7 @@
-M-files to read and write SEG-Y files from Matlab, implemented using the syntax of the SEG-Y format : SEG-Y revision 0 (1975) and revision 1 (May 2002) [pdf,doc].
+M-files to read and write SEG-Y files from Matlab, implemented using the syntax of the SEG-Y format : SEG-Y revision 0 (1975) and revision 1 (May 2002) [pdf].
This site is hosted by
diff --git a/ReadSegy.m b/ReadSegy.m
index c9aea3f..73e90e6 100644
--- a/ReadSegy.m
+++ b/ReadSegy.m
@@ -11,7 +11,7 @@
% [Data,SegyTraceHeaders,SegyHeader]=ReadSegy(filename,'jump',5);
% Read data in a CDP header range : 5000=headermin & h<=headermax);
+
+
+ if isempty(traces)
+ traces=minmax_traces;
+ else
+ traces=intersect(traces,minmax_traces);
+ end
+
end
if strcmp(varargin{cargin},'trange')
@@ -297,11 +307,12 @@
SegymatVerbose([mfilename,' : Reading Data'],90);
-if ~isempty(traces)
- [Data,SegyTraceHeaders,SegyHeader]=ReadSegyTrace(filename,traces,SegyHeader);
- HeaderInfo=[];
- return;
-end
+% MAKE USE OF ReadSegyTrace to quickly read specific traces
+%if ~isempty(traces)
+% [Data,SegyTraceHeaders,SegyHeader]=ReadSegyTrace(filename,traces,SegyHeader);
+% HeaderInfo=[];
+% return;
+%end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -357,10 +368,21 @@
while (~(ftell(segyid)>=DataEnd))
- traceinfile=traceinfile+1;
-
usetrace=1; % DEFAULT USING TRACE WHEN [1].
+ traceinfile=traceinfile+1;
+
+ if ~isempty(traces);
+ if (traceinfile>length(traces))
+ break
+ else
+ traceskip=240+(BPS/8)*SegyHeader.ns;
+ skip=DataStart+(traces(traceinfile)-1)*traceskip;
+ fseek(segyid,skip,'bof');
+ end
+ end
+
+
ishow=10000;
itime=1/(24*3600)*2; % Min time between verbose info to screen
if (((traceinfile/ishow)==round(traceinfile/ishow))&((now-tlast)>itime)),
@@ -418,12 +440,13 @@
if usetrace==1,
%% IF TIME RANGE IS SPECIFIED, THEN EXTRACT THIS
if (existTmin==1)&(existTmax==1)
- % NEXT LINE SHOULD CONSIDER THAT ns in Trace and Segy Header could vary !!!
+ % NEXT LINE SHOULD CONSIDER THAT ns in Trace and Segy Header
+ % could vary !!!
origtrange=[1:1:SegyHeader.ns].*SegyHeader.dt.*1e-6+SingleSegyTraceHeaders.DelayRecordingTime.*1e-3;
gooddata=find(origtrange>tmin & origtrange