martes, 29 de agosto de 2017

Read EBCDIC header from Linux command line

SEGY type of file is a seismic file that use by Geophysicist & Geologist to help them to interpret the fault or horizon in earth subsurface. This type of file has a header in EBCDIC and binary format. Using UNIX / Linux, we could extract the EBCDIC information from the file.
The command to extract the header is:
#dd if=field.segy conv=ascii ibs=3200 count=1
Some text without carriage return will appear. You could format the output using the following command: 
#dd if=$1 conv=ascii ibs=3200 count=1 | awk 'BEGIN{RS="C[0-9 ][0-9]"}{printf "C%2d%s\n",NR,$0}'

Expropriated from  http://hollyghozi.blogspot.com.ar/2006/11/oilgas-how-to-read-ebcdic-segy-header.html

miércoles, 8 de abril de 2015

Read and Display a seg-y Stack using Madagascar

In this post I will explain how to read a seg-y stack in Madagascar.
sfsegyread tfile=stk4164hdr.rsf \
hfile=stk4164.ebcdic \
bfile=stk4164.bin \
endian=y verb=y \
< ~/obspy/stk/STKSFYG_4164.sgy \
> stk4164.rsf
The sfsegyread command converts the seg-y to a rsf file. The hfile option is used to output the ebcdic header. The output file name is specified in line 6, the input file name in line 5.

sfgrey < stk4164.rsf \
color=h \
title="4164 Stack" \
gpow=.7 \
scalebar=y \
> 4164.vpl
sfgrey is used to generate a plot of the data. gpow options acts as an AGC. color is used to select from this palette.
sfpen 4164.vpl
Finally, sfpen is used to display the generated image.