Convert RSF Madagascar to SEG-Y/SU File
Madagascar is an open-source software package for multidimensional data analysis and reproducible computational experiments. I get many of new program in Madagascar source code. Madagascar is free open source seismic software like Seismic Unix or Seplib. You can get tutorial about how to use command in Madagascar at here. In my opinion, command in Madagascar is more difficult than Seismic Unix. My first problem when use Madagascar is how to convert RSF to SEG-Y/SU file and vice verca.
This is method how to convert from SEG-Y/SU file to RSF file :
sfsegyread < plane.segy tfile=tfile.rsf hfile=hfile bfile=bfile endian=0 > plane.rsf
sfsuread < plane.su tfile=tfile.rsf endian=0 > plane.rsf
To convert files back from RSF to SEG-Y or SU, use the sfsegywrite program and reverse the input and output:
sfsuwrite > plane.su tfile=tfile.rsf endian=0 < plane.rsf
sfsegywrite > plane.segy tfile=tfile.rsf hfile=hfile bfile=bfile endian=0 < plane.rsf
But the problem is when we dont have tfile(header trace) input file. So, we must create this file first. Use this command :
sfheadermath < plane.rsf output=N+1 | sfdd type=int > tracl.rsf
sfsegyheader < plane.rsf tracl=tracl.rsf > tfile.rsf
sfsegywrite < plane.rsf tfile=tfile.rsf > plane.segy
If we have Seismic Unix installed in my computer, we can convert rsf data to ascii, export ascii data to binary, and convert binary data to SU format. I think this method is more simple than above code. This is command how to convert RSF Madagascar to SEG-Y/SU command :
sfdisfil <plane.rsf number=n col=1 |a2b n1=1 >tmp1
suaddhead<tmp1 ns= > plane.su
You can get or download sigsbee data from madagascar at here and all sample data at here.