We have demonstrated the ability to read an ASCII file with each line starting with the WGS84/UTM coordinates in OpendTect as 2D GPS B-scans to be displayed in 3D along their acquisition track. Doing so assumed a flat terrain (constant datum) and the topography was not resolved. Here we aim at
ffs=1000; % dummy sampling rate fs=1518.67; % GPR sampling rate Hz addpath('../segymat-1.6/'); pos=load('ew.pos33N'); % load trace position ele=load('ew.ele'); % load elevation maxele=max(ele); dl=dir('ew-main'); % load GPR B-scan dataset x=load(dl.name); X=[]; Y=[]; Z=[]; % below the index of the GPX trace and their (X,Y) coordinates indn=[103 464 719 1119 1610 2045 2642 3616 3831 4316 4523 4771 ] % QGis GPS indices indx=[437551 437641 437801 438139 438521 438819 439256 439817 439975 440234 440378 440534 ] % QGis GPS indices indy=[8756744 8757006 8757135 8757230 8757142 8757018 8756983 8757137 8757149 8757235 8757239 8757279 ] % QGis GPS indices for dnn=1:length(indn)-1 X=[X linspace(pos(indn(dnn),1),pos(indn(dnn+1),1),round(size(x)(1)*(indn(dnn+1)-indn(dnn))/(indn(end)-indn(1))))]; Y=[Y linspace(pos(indn(dnn),2),pos(indn(dnn+1),2),round(size(x)(1)*(indn(dnn+1)-indn(dnn))/(indn(end)-indn(1))))]; Z=[Z linspace(ele(indn(dnn)) ,ele(indn(dnn+1)), round(size(x)(1)*(indn(dnn+1)-indn(dnn))/(indn(end)-indn(1))))]; length(X) end Z=-(Z-max(maxele)); Z=Z*2; % Two Way trip sortie=zeros(size(x)(1),size(x)(2)+floor(max(Z)*fs/300)); % output array for k=1:size(x)(1) sortie(k,1:round(fs/300*Z(k)))=NaN; % prefix with starting point index sortie(k,round(fs/300*Z(k))+[1:size(x)(2)])=x(k,:); % then the trace if (round(fs/300*Z(k))+size(x)(2)+1<size(sortie)(2)) % and finally the bottom part (notice we had to escape < for HTML) sortie(k,round(fs/300*Z(k))+size(x)(2)+1:size(sortie)(2))=NaN; end end nomsegy=[dl.name,".segy"] WriteSegy(nomsegy,sortie','dt',1/ffs,'cdpX',round(X),'cdpY',round(Y),'Inline3D',[0:size(sortie)(1)-1],'Crossline3D',zeros(1,size(sortie)(1)),'revision',1); imagesc(sortie(1:3:end,1:3:end)')
if exist('LagTimeA')==1,SegyTraceHeader.LagTimeA = LagTimeA(i);end if exist('SourceDatumElevation')==1,SegyTraceHeader.SourceDatumElevation = SourceDatumElevation(i);end if exist('ReceiverDatumElevation')==1,SegyTraceHeader.ReceiverDatumElevation= ReceiverDatumElevation(i);endbut if these parameters are read, they are not used by OpendTect to shift the traces. LagTimeA was detected and provided as argument when reading the Seg-Y file but did not change the display.