[Seisunix] help sushape

62 views
Skip to first unread message

bara

unread,
Feb 9, 2012, 6:54:49 AM2/9/12
to seis...@mailman.mines.edu
Hi
I read SUSHAPE help and I don't understand as I can save the
wiener_filter into a file with showwshaper=1 (where I put name
file?). Can someone help me, please?

thank you

luka

_______________________________________________
seisunix mailing list
seis...@mailman.mines.edu
https://mailman.mines.edu/mailman/listinfo/seisunix
Unsubscribe: seisunix-u...@mailman.mines.edu

Robert Hardy

unread,
Feb 9, 2012, 9:13:00 AM2/9/12
to bara, seis...@mailman.mines.edu
Hi

Its at the bottom of the help file

sushape < indata wfile=inputwavelet.su dfile=desire.su > shaped_data

To get the shaping filters into an ascii file:
... | sushape ... showwshaper=1 2>file | ... (sh or ksh)
(... | sushape ... showshaper=1 | ...) >&file (csh)

e.g.

sushape < 20.su wfile=20.su dfile=10.su showshaper=1 > shape.su

sushape: Shaping filter:
0.404932 0.0055502 -0.130691 -0.105644 -0.00776905 0.0960236
0.1688 0.197927 0.190089 0.162665 0.134682 0.120869
0.12842 0.155737 0.194858 0.235644 0.269974 0.290735
0.299311 0.295508 0.287457 0.279577 0.274894 0.274237
0.277846 0.28156 0.281324 0.277011 0.268656 0.254223
0.236848 0.218798 0.199288 0.180594 0.16281 0.145529
0.128966 0.113173 0.0997011 0.0884836 0.0807849 0.0759136
0.0717978 0.0648585 0.0523443 0.0324033 0.00784108 -0.0136255
-0.0185579 0.0119952 0.0987117


sushape < 20.su wfile=20.su dfile=10.su showshaper=1 2>my_filter.txt > shape.su
$ cat my_filter.txt

sushape: Shaping filter:
0.404932 0.0055502 -0.130691 -0.105644 -0.00776905 0.0960236
0.1688 0.197927 0.190089 0.162665 0.134682 0.120869
0.12842 0.155737 0.194858 0.235644 0.269974 0.290735
0.299311 0.295508 0.287457 0.279577 0.274894 0.274237
0.277846 0.28156 0.281324 0.277011 0.268656 0.254223
0.236848 0.218798 0.199288 0.180594 0.16281 0.145529
0.128966 0.113173 0.0997011 0.0884836 0.0807849 0.0759136
0.0717978 0.0648585 0.0523443 0.0324033 0.00784108 -0.0136255
-0.0185579 0.0119952 0.0987117

You would have to use some awk commands and a2b to view the filter in su or convert it to a binary file.


I will try and wikify this !!

Cheers

Rob


________________________________________
From: seisunix...@mailman.mines.edu [seisunix...@mailman.mines.edu] On Behalf Of bara [lbara...@ogs.trieste.it]
Sent: 09 February 2012 11:54
To: seis...@mailman.mines.edu
Subject: [Seisunix] help sushape

Jorge Luis Bacca Moreno

unread,
Feb 9, 2012, 10:09:35 AM2/9/12
to har...@tcd.ie, lbara...@ogs.trieste.it, seis...@mailman.mines.edu
Good day, please i´m not interested in this email. don´t send it to me.

Thanks


Atte:

Jorge Luis Bacca Moreno
Ingeniero Electrónico
Universidad Industrial de Santander - UIS

Gang Yao

unread,
Feb 9, 2012, 12:13:31 PM2/9/12
to seis...@mailman.mines.edu
Dear all,
I am writing programs based on SU. I noticed that if using 'fgettr'
read two different trace length SU files, there will be an error like:
fgettr.c: on trace #2, number of samples in header (3001)
differs from number for first trace (800)
The error happens when 'fgettr' is trying to read the second SU file,
which has different trace sample number with the first one.
Does any body know how to solve it?
Cheers
Gang

John Stockwell

unread,
Feb 9, 2012, 12:41:31 PM2/9/12
to Gang Yao, seis...@mailman.mines.edu
Please try using fvgettr for variable trace length data.

John Stockwell | jo...@dix.Mines.EDU
Center for Wave Phenomena (The Home of Seismic Un*x)
Colorado School of Mines
Golden, CO 80401 | http://www.cwp.mines.edu/cwpcodes
voice: (303) 273-3049

Our book:
Norman Bleistein, Jack K. Cohen, John W. Stockwell Jr., [2001],
Mathematics of multidimensional seismic imaging, migration, and inversion,
(Interdisciplinary Applied Mathematics, V. 13.), Springer-Verlag, New York.

Gang Yao

unread,
Feb 9, 2012, 12:50:55 PM2/9/12
to John Stockwell, seis...@mailman.mines.edu
Dear John,
Many thanks for your reply.
It is a good idea! Also, I found that 'fgettra' has the same
problem with reading two different length files. But, we don't have
'fvgettra' in SU to solve it. Therefore, we couldn't use 'fgettra' to
easily count the trace number of a SU file. Anyway, need to write more
codes in ourselves programs to replace 'fgettra'.
Cheers,
Gang

Nils Maercklin

unread,
Feb 9, 2012, 1:02:23 PM2/9/12
to Gang Yao, seis...@mailman.mines.edu
Dear Gang,

>    I am writing programs based on SU. I noticed that if using 'fgettr' read
> two different trace length SU files, there will be an error like:
>        fgettr.c: on trace #2, number of samples in header (3001) differs
> from number for first trace (800)
> The error happens when 'fgettr' is trying to read the second SU file, which
> has different trace sample number with the first one.

typically, all traces in a SEGY (SU) file have the same length, and
most SU programs require this. You can use "suvlength" to set all
traces to the same length.

If you write your own code and really need to read variable trace
length, you may use the function "fvgettr()" instead of "fgettr()".
See "suvlength.c" and "fgettr.c" for details.

Good luck,

Nils

Reginald Beardsley

unread,
Feb 9, 2012, 1:31:32 PM2/9/12
to seis...@mailman.mines.edu
If the trace lengths vary, there is no way to read traces in random order w/o an index file which would require a complete reimplementation of the trace I/O.

Another solution to the problem you raised is to make all the traces the same length.

Have Fun!
Reg

--- On Thu, 2/9/12, Gang Yao <yaog...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages