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

filter: Statementstmt 0.0% 0 / 140 Branchbran 0.0% 0 / 30 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 23 Podpod 0.0% 0 / 19 totaltotal 0.0% 0 / 212 CC 16 SCAR 16.4
CC
16
Cov
0%
afile
6.0
cip
6.0
dfile
6.0
CRAP 5.2
1 package App::SeismicUnixGui::sunix::NMO_Vel_Stk::dzdv;
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 DZDV - determine depth derivative with respect to the velocity ",
25  
26 parameter, dz/dv, by ratios of migrated data with the primary
27  
28 amplitude and those with the extra amplitude
29  
30  
31  
32 dzdv <infile afile=afile dfile=dfile>outfile [parameters]
33  
34  
35  
36 Required Parameters:
37  
38 infile= input of common image gathers with primary amplitude
39  
40 afile= input of common image gathers with extra amplitude
41  
42 dfile= output of imaged depths in common image gathers
43  
44 outfile= output of dz/dv at the imaged points
45  
46 nx= number of migrated traces
47  
48 nz= number of points in migrated traces
49  
50 dx= horizontal spacing of migrated trace
51  
52 dz= vertical spacing of output trace
53  
54 fx= x-coordinate of first migrated trace
55  
56 fz= z-coordinate of first point in migrated trace
57  
58 off0= first offset in common image gathers
59  
60 noff= number of offsets in common image gathers
61  
62 doff= offset increment in common image gathers
63  
64 cip=x1,z1,r1,..., cip=xn,zn,rn description of input CIGS
65  
66 x x-value of a common image point
67  
68 z z-value of a common image point at zero offset
69  
70 r r-parameter in a common image gather
71  
72  
73  
74 Optional Parameters:
75  
76 nxw, nzw=0 window widths along x- and z-directions in
77  
78 which points are contributed in solving dz/dv.
79  
80  
81  
82  
83  
84 Notes:
85  
86 This program is used as part of the velocity analysis technique developed
87  
88 by Zhenyue Liu, CWP:1995.
89  
90  
91  
92 Author: CWP: Zhenyue Liu, 1995
93  
94
95  
96 Reference:
97  
98 Liu, Z. 1995, "Migration Velocity Analysis", Ph.D. Thesis, Colorado
99  
100 School of Mines, CWP report #168.
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 $dzdv = {
155 _afile => '',
156 _cip => '',
157 _dfile => '',
158 _doff => '',
159 _dx => '',
160 _dz => '',
161 _fx => '',
162 _fz => '',
163 _infile => '',
164 _noff => '',
165 _nx => '',
166 _nz => '',
167 _nzw => '',
168 _off0 => '',
169 _outfile => '',
170 _Step => '',
171 _note => '',
172  
173 };
174  
175 =head2 sub Step
176  
177 collects switches and assembles bash instructions
178 by adding the program name
179  
180 =cut
181  
182 sub Step {
183  
184 $dzdv->{_Step} = 'dzdv'.$dzdv->{_Step};
185 return ( $dzdv->{_Step} );
186  
187 }
188  
189  
190 =head2 sub note
191  
192 collects switches and assembles bash instructions
193 by adding the program name
194  
195 =cut
196  
197 sub note {
198  
199 $dzdv->{_note} = 'dzdv'.$dzdv->{_note};
200 return ( $dzdv->{_note} );
201  
202 }
203  
204  
205  
206 =head2 sub clear
207  
208 =cut
209  
210 sub clear {
211  
212 $dzdv->{_afile} = '';
213 $dzdv->{_cip} = '';
214 $dzdv->{_dfile} = '';
215 $dzdv->{_doff} = '';
216 $dzdv->{_dx} = '';
217 $dzdv->{_dz} = '';
218 $dzdv->{_fx} = '';
219 $dzdv->{_fz} = '';
220 $dzdv->{_infile} = '';
221 $dzdv->{_noff} = '';
222 $dzdv->{_nx} = '';
223 $dzdv->{_nz} = '';
224 $dzdv->{_nzw} = '';
225 $dzdv->{_off0} = '';
226 $dzdv->{_outfile} = '';
227 $dzdv->{_Step} = '';
228 $dzdv->{_note} = '';
229 }
230  
231  
232 =head2 sub afile
233  
234  
235 =cut
236  
237 sub afile {
238  
239 my ( $self,$afile ) = @_;
240 if ( $afile ne $empty_string ) {
241  
242 $dzdv->{_afile} = $afile;
243 $dzdv->{_note} = $dzdv->{_note}.' afile='.$dzdv->{_afile};
244 $dzdv->{_Step} = $dzdv->{_Step}.' afile='.$dzdv->{_afile};
245  
246 } else {
247 print("dzdv, afile, missing afile,\n");
248 }
249 }
250  
251  
252 =head2 sub cip
253  
254  
255 =cut
256  
257 sub cip {
258  
259 my ( $self,$cip ) = @_;
260 if ( $cip ne $empty_string ) {
261  
262 $dzdv->{_cip} = $cip;
263 $dzdv->{_note} = $dzdv->{_note}.' cip='.$dzdv->{_cip};
264 $dzdv->{_Step} = $dzdv->{_Step}.' cip='.$dzdv->{_cip};
265  
266 } else {
267 print("dzdv, cip, missing cip,\n");
268 }
269 }
270  
271  
272 =head2 sub dfile
273  
274  
275 =cut
276  
277 sub dfile {
278  
279 my ( $self,$dfile ) = @_;
280 if ( $dfile ne $empty_string ) {
281  
282 $dzdv->{_dfile} = $dfile;
283 $dzdv->{_note} = $dzdv->{_note}.' dfile='.$dzdv->{_dfile};
284 $dzdv->{_Step} = $dzdv->{_Step}.' dfile='.$dzdv->{_dfile};
285  
286 } else {
287 print("dzdv, dfile, missing dfile,\n");
288 }
289 }
290  
291  
292 =head2 sub doff
293  
294  
295 =cut
296  
297 sub doff {
298  
299 my ( $self,$doff ) = @_;
300 if ( $doff ne $empty_string ) {
301  
302 $dzdv->{_doff} = $doff;
303 $dzdv->{_note} = $dzdv->{_note}.' doff='.$dzdv->{_doff};
304 $dzdv->{_Step} = $dzdv->{_Step}.' doff='.$dzdv->{_doff};
305  
306 } else {
307 print("dzdv, doff, missing doff,\n");
308 }
309 }
310  
311  
312 =head2 sub dx
313  
314  
315 =cut
316  
317 sub dx {
318  
319 my ( $self,$dx ) = @_;
320 if ( $dx ne $empty_string ) {
321  
322 $dzdv->{_dx} = $dx;
323 $dzdv->{_note} = $dzdv->{_note}.' dx='.$dzdv->{_dx};
324 $dzdv->{_Step} = $dzdv->{_Step}.' dx='.$dzdv->{_dx};
325  
326 } else {
327 print("dzdv, dx, missing dx,\n");
328 }
329 }
330  
331  
332 =head2 sub dz
333  
334  
335 =cut
336  
337 sub dz {
338  
339 my ( $self,$dz ) = @_;
340 if ( $dz ne $empty_string ) {
341  
342 $dzdv->{_dz} = $dz;
343 $dzdv->{_note} = $dzdv->{_note}.' dz='.$dzdv->{_dz};
344 $dzdv->{_Step} = $dzdv->{_Step}.' dz='.$dzdv->{_dz};
345  
346 } else {
347 print("dzdv, dz, missing dz,\n");
348 }
349 }
350  
351  
352 =head2 sub fx
353  
354  
355 =cut
356  
357 sub fx {
358  
359 my ( $self,$fx ) = @_;
360 if ( $fx ne $empty_string ) {
361  
362 $dzdv->{_fx} = $fx;
363 $dzdv->{_note} = $dzdv->{_note}.' fx='.$dzdv->{_fx};
364 $dzdv->{_Step} = $dzdv->{_Step}.' fx='.$dzdv->{_fx};
365  
366 } else {
367 print("dzdv, fx, missing fx,\n");
368 }
369 }
370  
371  
372 =head2 sub fz
373  
374  
375 =cut
376  
377 sub fz {
378  
379 my ( $self,$fz ) = @_;
380 if ( $fz ne $empty_string ) {
381  
382 $dzdv->{_fz} = $fz;
383 $dzdv->{_note} = $dzdv->{_note}.' fz='.$dzdv->{_fz};
384 $dzdv->{_Step} = $dzdv->{_Step}.' fz='.$dzdv->{_fz};
385  
386 } else {
387 print("dzdv, fz, missing fz,\n");
388 }
389 }
390  
391  
392 =head2 sub infile
393  
394  
395 =cut
396  
397 sub infile {
398  
399 my ( $self,$infile ) = @_;
400 if ( $infile ne $empty_string ) {
401  
402 $dzdv->{_infile} = $infile;
403 $dzdv->{_note} = $dzdv->{_note}.' infile='.$dzdv->{_infile};
404 $dzdv->{_Step} = $dzdv->{_Step}.' infile='.$dzdv->{_infile};
405  
406 } else {
407 print("dzdv, infile, missing infile,\n");
408 }
409 }
410  
411  
412 =head2 sub noff
413  
414  
415 =cut
416  
417 sub noff {
418  
419 my ( $self,$noff ) = @_;
420 if ( $noff ne $empty_string ) {
421  
422 $dzdv->{_noff} = $noff;
423 $dzdv->{_note} = $dzdv->{_note}.' noff='.$dzdv->{_noff};
424 $dzdv->{_Step} = $dzdv->{_Step}.' noff='.$dzdv->{_noff};
425  
426 } else {
427 print("dzdv, noff, missing noff,\n");
428 }
429 }
430  
431  
432 =head2 sub nx
433  
434  
435 =cut
436  
437 sub nx {
438  
439 my ( $self,$nx ) = @_;
440 if ( $nx ne $empty_string ) {
441  
442 $dzdv->{_nx} = $nx;
443 $dzdv->{_note} = $dzdv->{_note}.' nx='.$dzdv->{_nx};
444 $dzdv->{_Step} = $dzdv->{_Step}.' nx='.$dzdv->{_nx};
445  
446 } else {
447 print("dzdv, nx, missing nx,\n");
448 }
449 }
450  
451  
452 =head2 sub nz
453  
454  
455 =cut
456  
457 sub nz {
458  
459 my ( $self,$nz ) = @_;
460 if ( $nz ne $empty_string ) {
461  
462 $dzdv->{_nz} = $nz;
463 $dzdv->{_note} = $dzdv->{_note}.' nz='.$dzdv->{_nz};
464 $dzdv->{_Step} = $dzdv->{_Step}.' nz='.$dzdv->{_nz};
465  
466 } else {
467 print("dzdv, nz, missing nz,\n");
468 }
469 }
470  
471  
472 =head2 sub nzw
473  
474  
475 =cut
476  
477 sub nzw {
478  
479 my ( $self,$nzw ) = @_;
480 if ( $nzw ne $empty_string ) {
481  
482 $dzdv->{_nzw} = $nzw;
483 $dzdv->{_note} = $dzdv->{_note}.' nzw='.$dzdv->{_nzw};
484 $dzdv->{_Step} = $dzdv->{_Step}.' nzw='.$dzdv->{_nzw};
485  
486 } else {
487 print("dzdv, nzw, missing nzw,\n");
488 }
489 }
490  
491  
492 =head2 sub off0
493  
494  
495 =cut
496  
497 sub off0 {
498  
499 my ( $self,$off0 ) = @_;
500 if ( $off0 ne $empty_string ) {
501  
502 $dzdv->{_off0} = $off0;
503 $dzdv->{_note} = $dzdv->{_note}.' off0='.$dzdv->{_off0};
504 $dzdv->{_Step} = $dzdv->{_Step}.' off0='.$dzdv->{_off0};
505  
506 } else {
507 print("dzdv, off0, missing off0,\n");
508 }
509 }
510  
511  
512 =head2 sub outfile
513  
514  
515 =cut
516  
517 sub outfile {
518  
519 my ( $self,$outfile ) = @_;
520 if ( $outfile ne $empty_string ) {
521  
522 $dzdv->{_outfile} = $outfile;
523 $dzdv->{_note} = $dzdv->{_note}.' outfile='.$dzdv->{_outfile};
524 $dzdv->{_Step} = $dzdv->{_Step}.' outfile='.$dzdv->{_outfile};
525  
526 } else {
527 print("dzdv, outfile, missing outfile,\n");
528 }
529 }
530  
531  
532 =head2 sub get_max_index
533  
534 max index = number of input variables -1
535
536 =cut
537
538 sub get_max_index {
539 my ($self) = @_;
540 my $max_index = 14;
541  
542 return($max_index);
543 }
544
545
546 1;