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

filter: Statementstmt 0.0% 0 / 126 Branchbran 0.0% 0 / 26 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 21 Podpod 0.0% 0 / 17 totaltotal 0.0% 0 / 190 CC 14 SCAR 16.2
CC
14
Cov
0%
choose
6.0
dtout
6.0
fmax
6.0
CRAP 5.1
1 package App::SeismicUnixGui::sunix::NMO_Vel_Stk::sucvs4fowler;
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 SUCVS4FOWLER --compute constant velocity stacks for input to Fowler codes
25  
26  
27  
28 Required Parameter:
29  
30 ncdps= number of input cdp gathers
31  
32 Optional Parameters:
33  
34 vminstack=1500. minimum velocity panel in m/s to output
35  
36 nvstack=180 number of stacking velocity panels to compute
37  
38 ( Let offmax be the maximum offset, fmax be
39  
40 the maximum freq to preserve, and tmute be
41  
42 the starting mute time in sec on offmax, then
43  
44 the recommended value for nvstack would be
45  
46 nvstack = 4 +(offmax*offmax*fmax)/(0.6*vmin*vmin*tmute)
47  
48 ---you may want to make do with less---)
49  
50 lmute=24 length of mute taper in ms
51  
52 nonhyp=1 1 if do mute at 2*offset/vhyp to avoid
53  
54 non-hyperbolic moveout, 0 otherwise
55  
56 vhyp=2500. velocity to use for non-hyperbolic moveout mute
57  
58 lbtaper=0 length of bottom taper in ms
59  
60 lstaper=0 length of side taper in traces
61  
62 dtout=1.5*dt output sample rate in s,
63  
64 note: typically fmax=salias*0.5/dtout
65  
66 mxfold=120 maximum number of offsets/input cmp
67  
68 salias=0.8 fraction of output frequencies to force within sloth
69  
70 antialias limit. This controls muting by offset of
71  
72 the input data prior to computing the cv stacks
73  
74 for values of choose=1 or choose=2.
75  
76 Required trace header words on input are ns, dt, cdp, offset.
77  
78  
79  
80  
81  
82  
83  
84 Author: (Visitor to CSM from Mobil): John E. Anderson, Spring 1994
85  
86
87  
88 References:
89  
90  
91  
92 Fowler, P., 1988, Ph.D. Thesis, Stanford University.
93  
94 Anderson, J.E., Alkhalifah, T., and Tsvankin, I., 1994, Fowler
95  
96 DMO and time migration for transversely isotropic media,
97  
98 1994 CWP project review
99  
100  
101  
102  
103  
104  
105  
106 =head2 User's notes (Juan Lorenzo)
107 untested
108  
109 =cut
110  
111  
112 =head2 CHANGES and their DATES
113  
114 =cut
115  
116 use Moose;
117 our $VERSION = '0.0.1';
118  
119  
120 =head2 Import packages
121  
122 =cut
123  
124 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
125  
126 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
127 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
128  
129  
130 =head2 instantiation of packages
131  
132 =cut
133  
134 my $get = L_SU_global_constants->new();
135 my $Project = Project_config->new();
136 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
137 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
138 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
139  
140 my $PS_SEISMIC = $Project->PS_SEISMIC();
141  
142 my $var = $get->var();
143 my $on = $var->{_on};
144 my $off = $var->{_off};
145 my $true = $var->{_true};
146 my $false = $var->{_false};
147 my $empty_string = $var->{_empty_string};
148  
149 =head2 Encapsulated
150 hash of private variables
151  
152 =cut
153  
154 my $sucvs4fowler = {
155 _choose => '',
156 _dtout => '',
157 _fmax => '',
158 _lbtaper => '',
159 _lmute => '',
160 _lstaper => '',
161 _mxfold => '',
162 _ncdps => '',
163 _nonhyp => '',
164 _nvstack => '',
165 _salias => '',
166 _vhyp => '',
167 _vminstack => '',
168 _Step => '',
169 _note => '',
170  
171 };
172  
173 =head2 sub Step
174  
175 collects switches and assembles bash instructions
176 by adding the program name
177  
178 =cut
179  
180 sub Step {
181  
182 $sucvs4fowler->{_Step} = 'sucvs4fowler'.$sucvs4fowler->{_Step};
183 return ( $sucvs4fowler->{_Step} );
184  
185 }
186  
187  
188 =head2 sub note
189  
190 collects switches and assembles bash instructions
191 by adding the program name
192  
193 =cut
194  
195 sub note {
196  
197 $sucvs4fowler->{_note} = 'sucvs4fowler'.$sucvs4fowler->{_note};
198 return ( $sucvs4fowler->{_note} );
199  
200 }
201  
202  
203  
204 =head2 sub clear
205  
206 =cut
207  
208 sub clear {
209  
210 $sucvs4fowler->{_choose} = '';
211 $sucvs4fowler->{_dtout} = '';
212 $sucvs4fowler->{_fmax} = '';
213 $sucvs4fowler->{_lbtaper} = '';
214 $sucvs4fowler->{_lmute} = '';
215 $sucvs4fowler->{_lstaper} = '';
216 $sucvs4fowler->{_mxfold} = '';
217 $sucvs4fowler->{_ncdps} = '';
218 $sucvs4fowler->{_nonhyp} = '';
219 $sucvs4fowler->{_nvstack} = '';
220 $sucvs4fowler->{_salias} = '';
221 $sucvs4fowler->{_vhyp} = '';
222 $sucvs4fowler->{_vminstack} = '';
223 $sucvs4fowler->{_Step} = '';
224 $sucvs4fowler->{_note} = '';
225 }
226  
227  
228 =head2 sub choose
229  
230  
231 =cut
232  
233 sub choose {
234  
235 my ( $self,$choose ) = @_;
236 if ( $choose ne $empty_string ) {
237  
238 $sucvs4fowler->{_choose} = $choose;
239 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' choose='.$sucvs4fowler->{_choose};
240 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' choose='.$sucvs4fowler->{_choose};
241  
242 } else {
243 print("sucvs4fowler, choose, missing choose,\n");
244 }
245 }
246  
247  
248 =head2 sub dtout
249  
250  
251 =cut
252  
253 sub dtout {
254  
255 my ( $self,$dtout ) = @_;
256 if ( $dtout ne $empty_string ) {
257  
258 $sucvs4fowler->{_dtout} = $dtout;
259 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' dtout='.$sucvs4fowler->{_dtout};
260 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' dtout='.$sucvs4fowler->{_dtout};
261  
262 } else {
263 print("sucvs4fowler, dtout, missing dtout,\n");
264 }
265 }
266  
267  
268 =head2 sub fmax
269  
270  
271 =cut
272  
273 sub fmax {
274  
275 my ( $self,$fmax ) = @_;
276 if ( $fmax ne $empty_string ) {
277  
278 $sucvs4fowler->{_fmax} = $fmax;
279 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' fmax='.$sucvs4fowler->{_fmax};
280 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' fmax='.$sucvs4fowler->{_fmax};
281  
282 } else {
283 print("sucvs4fowler, fmax, missing fmax,\n");
284 }
285 }
286  
287  
288 =head2 sub lbtaper
289  
290  
291 =cut
292  
293 sub lbtaper {
294  
295 my ( $self,$lbtaper ) = @_;
296 if ( $lbtaper ne $empty_string ) {
297  
298 $sucvs4fowler->{_lbtaper} = $lbtaper;
299 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' lbtaper='.$sucvs4fowler->{_lbtaper};
300 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' lbtaper='.$sucvs4fowler->{_lbtaper};
301  
302 } else {
303 print("sucvs4fowler, lbtaper, missing lbtaper,\n");
304 }
305 }
306  
307  
308 =head2 sub lmute
309  
310  
311 =cut
312  
313 sub lmute {
314  
315 my ( $self,$lmute ) = @_;
316 if ( $lmute ne $empty_string ) {
317  
318 $sucvs4fowler->{_lmute} = $lmute;
319 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' lmute='.$sucvs4fowler->{_lmute};
320 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' lmute='.$sucvs4fowler->{_lmute};
321  
322 } else {
323 print("sucvs4fowler, lmute, missing lmute,\n");
324 }
325 }
326  
327  
328 =head2 sub lstaper
329  
330  
331 =cut
332  
333 sub lstaper {
334  
335 my ( $self,$lstaper ) = @_;
336 if ( $lstaper ne $empty_string ) {
337  
338 $sucvs4fowler->{_lstaper} = $lstaper;
339 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' lstaper='.$sucvs4fowler->{_lstaper};
340 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' lstaper='.$sucvs4fowler->{_lstaper};
341  
342 } else {
343 print("sucvs4fowler, lstaper, missing lstaper,\n");
344 }
345 }
346  
347  
348 =head2 sub mxfold
349  
350  
351 =cut
352  
353 sub mxfold {
354  
355 my ( $self,$mxfold ) = @_;
356 if ( $mxfold ne $empty_string ) {
357  
358 $sucvs4fowler->{_mxfold} = $mxfold;
359 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' mxfold='.$sucvs4fowler->{_mxfold};
360 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' mxfold='.$sucvs4fowler->{_mxfold};
361  
362 } else {
363 print("sucvs4fowler, mxfold, missing mxfold,\n");
364 }
365 }
366  
367  
368 =head2 sub ncdps
369  
370  
371 =cut
372  
373 sub ncdps {
374  
375 my ( $self,$ncdps ) = @_;
376 if ( $ncdps ne $empty_string ) {
377  
378 $sucvs4fowler->{_ncdps} = $ncdps;
379 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' ncdps='.$sucvs4fowler->{_ncdps};
380 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' ncdps='.$sucvs4fowler->{_ncdps};
381  
382 } else {
383 print("sucvs4fowler, ncdps, missing ncdps,\n");
384 }
385 }
386  
387  
388 =head2 sub nonhyp
389  
390  
391 =cut
392  
393 sub nonhyp {
394  
395 my ( $self,$nonhyp ) = @_;
396 if ( $nonhyp ne $empty_string ) {
397  
398 $sucvs4fowler->{_nonhyp} = $nonhyp;
399 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' nonhyp='.$sucvs4fowler->{_nonhyp};
400 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' nonhyp='.$sucvs4fowler->{_nonhyp};
401  
402 } else {
403 print("sucvs4fowler, nonhyp, missing nonhyp,\n");
404 }
405 }
406  
407  
408 =head2 sub nvstack
409  
410  
411 =cut
412  
413 sub nvstack {
414  
415 my ( $self,$nvstack ) = @_;
416 if ( $nvstack ne $empty_string ) {
417  
418 $sucvs4fowler->{_nvstack} = $nvstack;
419 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' nvstack='.$sucvs4fowler->{_nvstack};
420 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' nvstack='.$sucvs4fowler->{_nvstack};
421  
422 } else {
423 print("sucvs4fowler, nvstack, missing nvstack,\n");
424 }
425 }
426  
427  
428 =head2 sub salias
429  
430  
431 =cut
432  
433 sub salias {
434  
435 my ( $self,$salias ) = @_;
436 if ( $salias ne $empty_string ) {
437  
438 $sucvs4fowler->{_salias} = $salias;
439 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' salias='.$sucvs4fowler->{_salias};
440 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' salias='.$sucvs4fowler->{_salias};
441  
442 } else {
443 print("sucvs4fowler, salias, missing salias,\n");
444 }
445 }
446  
447  
448 =head2 sub vhyp
449  
450  
451 =cut
452  
453 sub vhyp {
454  
455 my ( $self,$vhyp ) = @_;
456 if ( $vhyp ne $empty_string ) {
457  
458 $sucvs4fowler->{_vhyp} = $vhyp;
459 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' vhyp='.$sucvs4fowler->{_vhyp};
460 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' vhyp='.$sucvs4fowler->{_vhyp};
461  
462 } else {
463 print("sucvs4fowler, vhyp, missing vhyp,\n");
464 }
465 }
466  
467  
468 =head2 sub vminstack
469  
470  
471 =cut
472  
473 sub vminstack {
474  
475 my ( $self,$vminstack ) = @_;
476 if ( $vminstack ne $empty_string ) {
477  
478 $sucvs4fowler->{_vminstack} = $vminstack;
479 $sucvs4fowler->{_note} = $sucvs4fowler->{_note}.' vminstack='.$sucvs4fowler->{_vminstack};
480 $sucvs4fowler->{_Step} = $sucvs4fowler->{_Step}.' vminstack='.$sucvs4fowler->{_vminstack};
481  
482 } else {
483 print("sucvs4fowler, vminstack, missing vminstack,\n");
484 }
485 }
486  
487  
488 =head2 sub get_max_index
489  
490 max index = number of input variables -1
491
492 =cut
493
494 sub get_max_index {
495 my ($self) = @_;
496 my $max_index = 12;
497  
498 return($max_index);
499 }
500
501
502 1;