WriteSegy.m is available to write a Matrix to disk as a SEG-Y file.
WriteSegyStructure.m is available to write a SEG-Y file using a specified set of headers. This is of special use if one wants to load a seismic data set, work with the data in Matlab, and the write the data to disk using the same header values.
WriteSegy can be used to save a matrix of data, in Matlab as a file.
Here
dt is a scalar and
Inline,
Crossline,
X and
Y
are arrays of values of size size(data,2)
>> WriteSegy('datacube.segy',data,
'dt',.004,'Inline3D',Inline,'Crossline3D',Crossline,
'cdpX',X,'cdpY',Y);>> WriteSegy('test.segy',seisdata,'revision',0); % SEG-Y Revision 0
>> WriteSegy('test.segy',seisdata,'revision',1); % SEG-Y Revision 1 See Section 2.3.3, “Data Sample Format / Revision” for a list of valid and supported values for the datasample format dsf.
>> % Force Revision 1 and IEEE Floating point :
>> WriteSegy('test.segy',seisdata,'dsf',5,'revision',1);
>>
>> % Force Revision 0 and IBM Floating point :
>> WriteSegy('test.segy',seisdata,'dsf',1,'revision',0); WriteSegyStructure can be used to write a seismic data to disk given that both
SegyHeader, SegyTraceheaders and the data Data are known.
They can be obtained using ReadSegy.m like ;
>> [Data,TraceHeaderInfo,SegyTraceHeaders,SegyHeader]=ReadSegy('data.segy');To write the data using WriteSegyStructure simply do
>> WriteSegyStructure('datacube.segy',SegyHeader,SegyTraceHeaders,Data);>> % Revision 0
>> WriteSegyStructure('datacube.segy',SegyHeader,
SegyTraceHeaders,Data,'revision',0);
>> % Revision 1
>> WriteSegyStructure('datacube.segy',SegyHeader,
SegyTraceHeaders,Data,'revision',1); See Section 2.3.3, “Data Sample Format / Revision” for a list of valid and supported values for the datasample format dsf.
>> % To force the use of SEG Y revision 0 and data sampling format IEEE :
>> WriteSegyStructure('datacube.segy',SegyHeader,
SegyTraceHeaders,Data,'revision',1,'dsf',5);| © 2004-2006 Thomas Mejer Hansen. | This site is hosted by
|