lib/App/SeismicUnixGui/sunix/NMO_Vel_Stk/sutihaledmo.pm untested

filter: Statementstmt 0.0% 0 / 105 Branchbran 0.0% 0 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 18 Podpod 0.0% 0 / 14 totaltotal 0.0% 0 / 157 CC 11 SCAR 15.8
CC
11
Cov
0%
d
6.0
dx
6.0
e
6.0
CRAP 4.9
1 package App::SeismicUnixGui::sunix::NMO_Vel_Stk::sutihaledmo;
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 SUTIHALEDMO - TI Hale Dip MoveOut (based on Hale's PhD thesis)
25  
26  
27  
28 sutihaledmo <infile >outfile [optional parameters]
29  
30  
31  
32  
33  
34 Required Parameters:
35  
36 nxmax maximum number of midpoints in common offset gather
37  
38  
39  
40 Optional Parameters:
41  
42 option=1 1 = traditional Hale DMO (from PhD thesis)
43  
44 option=2 : Bleistein's true amplitude DMO
45  
46 option=3 : Bleistein's cos*cos weighted DMO
47  
48 option=4 : Zhang's DMO
49  
50 option=5 : Tsvankin's anisotropic DMO
51  
52 option=6 : Tsvankin's VTI DMO weak anisotropy approximation
53  
54 dx=50. midpoint sampling interval between traces
55  
56 in a common offset gather. (usually shot
57  
58 interval in meters)
59  
60 v=1500.0 velocity (in meters/sec)
61  
62 (must enter a positive value for option=3)
63  
64 (for excluding evanescent energy)
65  
66 h=200.0 source-receiver half-offset (in meters)
67  
68 ntpad=0 number of time samples to pad
69  
70 nxpad=h/dx number of midpoints to pad
71  
72 file=vnmo name of file with vnmo as a function of p
73  
74 used for option=5--otherwise not used
75  
76 (Generate this file by running program
77  
78 sutivel with appropriate list of Thomsen's
79  
80 parameters.)
81  
82 e=0. Thompsen's epsilon
83  
84 d=0. Thompsen's delta
85  
86  
87  
88 Note:
89  
90  
91  
92 This module assumes a single common offset gather after NMO is
93  
94 to be input, DMO corrected, and output. It is useful for computing
95  
96 theoretical DMO impulse responses. The Hale algorithm is
97  
98 computationally intensive and not commonly used for bulk processing
99  
100 of all of the offsets on a 2-D line as there are cheaper alternative
101  
102 algorithms. The Hale algorithm is commonly used in theoretical studies.
103  
104 Bulk processing for multiple common offset gathers is typically done
105  
106 using other modules.
107  
108  
109  
110 Test run: suspike | sutihaledmo nxmax=32 option=1 v=1500 | suxwigb &
111  
112  
113  
114  
115  
116 Author: (Visitor to CSM from Mobil) John E. Anderson Spring 1994
117  
118 References: Anderson, J.E., and Tsvankin, I., 1994, Dip-moveout by
119  
120 Fourier transform in anisotropic media, CWP-146
121  
122  
123  
124 =head2 User's notes (Juan Lorenzo)
125 untested
126  
127 =cut
128  
129  
130 =head2 CHANGES and their DATES
131  
132 =cut
133  
134 use Moose;
135 our $VERSION = '0.0.1';
136  
137  
138 =head2 Import packages
139  
140 =cut
141  
142 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
143  
144 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
145 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
146  
147  
148 =head2 instantiation of packages
149  
150 =cut
151  
152 my $get = L_SU_global_constants->new();
153 my $Project = Project_config->new();
154 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
155 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
156 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
157  
158 my $PS_SEISMIC = $Project->PS_SEISMIC();
159  
160 my $var = $get->var();
161 my $on = $var->{_on};
162 my $off = $var->{_off};
163 my $true = $var->{_true};
164 my $false = $var->{_false};
165 my $empty_string = $var->{_empty_string};
166  
167 =head2 Encapsulated
168 hash of private variables
169  
170 =cut
171  
172 my $sutihaledmo = {
173 _d => '',
174 _dx => '',
175 _e => '',
176 _file => '',
177 _h => '',
178 _ntpad => '',
179 _nxmax => '',
180 _nxpad => '',
181 _option => '',
182 _v => '',
183 _Step => '',
184 _note => '',
185  
186 };
187  
188 =head2 sub Step
189  
190 collects switches and assembles bash instructions
191 by adding the program name
192  
193 =cut
194  
195 sub Step {
196  
197 $sutihaledmo->{_Step} = 'sutihaledmo'.$sutihaledmo->{_Step};
198 return ( $sutihaledmo->{_Step} );
199  
200 }
201  
202  
203 =head2 sub note
204  
205 collects switches and assembles bash instructions
206 by adding the program name
207  
208 =cut
209  
210 sub note {
211  
212 $sutihaledmo->{_note} = 'sutihaledmo'.$sutihaledmo->{_note};
213 return ( $sutihaledmo->{_note} );
214  
215 }
216  
217  
218  
219 =head2 sub clear
220  
221 =cut
222  
223 sub clear {
224  
225 $sutihaledmo->{_d} = '';
226 $sutihaledmo->{_dx} = '';
227 $sutihaledmo->{_e} = '';
228 $sutihaledmo->{_file} = '';
229 $sutihaledmo->{_h} = '';
230 $sutihaledmo->{_ntpad} = '';
231 $sutihaledmo->{_nxmax} = '';
232 $sutihaledmo->{_nxpad} = '';
233 $sutihaledmo->{_option} = '';
234 $sutihaledmo->{_v} = '';
235 $sutihaledmo->{_Step} = '';
236 $sutihaledmo->{_note} = '';
237 }
238  
239  
240 =head2 sub d
241  
242  
243 =cut
244  
245 sub d {
246  
247 my ( $self,$d ) = @_;
248 if ( $d ne $empty_string ) {
249  
250 $sutihaledmo->{_d} = $d;
251 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' d='.$sutihaledmo->{_d};
252 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' d='.$sutihaledmo->{_d};
253  
254 } else {
255 print("sutihaledmo, d, missing d,\n");
256 }
257 }
258  
259  
260 =head2 sub dx
261  
262  
263 =cut
264  
265 sub dx {
266  
267 my ( $self,$dx ) = @_;
268 if ( $dx ne $empty_string ) {
269  
270 $sutihaledmo->{_dx} = $dx;
271 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' dx='.$sutihaledmo->{_dx};
272 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' dx='.$sutihaledmo->{_dx};
273  
274 } else {
275 print("sutihaledmo, dx, missing dx,\n");
276 }
277 }
278  
279  
280 =head2 sub e
281  
282  
283 =cut
284  
285 sub e {
286  
287 my ( $self,$e ) = @_;
288 if ( $e ne $empty_string ) {
289  
290 $sutihaledmo->{_e} = $e;
291 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' e='.$sutihaledmo->{_e};
292 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' e='.$sutihaledmo->{_e};
293  
294 } else {
295 print("sutihaledmo, e, missing e,\n");
296 }
297 }
298  
299  
300 =head2 sub file
301  
302  
303 =cut
304  
305 sub file {
306  
307 my ( $self,$file ) = @_;
308 if ( $file ne $empty_string ) {
309  
310 $sutihaledmo->{_file} = $file;
311 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' file='.$sutihaledmo->{_file};
312 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' file='.$sutihaledmo->{_file};
313  
314 } else {
315 print("sutihaledmo, file, missing file,\n");
316 }
317 }
318  
319  
320 =head2 sub h
321  
322  
323 =cut
324  
325 sub h {
326  
327 my ( $self,$h ) = @_;
328 if ( $h ne $empty_string ) {
329  
330 $sutihaledmo->{_h} = $h;
331 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' h='.$sutihaledmo->{_h};
332 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' h='.$sutihaledmo->{_h};
333  
334 } else {
335 print("sutihaledmo, h, missing h,\n");
336 }
337 }
338  
339  
340 =head2 sub ntpad
341  
342  
343 =cut
344  
345 sub ntpad {
346  
347 my ( $self,$ntpad ) = @_;
348 if ( $ntpad ne $empty_string ) {
349  
350 $sutihaledmo->{_ntpad} = $ntpad;
351 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' ntpad='.$sutihaledmo->{_ntpad};
352 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' ntpad='.$sutihaledmo->{_ntpad};
353  
354 } else {
355 print("sutihaledmo, ntpad, missing ntpad,\n");
356 }
357 }
358  
359  
360 =head2 sub nxmax
361  
362  
363 =cut
364  
365 sub nxmax {
366  
367 my ( $self,$nxmax ) = @_;
368 if ( $nxmax ne $empty_string ) {
369  
370 $sutihaledmo->{_nxmax} = $nxmax;
371 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' nxmax='.$sutihaledmo->{_nxmax};
372 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' nxmax='.$sutihaledmo->{_nxmax};
373  
374 } else {
375 print("sutihaledmo, nxmax, missing nxmax,\n");
376 }
377 }
378  
379  
380 =head2 sub nxpad
381  
382  
383 =cut
384  
385 sub nxpad {
386  
387 my ( $self,$nxpad ) = @_;
388 if ( $nxpad ne $empty_string ) {
389  
390 $sutihaledmo->{_nxpad} = $nxpad;
391 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' nxpad='.$sutihaledmo->{_nxpad};
392 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' nxpad='.$sutihaledmo->{_nxpad};
393  
394 } else {
395 print("sutihaledmo, nxpad, missing nxpad,\n");
396 }
397 }
398  
399  
400 =head2 sub option
401  
402  
403 =cut
404  
405 sub option {
406  
407 my ( $self,$option ) = @_;
408 if ( $option ne $empty_string ) {
409  
410 $sutihaledmo->{_option} = $option;
411 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' option='.$sutihaledmo->{_option};
412 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' option='.$sutihaledmo->{_option};
413  
414 } else {
415 print("sutihaledmo, option, missing option,\n");
416 }
417 }
418  
419  
420 =head2 sub v
421  
422  
423 =cut
424  
425 sub v {
426  
427 my ( $self,$v ) = @_;
428 if ( $v ne $empty_string ) {
429  
430 $sutihaledmo->{_v} = $v;
431 $sutihaledmo->{_note} = $sutihaledmo->{_note}.' v='.$sutihaledmo->{_v};
432 $sutihaledmo->{_Step} = $sutihaledmo->{_Step}.' v='.$sutihaledmo->{_v};
433  
434 } else {
435 print("sutihaledmo, v, missing v,\n");
436 }
437 }
438  
439  
440 =head2 sub get_max_index
441  
442 max index = number of input variables -1
443
444 =cut
445
446 sub get_max_index {
447 my ($self) = @_;
448 my $max_index = 9;
449  
450 return($max_index);
451 }
452
453
454 1;