lib/App/SeismicUnixGui/sunix/migration/sumigpsti.pm untested

filter: Statementstmt 0.0% 0 / 119 Branchbran 0.0% 0 / 24 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 20 Podpod 0.0% 0 / 16 totaltotal 0.0% 0 / 179 CC 13 SCAR 16.1
CC
13
Cov
0%
dt
6.0
dx
6.0
etafile
6.0
CRAP 5.0
1 package App::SeismicUnixGui::sunix::migration::sumigpsti;
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 SUMIGPSTI - MIGration by Phase Shift for TI media with turning rays
25  
26  
27  
28 sumigpsti <stdin >stdout [optional parms]
29  
30  
31  
32 Required Parameters:
33  
34 None
35  
36  
37  
38 Optional Parameters:
39  
40 dt=from header(dt) or .004 time sampling interval
41  
42 dx=from header(d2) or 1.0 distance between sucessive cdp's
43  
44 ffil=
45  
46 0,0,0.5/dt,0.5/dt trapezoidal window of frequencies to migrate
47  
48 tmig=0.0 times corresponding to interval velocities in vmig
49  
50 vnmig=1500.0 interval NMO velocities corresponding to times in tmig
51  
52 vmig=1500.0 interval velocities corresponding to times in tmig
53  
54 etamig=0.0 interval eta values corresponding to times in tmig
55  
56 vnfile= binary (non-ascii) file containing NMO velocities vn(t)
57  
58 vfile= binary (non-ascii) file containing velocities v(t)
59  
60 etafile= binary (non-ascii) file containing eta values eta(t)
61  
62 nxpad=0 number of cdps to pad with zeros before FFT
63  
64 ltaper=0 length of linear taper for left and right edges ",
65  
66 verbose=0 =1 for diagnostic print
67  
68  
69  
70 Notes:
71  
72 Input traces must be sorted by either increasing or decreasing cdp.
73  
74  
75  
76 The tmig, vnmig, vmig and etamig arrays specify an interval values
77  
78 function of time. Linear interpolation and constant extrapolation is
79  
80 used to determine interval velocities at times not specified. Values
81  
82 specified in tmig must increase monotonically.
83  
84 Alternatively, interval velocities may be stored in a binary file
85  
86 containing one velocity for every time sample. If vnfile is specified,
87  
88 then the tmig and vnmig arrays are ignored.
89  
90  
91  
92 The time of first sample is assumed to be zero, regardless of the value
93  
94 of the trace header field delrt.
95  
96  
97  
98 Trace header fields accessed: ns and dt
99  
100  
101  
102  
103  
104 =head2 User's notes (Juan Lorenzo)
105 untested
106  
107 =cut
108  
109  
110 =head2 CHANGES and their DATES
111  
112 =cut
113  
114 use Moose;
115 our $VERSION = '0.0.1';
116  
117  
118 =head2 Import packages
119  
120 =cut
121  
122 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
123  
124 use App::SeismicUnixGui::misc::SeismicUnix qw($go $in $off $on $out $ps $to $suffix_ascii $suffix_bin $suffix_ps $suffix_segy $suffix_su);
125 use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config';
126  
127  
128 =head2 instantiation of packages
129  
130 =cut
131  
132 my $get = L_SU_global_constants->new();
133 my $Project = Project_config->new();
134 my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU();
135 my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN();
136 my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT();
137  
138 my $PS_SEISMIC = $Project->PS_SEISMIC();
139  
140 my $var = $get->var();
141 my $on = $var->{_on};
142 my $off = $var->{_off};
143 my $true = $var->{_true};
144 my $false = $var->{_false};
145 my $empty_string = $var->{_empty_string};
146  
147 =head2 Encapsulated
148 hash of private variables
149  
150 =cut
151  
152 my $sumigpsti = {
153 _dt => '',
154 _dx => '',
155 _etafile => '',
156 _etamig => '',
157 _ltaper => '',
158 _nxpad => '',
159 _tmig => '',
160 _verbose => '',
161 _vfile => '',
162 _vmig => '',
163 _vnfile => '',
164 _vnmig => '',
165 _Step => '',
166 _note => '',
167  
168 };
169  
170 =head2 sub Step
171  
172 collects switches and assembles bash instructions
173 by adding the program name
174  
175 =cut
176  
177 sub Step {
178  
179 $sumigpsti->{_Step} = 'sumigpsti'.$sumigpsti->{_Step};
180 return ( $sumigpsti->{_Step} );
181  
182 }
183  
184  
185 =head2 sub note
186  
187 collects switches and assembles bash instructions
188 by adding the program name
189  
190 =cut
191  
192 sub note {
193  
194 $sumigpsti->{_note} = 'sumigpsti'.$sumigpsti->{_note};
195 return ( $sumigpsti->{_note} );
196  
197 }
198  
199  
200  
201 =head2 sub clear
202  
203 =cut
204  
205 sub clear {
206  
207 $sumigpsti->{_dt} = '';
208 $sumigpsti->{_dx} = '';
209 $sumigpsti->{_etafile} = '';
210 $sumigpsti->{_etamig} = '';
211 $sumigpsti->{_ltaper} = '';
212 $sumigpsti->{_nxpad} = '';
213 $sumigpsti->{_tmig} = '';
214 $sumigpsti->{_verbose} = '';
215 $sumigpsti->{_vfile} = '';
216 $sumigpsti->{_vmig} = '';
217 $sumigpsti->{_vnfile} = '';
218 $sumigpsti->{_vnmig} = '';
219 $sumigpsti->{_Step} = '';
220 $sumigpsti->{_note} = '';
221 }
222  
223  
224 =head2 sub dt
225  
226  
227 =cut
228  
229 sub dt {
230  
231 my ( $self,$dt ) = @_;
232 if ( $dt ne $empty_string ) {
233  
234 $sumigpsti->{_dt} = $dt;
235 $sumigpsti->{_note} = $sumigpsti->{_note}.' dt='.$sumigpsti->{_dt};
236 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' dt='.$sumigpsti->{_dt};
237  
238 } else {
239 print("sumigpsti, dt, missing dt,\n");
240 }
241 }
242  
243  
244 =head2 sub dx
245  
246  
247 =cut
248  
249 sub dx {
250  
251 my ( $self,$dx ) = @_;
252 if ( $dx ne $empty_string ) {
253  
254 $sumigpsti->{_dx} = $dx;
255 $sumigpsti->{_note} = $sumigpsti->{_note}.' dx='.$sumigpsti->{_dx};
256 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' dx='.$sumigpsti->{_dx};
257  
258 } else {
259 print("sumigpsti, dx, missing dx,\n");
260 }
261 }
262  
263  
264 =head2 sub etafile
265  
266  
267 =cut
268  
269 sub etafile {
270  
271 my ( $self,$etafile ) = @_;
272 if ( $etafile ne $empty_string ) {
273  
274 $sumigpsti->{_etafile} = $etafile;
275 $sumigpsti->{_note} = $sumigpsti->{_note}.' etafile='.$sumigpsti->{_etafile};
276 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' etafile='.$sumigpsti->{_etafile};
277  
278 } else {
279 print("sumigpsti, etafile, missing etafile,\n");
280 }
281 }
282  
283  
284 =head2 sub etamig
285  
286  
287 =cut
288  
289 sub etamig {
290  
291 my ( $self,$etamig ) = @_;
292 if ( $etamig ne $empty_string ) {
293  
294 $sumigpsti->{_etamig} = $etamig;
295 $sumigpsti->{_note} = $sumigpsti->{_note}.' etamig='.$sumigpsti->{_etamig};
296 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' etamig='.$sumigpsti->{_etamig};
297  
298 } else {
299 print("sumigpsti, etamig, missing etamig,\n");
300 }
301 }
302  
303  
304 =head2 sub ltaper
305  
306  
307 =cut
308  
309 sub ltaper {
310  
311 my ( $self,$ltaper ) = @_;
312 if ( $ltaper ne $empty_string ) {
313  
314 $sumigpsti->{_ltaper} = $ltaper;
315 $sumigpsti->{_note} = $sumigpsti->{_note}.' ltaper='.$sumigpsti->{_ltaper};
316 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' ltaper='.$sumigpsti->{_ltaper};
317  
318 } else {
319 print("sumigpsti, ltaper, missing ltaper,\n");
320 }
321 }
322  
323  
324 =head2 sub nxpad
325  
326  
327 =cut
328  
329 sub nxpad {
330  
331 my ( $self,$nxpad ) = @_;
332 if ( $nxpad ne $empty_string ) {
333  
334 $sumigpsti->{_nxpad} = $nxpad;
335 $sumigpsti->{_note} = $sumigpsti->{_note}.' nxpad='.$sumigpsti->{_nxpad};
336 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' nxpad='.$sumigpsti->{_nxpad};
337  
338 } else {
339 print("sumigpsti, nxpad, missing nxpad,\n");
340 }
341 }
342  
343  
344 =head2 sub tmig
345  
346  
347 =cut
348  
349 sub tmig {
350  
351 my ( $self,$tmig ) = @_;
352 if ( $tmig ne $empty_string ) {
353  
354 $sumigpsti->{_tmig} = $tmig;
355 $sumigpsti->{_note} = $sumigpsti->{_note}.' tmig='.$sumigpsti->{_tmig};
356 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' tmig='.$sumigpsti->{_tmig};
357  
358 } else {
359 print("sumigpsti, tmig, missing tmig,\n");
360 }
361 }
362  
363  
364 =head2 sub verbose
365  
366  
367 =cut
368  
369 sub verbose {
370  
371 my ( $self,$verbose ) = @_;
372 if ( $verbose ne $empty_string ) {
373  
374 $sumigpsti->{_verbose} = $verbose;
375 $sumigpsti->{_note} = $sumigpsti->{_note}.' verbose='.$sumigpsti->{_verbose};
376 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' verbose='.$sumigpsti->{_verbose};
377  
378 } else {
379 print("sumigpsti, verbose, missing verbose,\n");
380 }
381 }
382  
383  
384 =head2 sub vfile
385  
386  
387 =cut
388  
389 sub vfile {
390  
391 my ( $self,$vfile ) = @_;
392 if ( $vfile ne $empty_string ) {
393  
394 $sumigpsti->{_vfile} = $vfile;
395 $sumigpsti->{_note} = $sumigpsti->{_note}.' vfile='.$sumigpsti->{_vfile};
396 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' vfile='.$sumigpsti->{_vfile};
397  
398 } else {
399 print("sumigpsti, vfile, missing vfile,\n");
400 }
401 }
402  
403  
404 =head2 sub vmig
405  
406  
407 =cut
408  
409 sub vmig {
410  
411 my ( $self,$vmig ) = @_;
412 if ( $vmig ne $empty_string ) {
413  
414 $sumigpsti->{_vmig} = $vmig;
415 $sumigpsti->{_note} = $sumigpsti->{_note}.' vmig='.$sumigpsti->{_vmig};
416 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' vmig='.$sumigpsti->{_vmig};
417  
418 } else {
419 print("sumigpsti, vmig, missing vmig,\n");
420 }
421 }
422  
423  
424 =head2 sub vnfile
425  
426  
427 =cut
428  
429 sub vnfile {
430  
431 my ( $self,$vnfile ) = @_;
432 if ( $vnfile ne $empty_string ) {
433  
434 $sumigpsti->{_vnfile} = $vnfile;
435 $sumigpsti->{_note} = $sumigpsti->{_note}.' vnfile='.$sumigpsti->{_vnfile};
436 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' vnfile='.$sumigpsti->{_vnfile};
437  
438 } else {
439 print("sumigpsti, vnfile, missing vnfile,\n");
440 }
441 }
442  
443  
444 =head2 sub vnmig
445  
446  
447 =cut
448  
449 sub vnmig {
450  
451 my ( $self,$vnmig ) = @_;
452 if ( $vnmig ne $empty_string ) {
453  
454 $sumigpsti->{_vnmig} = $vnmig;
455 $sumigpsti->{_note} = $sumigpsti->{_note}.' vnmig='.$sumigpsti->{_vnmig};
456 $sumigpsti->{_Step} = $sumigpsti->{_Step}.' vnmig='.$sumigpsti->{_vnmig};
457  
458 } else {
459 print("sumigpsti, vnmig, missing vnmig,\n");
460 }
461 }
462  
463  
464 =head2 sub get_max_index
465  
466 max index = number of input variables -1
467
468 =cut
469
470 sub get_max_index {
471 my ($self) = @_;
472 my $max_index = 11;
473  
474 return($max_index);
475 }
476
477
478 1;