lib/App/SeismicUnixGui/sunix/filter/suphidecon.pm untested

filter: Statementstmt 0.0% 0 / 63 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 8 totaltotal 0.0% 0 / 91 CC 5 SCAR 13.9
CC
5
Cov
0%
percpad
6.0
pnoise
6.0
tm
6.0
CRAP 4.0
1 package App::SeismicUnixGui::sunix::filter::suphidecon;
2  
3 =head2 SYNOPSIS
4  
5 PERL PROGRAM NAME:
6  
7 AUTHOR: Juan Lorenzo (Perl module only)
8  
9 DATE:
10  
11 DESCRIPTION:
12  
13 Version:
14  
15 =head2 USE
16  
17 =head3 NOTES
18  
19 =head4 Examples
20  
21 =head2 SYNOPSIS
22  
23 =head3 SEISMIC UNIX NOTES
24 SUPHIDECON - PHase Inversion Deconvolution
25  
26  
27  
28 suphidecon < stdin > stdout
29  
30  
31  
32 Required parameters:
33  
34 none
35  
36 Optional parameters:
37  
38 ... time range used for wavelet extraction:
39  
40 tm=-0.1 Pre zero time (maximum phase component )
41  
42 tp=+0.4 Post zero time (minimum phase component + multiples)
43  
44 percpad=50 percentage padding for nt prior to cepstrum calculation
45  
46  
47  
48 pnoise=0.001 Pre-withening (assumed noise to prevent division by zero)
49  
50  
51  
52 Notes:
53  
54 The wavelet is separated from the reflectivity and noise based on
55  
56 their different 'smoothness' in the pseudo cepstrum domain.
57  
58 The extracted wavelet also includes multiples.
59  
60 The wavelet is reconstructed in frequency domain, end removed ",
61  
62 from the trace. (Method by Lichman and Northwood, 1996.)
63  
64  
65  
66  
67  
68  
69  
70 Credits: Potash Corporation, Saskatechwan Balasz Nemeth
71  
72 given to CWP by Potash Corporation 2008 (originally as supid.c)
73  
74  
75  
76 Reference:
77  
78 Lichman,and Northwood, 1996; Phase Inversion deconvolution for
79  
80 long and short period multiples attenuation, in
81  
82 SEG Deconvolution 2, Geophysics reprint Series No. 17
83  
84 p. 701-718, originally presented at the 54th EAGE meeting, Paris,
85  
86 June 1992, revised March 1993, revision accepted September 1994.
87  
88
89  
90  
91  
92  
93  
94  
95  
96 =head2 User's notes (Juan Lorenzo)
97 untested
98  
99 =cut
100  
101  
102 =head2 CHANGES and their DATES
103  
104 =cut
105  
106 use Moose;
107 our $VERSION = '0.0.1';
108  
109  
110 =head2 Import packages
111  
112 =cut
113  
114 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
115  
116 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
117 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
118  
119  
120 =head2 instantiation of packages
121  
122 =cut
123  
124 my $get = L_SU_global_constants->new();
125 my $Project = Project_config->new();
126 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
127 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
128 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
129  
130 my $PS_SEISMIC = $Project->PS_SEISMIC();
131  
132 my $var = $get->var();
133 my $on = $var->{_on};
134 my $off = $var->{_off};
135 my $true = $var->{_true};
136 my $false = $var->{_false};
137 my $empty_string = $var->{_empty_string};
138  
139 =head2 Encapsulated
140 hash of private variables
141  
142 =cut
143  
144 my $suphidecon = {
145 _percpad => '',
146 _pnoise => '',
147 _tm => '',
148 _tp => '',
149 _Step => '',
150 _note => '',
151  
152 };
153  
154 =head2 sub Step
155  
156 collects switches and assembles bash instructions
157 by adding the program name
158  
159 =cut
160  
161 sub Step {
162  
163 $suphidecon->{_Step} = 'suphidecon'.$suphidecon->{_Step};
164 return ( $suphidecon->{_Step} );
165  
166 }
167  
168  
169 =head2 sub note
170  
171 collects switches and assembles bash instructions
172 by adding the program name
173  
174 =cut
175  
176 sub note {
177  
178 $suphidecon->{_note} = 'suphidecon'.$suphidecon->{_note};
179 return ( $suphidecon->{_note} );
180  
181 }
182  
183  
184  
185 =head2 sub clear
186  
187 =cut
188  
189 sub clear {
190  
191 $suphidecon->{_percpad} = '';
192 $suphidecon->{_pnoise} = '';
193 $suphidecon->{_tm} = '';
194 $suphidecon->{_tp} = '';
195 $suphidecon->{_Step} = '';
196 $suphidecon->{_note} = '';
197 }
198  
199  
200 =head2 sub percpad
201  
202  
203 =cut
204  
205 sub percpad {
206  
207 my ( $self,$percpad ) = @_;
208 if ( $percpad ne $empty_string ) {
209  
210 $suphidecon->{_percpad} = $percpad;
211 $suphidecon->{_note} = $suphidecon->{_note}.' percpad='.$suphidecon->{_percpad};
212 $suphidecon->{_Step} = $suphidecon->{_Step}.' percpad='.$suphidecon->{_percpad};
213  
214 } else {
215 print("suphidecon, percpad, missing percpad,\n");
216 }
217 }
218  
219  
220 =head2 sub pnoise
221  
222  
223 =cut
224  
225 sub pnoise {
226  
227 my ( $self,$pnoise ) = @_;
228 if ( $pnoise ne $empty_string ) {
229  
230 $suphidecon->{_pnoise} = $pnoise;
231 $suphidecon->{_note} = $suphidecon->{_note}.' pnoise='.$suphidecon->{_pnoise};
232 $suphidecon->{_Step} = $suphidecon->{_Step}.' pnoise='.$suphidecon->{_pnoise};
233  
234 } else {
235 print("suphidecon, pnoise, missing pnoise,\n");
236 }
237 }
238  
239  
240 =head2 sub tm
241  
242  
243 =cut
244  
245 sub tm {
246  
247 my ( $self,$tm ) = @_;
248 if ( $tm ne $empty_string ) {
249  
250 $suphidecon->{_tm} = $tm;
251 $suphidecon->{_note} = $suphidecon->{_note}.' tm='.$suphidecon->{_tm};
252 $suphidecon->{_Step} = $suphidecon->{_Step}.' tm='.$suphidecon->{_tm};
253  
254 } else {
255 print("suphidecon, tm, missing tm,\n");
256 }
257 }
258  
259  
260 =head2 sub tp
261  
262  
263 =cut
264  
265 sub tp {
266  
267 my ( $self,$tp ) = @_;
268 if ( $tp ne $empty_string ) {
269  
270 $suphidecon->{_tp} = $tp;
271 $suphidecon->{_note} = $suphidecon->{_note}.' tp='.$suphidecon->{_tp};
272 $suphidecon->{_Step} = $suphidecon->{_Step}.' tp='.$suphidecon->{_tp};
273  
274 } else {
275 print("suphidecon, tp, missing tp,\n");
276 }
277 }
278  
279  
280 =head2 sub get_max_index
281  
282 max index = number of input variables -1
283
284 =cut
285
286 sub get_max_index {
287 my ($self) = @_;
288 my $max_index = 3;
289  
290 return($max_index);
291 }
292
293
294 1;